orcun99 Posted January 29, 2015 Share Posted January 29, 2015 http://i.hizliresim.com/pm3QON.png Line100: local copAmmo = getPedTotalAmmo(attacker, true) Line114: setTimer (giveWeapon, 5000, 1, attacker, 23, copAmmo - 1, false) pls help me Link to comment
Mr_Moose Posted January 29, 2015 Share Posted January 29, 2015 That function expected a number but you added a boolean instead, just change it to a number. Are you btw allowed to use WSS police system? Link to comment
orcun99 Posted January 29, 2015 Author Share Posted January 29, 2015 (edited) yes I buy this script Needs to Change Where Edited January 29, 2015 by Guest Link to comment
TAPL Posted January 29, 2015 Share Posted January 29, 2015 yes I buy this scriptNeeds to Change Where Link to comment
orcun99 Posted January 29, 2015 Author Share Posted January 29, 2015 Still Not Working jail server lua 77: local jailTime = crimWanted * 6 Line100: local copAmmo = getPedTotalAmmo(attacker, false) Line114: setTimer (giveWeapon, 5000, 1, attacker, 23, copAmmo - 1, false) http://i.hizliresim.com/89J4N7.png Link to comment
TAPL Posted January 29, 2015 Share Posted January 29, 2015 Its need integer number of the weapon slot, not boolean! Link to comment
orcun99 Posted January 29, 2015 Author Share Posted January 29, 2015 I do not understand you correct the line addEventHandler ("tasePlayer", root, function(attacker) local nCop = getPlayerName(attacker) local nCrim = getPlayerName(source) local copAmmo = getPedTotalAmmo(attacker, true) if not getInJail(source) then setElementData(source,"taser.taseranimation",true) setElementFrozen(source, true) setPedAnimation(source, "CRACK", "crckidle2", -1, true, true, false, false) toggleControl(source, "Next Weapon", false) toggleControl(source, "Previous Weapon", false) toggleControl(source, "Fire", false) setTimer(function(player) if isElement(player) then setElementFrozen(player, false) setPedAnimation(player) toggleControl(player, "Next Weapon", true) toggleControl(player, "Previous Weapon", true) toggleControl(player, "Fire", true) end end, 3000, 1, source) exports.xxxcommands:sendMessage("You tased " .. nCrim .. " and will have to wait 5 seconds for the taser to re-charge.", 220, 220, 220, attacker) exports.xxxcommands:sendMessage("You have been tased by " .. nCop .. "." , 255, 255, 0, source) takeWeapon(attacker, 23) giveWeapon(attacker, 3, 1, true) if copAmmo ~= 0 then setTimer (giveWeapon, 5000, 1, attacker, 23, copAmmo - 1, false) end end end ) 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