OrbTanT Posted August 20, 2014 Share Posted August 20, 2014 How put a time in pickup, for when the player is at the up of the pickup, every 30 seconds he of the collect for the player. I tried to add the time more I had no result. pickup1 = createPickup ( 2511.323, -1688.844, 13.549, 1, 15, 0 ) addEventHandler("onPickupHit", pickup1, function (player) local playerTeam = getPlayerTeam(player) if (playerTeam) then local r, g, b = getTeamColor(playerTeam) local aR, aG, aB = getRadarAreaColor(GROVE) if (r == aR) and (g == aG) and (b == aB) then outputChatBox("", player, 0, 0, 0, true) else outputChatBox("#F4A460[AVISO]#F08080 Você não faz parte desta gang.", player, 0, 0, 0, true) cancelEvent() end else outputChatBox("#F4A460[AVISO]#F08080 Você não faz parte desta gang.", player, 0, 0, 0, true) cancelEvent() end end) Link to comment
DNL291 Posted August 20, 2014 Share Posted August 20, 2014 (edited) Do you mean the respawn time of the pickup? If so, use 30000 at the sixth argument (or just remove the 0 since default argument is 30 seconds). Edited August 20, 2014 by Guest Link to comment
OrbTanT Posted August 20, 2014 Author Share Posted August 20, 2014 No, respawn 0, for he does not disappear and set a time to add the vest when it is at the up. Link to comment
DNL291 Posted August 20, 2014 Share Posted August 20, 2014 Is this what do you mean? local timer = {} local pickup1 = createPickup( 2511.323, -1688.844, 13.549, 1, 15, 0 ) addEventHandler( "onPickupHit", pickup1, function (player) local playerTeam = getPlayerTeam(player) if (playerTeam) then if isTimer(timer[player]) then return end local r, g, b = getTeamColor(playerTeam) local aR, aG, aB = getRadarAreaColor(GROVE) if (r == aR) and (g == aG) and (b == aB) then outputChatBox("", player, 0, 0, 0, true) else outputChatBox("#F4A460[AVISO]#F08080 Você não faz parte desta gang.", player, 0, 0, 0, true) cancelEvent() end timer[player] = setTimer(function() end, 30000, 1) else outputChatBox("#F4A460[AVISO]#F08080 Você não faz parte desta gang.", player, 0, 0, 0, true) cancelEvent() end end) addEventHandler( "onPlayerQuit", root, function() if timer[source] then timer[source] = nil end end ) I really can't understand his english. 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