Jump to content

NewMemberScript

Members
  • Posts

    2
  • Joined

  • Last visited

NewMemberScript's Achievements

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody.

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody. (2/54)

0

Reputation

  1. NexT_COMMAND = { } NexT_TIME = 2000 function toggleAfkMode(thePlayer, playerSource) if getElementData(thePlayer,"AfkOFF") then outputChatBox ( "Wait a few seconds, we are checking your last use", thePlayer, 244,189,56 ) end if getElementData(thePlayer,"AfkON") then outputChatBox ( "Disabling mode ...", thePlayer, 244,189,56 ) end setTimer(function() if getElementData(thePlayer,"AfkMode") then setElementData(thePlayer,"AfkMode",false) setElementData(thePlayer,"AfkOFF",true) setElementData(thePlayer,"AfkON",false) setElementAlpha(thePlayer, 255) toggleControl (thePlayer, "fire", true) toggleControl (thePlayer, "next_weapon", true) toggleControl (thePlayer, "previous_weapon", true) toggleControl (thePlayer, "aim_weapon", true) outputChatBox ( "PRMode: disabled.", thePlayer, 56,244,69 ) else if (NexT_COMMAND[playerSource]) then return outputChatBox ( "Error: Wait 5 minutes since the last use of the invulnerability system", thePlayer, 244,56,56 ) end setElementData(thePlayer,"AfkMode",true) setElementData(thePlayer,"AfkOFF",false) setElementData(thePlayer,"AfkON",true) setElementAlpha(thePlayer, 127) toggleControl (thePlayer, "fire", false) toggleControl (thePlayer, "next_weapon", false) toggleControl (thePlayer, "previous_weapon", false) toggleControl (thePlayer, "aim_weapon", false) outputChatBox ( "RP mode: enabled.", thePlayer, 56,244,69 ) NexT_COMMAND[playerSource] = true setTimer( function() NexT_COMMAND[playerSource] = false end, NexT_TIME, 1) end end, 1000, 1) end addCommandHandler("rp",toggleAfkMode) function login_AFKOFF (thePlayer) setElementData(thePlayer,"AfkOFF",true) end addEventHandler("onPlayerLogin",root, login_AFKOFF) function logout_AFKOFF (thePlayer) setElementData(thePlayer,"AfkOFF",true) end addEventHandler("onPlayerLogout",root, logout_AFKOFF) function join_AFKOFF (thePlayer) setElementData(thePlayer,"AfkOFF",true) end addEventHandler("onPlayerJoin",root, join_AFKOFF) Could someone tell me why I can still activate and deactivate the rp mode as many times as I want without the message "Error: Wait 5 minutes since the last use of the invulnerability system", is it a problem with setTimer ??? Could you help me fix
  2. Alguém poderia me dizer por que eu ainda consigo ativar e desativar o modo rp quantas vezes eu quiser sem aparecer a mensagem "Erro: Aguarde 5 minutos desde a ultima utilização do sistema de invulnerabilidade", é algum problema com o setTimer??? Poderia me ajudar a corrigir NexT_COMMAND = { } NexT_TIME = 2000 function toggleAfkMode(thePlayer, playerSource) if getElementData(thePlayer,"AfkOFF") then outputChatBox ( "Aguarde alguns segundos, estamos verificando sua ultima utilização", thePlayer, 244,189,56 ) end if getElementData(thePlayer,"AfkON") then outputChatBox ( "Desativando modo RP...", thePlayer, 244,189,56 ) end setTimer(function() if getElementData(thePlayer,"AfkMode") then setElementData(thePlayer,"AfkMode",false) setElementData(thePlayer,"AfkOFF",true) setElementData(thePlayer,"AfkON",false) setElementAlpha(thePlayer, 255) toggleControl (thePlayer, "fire", true) toggleControl (thePlayer, "next_weapon", true) toggleControl (thePlayer, "previous_weapon", true) toggleControl (thePlayer, "aim_weapon", true) outputChatBox ( "Modo RP: desativado.", thePlayer, 56,244,69 ) else if (NexT_COMMAND[playerSource]) then return outputChatBox ( "Erro: Aguarde 5 minutos desde a ultima utilização do sistema de invulnerabilidade", thePlayer, 244,56,56 ) end setElementData(thePlayer,"AfkMode",true) setElementData(thePlayer,"AfkOFF",false) setElementData(thePlayer,"AfkON",true) setElementAlpha(thePlayer, 127) toggleControl (thePlayer, "fire", false) toggleControl (thePlayer, "next_weapon", false) toggleControl (thePlayer, "previous_weapon", false) toggleControl (thePlayer, "aim_weapon", false) outputChatBox ( "Modo RP: ativado.", thePlayer, 56,244,69 ) NexT_COMMAND[playerSource] = true setTimer( function() NexT_COMMAND[playerSource] = false end, NexT_TIME, 1) end end, 3000, 1) end addCommandHandler("rp",toggleAfkMode) function login_AFKOFF (thePlayer) setElementData(thePlayer,"AfkOFF",true) end addEventHandler("onPlayerLogin",root, login_AFKOFF) function logout_AFKOFF (thePlayer) setElementData(thePlayer,"AfkOFF",true) end addEventHandler("onPlayerLogout",root, logout_AFKOFF) function join_AFKOFF (thePlayer) setElementData(thePlayer,"AfkOFF",true) end addEventHandler("onPlayerJoin",root, join_AFKOFF)
×
×
  • Create New...