Sign in to follow this  
SA-Symon

Mask Bug

Recommended Posts

maskTable = {}   
yelekTable = {} 



maskTable["Devil"] = {1512, 1, 90,100000} 
maskTable["Vendetta"] = {1455, 1, 90,100000} 
maskTable["Darth"] = {1484, 1, 90,100000} 
maskTable["Horse"] = {1485, 1, 90,1450000} 
maskTable["Gas mask"] = {1487, 1, 90,1450000} 
maskTable["Cow Bow"] = {1543, 1, 90,1950000} 
maskTable["Zombie"] = {1544, 1, 90,100000} 
maskTable["Vampire"] = {1666, 1, 90,950000} 
maskTable["skull Face"] = {1667, 1, 90,950000} 
maskTable["Raccoon"] = {1668, 1, 180,100000} 
maskTable["Owl"] = {1950, 1, 180,950000} 
maskTable["Cat"] = {1951, 1, 180,1450000} 
maskTable["Bag"] = {1551, 1, 90,10000} 
maskTable["Dog"] = {1546, 1, 90,950000} 
maskTable["Baby"] = {1669, 1, 90,1450000} 
maskTable["Monster"] = {1853, 1, 90,100000} 
maskTable["Monster Space"] = {1854, 1, 90,1450000} 
maskTable["Hate"] = {1855, 1, 180,100000} 
obje = {}
yelek = {}

function maske_kaldir()
		if obje[source] then
		destroyElement(obje[source])
		
		end
end
addEvent("removemask",true) 
addEventHandler("removemask", root, maske_kaldir) 

function maske_kaldir(pay)
local money = getPlayerMoney(source)                            
	   if (money > tonumber (pay)) then     
	 takePlayerMoney (source,(pay))
	 setElementData (source ,"bought",true)
	 setElementData (localPlayer ,"testing" ,false)
	 else
	 setElementData (localPlayer ,"testing" ,true)
	 outputChatBox (" You dont have Money " ,source ,255,0,0)
	  yelek_kaldir()
	    triggerClientEvent (source, "onGreeting",source )
	 end
end
addEvent("cost",true) 
addEventHandler("cost", root, maske_kaldir) 

function yelek_kaldir()
		if yelek[source] then
		destroyElement(yelek[source])
		
		end
end
addCommandHandler("destroy", yelek_kaldir)
addEvent("removeyelek",true) 
addEventHandler("removeyelek", root, yelek_kaldir) 

function maske_ekle(objeid,bodyattach,zROT)
obje[source] = createObject ( objeid, 0, 0, 0, 0, 0, 0 )
exports.bone_attach:attachElementToBone(obje[source],source,bodyattach,0,0,-0.61,0,0,zROT) 
setElementData (source,"masks",objeid)
setElementData (source,"bodp",bodyattach)
setElementData (source,"rot",zROT)
end
addEvent("setmask",true) 
addEventHandler("setmask", root, maske_ekle) 

 

function yelek_ekle(name)
		if yelek[source] then
		destroyElement(yelek[source])
		yelek[source] = nil
		end
local objeid = yelekTable[name][1]
local bodyattach = yelekTable[name][2]
local zROT = yelekTable[name][3]
yelek[source] = createObject ( objeid, 0, 0, 0, 0, 0, 0 )
exports.bone_attach:attachElementToBone(yelek[source],source,3,-0.03,0,-0.55,-0.5,2,90) 
end
addEvent("setyelek",true) 
addEventHandler("setyelek", root, yelek_ekle) 

function saveInfo(name)
if not getElementData(source, "testing" ) then
local account = getPlayerAccount(source)
local walking = getElementData(source,"masks")
local body = getElementData (source,"body")
local rot = getElementData (source,"rot")
local bought = getElementData (source,"bought")
setAccountData(account,"masks",walking)
setAccountData(account,"bodp",body)
setAccountData(account,"rot",rot)
setAccountData(account,"bought",bought)
setElementData(source,"rot",rot)
setElementData(source,"masks",walking)
setElementData(source,"bodp",body)
end
end
addEventHandler("onPlayerQuit",root,saveInfo)


function this (name)
if not getElementData(source, "testing" ) then
local account = getPlayerAccount(source)
local walking = getElementData(source,"masks")
local body = getElementData (source,"bodp")
local rot = getElementData (source,"rot")
setAccountData(account,"masks",walking)
setAccountData(account,"bodp",body)
setAccountData(account,"rot",rot)
setElementData(source,"rot",rot)
setElementData(source,"masks",walking)
setElementData(source,"bodp",body)
   end
   end
addEventHandler( "onResourceStop", resourceRoot,this)


function displayLoadedRes (name)
if not getElementData(source, "testing" ) then
local account = getPlayerAccount(source)
local walking = getAccountData(account,"masks")
local body = getAccountData(account,"bodp")
local rot = getAccountData(account,"rot")
setElementData(source,"rot",rot)
setElementData(source,"masks",walking)
setElementData(source,"bodp",body)
obje[source] = createObject (walking, 0, 0, 0, 0, 0, 0 )
exports.bone_attach:attachElementToBone(obje[source],source,body,0,0,-0.61,0,0,rot) 
end
end
addEventHandler ( "onResourceStart", getRootElement(), displayLoadedRes )
function getInfo(name)
if not getElementData(source, "testing" ) then
local account = getPlayerAccount(source)
local walking = getAccountData(account,"masks")
local body = getAccountData(account,"bodp")
local rot = getAccountData(account,"rot")
setAccountData(account,"masks",walking)
setAccountData(account,"bodp",body)
setAccountData(account,"rot",rot)
setElementData(source,"rot",rot)
setElementData(source,"masks",walking)
setElementData(source,"bodp",body)
obje[source] = createObject (walking, 0, 0, 0, 0, 0, 0 )
exports.bone_attach:attachElementToBone(obje[source],source,body,0,0,-0.61,0,0,rot) 
end
end
addEventHandler("onPlayerSpawn",root,getInfo)
function getInfo(per,cur,name)
if not getElementData(source, "testing" ) then
local walking = getAccountData(cur,"masks")
local body = getAccountData(cur,"bodp")
local rot = getAccountData(cur,"rot")
setElementData(source,"rot",rot)
setElementData(source,"masks",walking)
setElementData(source,"bodp",body)
setElementData(source,"loggedin",true)
obje[source] = createObject (walking, 0, 0, 0, 0, 0, 0 )
exports.bone_attach:attachElementToBone(obje[source],source,body,0,0,-0.61,0,0,rot) 
end
end
addEventHandler("onPlayerWasted",root,getInfo)



function itback (name)
if not getElementData(source, "testing" ) then

end
end
addCommandHandler ( "reco",itback)



 function back(name)
 if not getElementData(source, "testing" ) then
 local account = getPlayerAccount(source)
 local walking = getAccountData(account,"masks")
local body = getAccountData(account,"bodp")
local rot = getAccountData(account,"rot")
local bought = getAccountData(account,"bought")
setElementData(source,"rot",rot)
setElementData(source,"masks",walking)
setElementData(source,"bodp",body)
setElementData(source,"bought",bought)
setElementData(source,"loggedin",true)
obje[source] = createObject (walking, 0, 0, 0, 0, 0, 0 )
exports.bone_attach:attachElementToBone(obje[source],source,body,0,0,-0.61,0,0,rot) 
  end
  end
addEventHandler("onPlayerLogin", root,back)

when Player recc mask removed !

Share this post


Link to post

you mean when player quit the game he lost his mask ? and he must buy another one ?

Edited by SORK>Soxxml

Share this post


Link to post
3 hours ago, iDannz said:

what is the problem

 

 

3 hours ago, SORK>Soxxml said:

you mean when player quit the game he lost his mask ? and he must buy another one ?

Yes as soxxml said

  • Like 1

Share this post


Link to post
16 hours ago, (SAUG)Tando said:
 function back(old , new)
 if not getElementData(source, "testing" ) then
 local account = new
 local walking = getAccountData(account,"masks")
local body = getAccountData(account,"bodp")
local rot = getAccountData(account,"rot")
local bought = getAccountData(account,"bought")
setElementData(source,"rot",rot)
setElementData(source,"masks",walking)
setElementData(source,"bodp",body)
setElementData(source,"bought",bought)
setElementData(source,"loggedin",true)
obje[source] = createObject (walking, 0, 0, 0, 0, 0, 0 )
exports.bone_attach:attachElementToBone(obje[source],source,body,0,0,-0.61,0,0,rot) 
  end
  end
addEventHandler("onPlayerLogin", root,back)

 

Share this post


Link to post
12 hours ago, KillerX said:

 function back(old , new) if not getElementData(source, "testing" ) then local account = new local walking = getAccountData(account,"masks")local body = getAccountData(account,"bodp")local rot = getAccountData(account,"rot")local bought = getAccountData(account,"bought")setElementData(source,"rot",rot)setElementData(source,"masks",walking)setElementData(source,"bodp",body)setElementData(source,"bought",bought)setElementData(source,"loggedin",true)obje[source] = createObject (walking, 0, 0, 0, 0, 0, 0 )exports.bone_attach:attachElementToBone(obje[source],source,body,0,0,-0.61,0,0,rot)   end  endaddEventHandler("onPlayerLogin", root,back)

 

Still same problem

Share this post


Link to post
1 hour ago, Knuck said:

@LilDawage

When you steal maybe steal NGSQL too

I have this fixed.

K

Here for helpnot asking about have or no

Share this post


Link to post
17 hours ago, (SAUG)Tando said:

K

Here for helpnot asking about have or no

Im just saying you need the stolen NGSQL

  • Like 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.