ertlflorian1 Posted September 12, 2012 Share Posted September 12, 2012 function tie(thePlayer,cmd,target) if getPedOccupiedVehicleSeat(thePlayer) == 0 then local fac = getElementData (thePlayer, "Fraktion") if (fac == 1) or (fac == 5) or (fac == 4) then local target = getPlayerFromName (target) if target then if getPedOccupiedVehicle(target) == getPedOccupiedVehicle(thePlayer) then if getElementData(target,"tied") == false then setElementFrozen(target,true) toggleAllControls(target,false,true,false) setElementData(target,"tied",true) outputChatBox("Du hast "..target.." gefesselt", thePlayer, 0, 0, 255) outputChatBox("Du wurdest von "..thePlayer.." gefesselt", target, 0, 0, 255) elseif getElementData(target,"tied") == true then setElementFrozen(target,false) toggleAllControls(target,true,true,false) setElementData(target,"tied",false) outputChatBox("Du hast "..target.." entfesselt", thePlayer, 0, 0, 255) outputChatBox("Du wurdest von "..thePlayer.." entfesselt", target, 0, 0, 255) else end end end end end end addCommandHandler("tie",tie) Hi this is the script it works but i get no outputchatbox?? [2012-09-12 20:06:31] WARNING: Godmother\Fraktionen\LVPD\Cops.lua:14: Bad argument @ 'getPlayerFromName' [2012-09-12 20:06:31] ERROR: Godmother\Fraktionen\LVPD\Cops.lua:22: attempt to concatenate local 'thePlayer' (a userdata value) [2012-09-12 20:06:50] WARNING: Godmother\Fraktionen\LVPD\Cops.lua:14: Bad argument @ 'getPlayerFromName' [2012-09-12 20:06:50] ERROR: Godmother\Fraktionen\LVPD\Cops.lua:27: attempt to concatenate local 'target' (a userdata value) Link to comment
manve1 Posted September 12, 2012 Share Posted September 12, 2012 function tie(thePlayer,cmd,target) if getPedOccupiedVehicleSeat(thePlayer) == 0 then local fac = getElementData (thePlayer, "Fraktion") if (fac == 1) or (fac == 5) or (fac == 4) then local target = getPlayerName (thePlayer) if target then if getPedOccupiedVehicle(target) == getPedOccupiedVehicle(thePlayer) then if getElementData(target,"tied") == false then setElementFrozen(target,true) toggleAllControls(target,false,true,false) setElementData(target,"tied",true) outputChatBox("Du hast ".. target .." gefesselt", thePlayer, 0, 0, 255) outputChatBox("Du wurdest von ".. thePlayer .." gefesselt", target, 0, 0, 255) elseif getElementData(target,"tied") == true then setElementFrozen(target,false) toggleAllControls(target,true,true,false) setElementData(target,"tied",false) outputChatBox("Du hast ".. target .." entfesselt", thePlayer, 0, 0, 255) outputChatBox("Du wurdest von ".. thePlayer .." entfesselt", target, 0, 0, 255) else end end end end end end addCommandHandler("tie",tie) this should be set in meta as server sided. Link to comment
TAPL Posted September 12, 2012 Share Posted September 12, 2012 function tie(thePlayer,cmd,target) if getPedOccupiedVehicleSeat(thePlayer) == 0 then local fac = getElementData (thePlayer, "Fraktion") if (fac == 1) or (fac == 5) or (fac == 4) then local target = getPlayerFromName (target) if target then if getPedOccupiedVehicle(target) == getPedOccupiedVehicle(thePlayer) then if getElementData(target,"tied") == false then setElementFrozen(target,true) toggleAllControls(target,false,true,false) setElementData(target,"tied",true) outputChatBox("Du hast "..getPlayerName(target).." gefesselt", thePlayer, 0, 0, 255) outputChatBox("Du wurdest von "..getPlayerName(thePlayer).." gefesselt", target, 0, 0, 255) elseif getElementData(target,"tied") == true then setElementFrozen(target,false) toggleAllControls(target,true,true,false) setElementData(target,"tied",false) outputChatBox("Du hast "..getPlayerName(target).." entfesselt", thePlayer, 0, 0, 255) outputChatBox("Du wurdest von "..getPlayerName(thePlayer).." entfesselt", target, 0, 0, 255) else end end end end end end addCommandHandler("tie",tie) Link to comment
ertlflorian1 Posted September 12, 2012 Author Share Posted September 12, 2012 Thank you (only TAPLs work) Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now