Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Recurso: MJ-Varios
- --Archivo: AFKServidor.lua
- --Proposito: Funcionamiento del sistema "AFK" en el modo de Race
- --Creado por Tomas Navarro (GamerCarl)
- local estadorace = ""
- local mensajesA = true
- local colordetexto = "#1e90ff"
- function mensajeAFK(tipomsg, tiempoafk)
- if(tipomsg == 1) then
- outputChatBox("#1e90ff* #FFFFFF".. getPlayerName(source).. "#1e90ff Ha muerto por el #FFFFFFANTI-AFK#1e90ff #1e90ff[#ABCDEF"..tiempoafk.."/3#1e90ff]",getRootElement(),255,255,255,true)
- elseif(tipomsg == 2) then
- outputChatBox("#1e90ff* #FFFFFF".. getPlayerName(source).. "#1e90ff Ha sido Expulsado por estar AFK por 3 Rondas!!!",getRootElement(),255,255,255,true)
- end
- end
- addEvent("afkADV", true)
- addEventHandler("afkADV", root, mensajeAFK)
- function matarAFK()
- setElementHealth(source, 0)
- end
- addEvent("afkMuerte", true)
- addEventHandler("afkMuerte", root, matarAFK)
- function cambiodeRACE(nuevoestado)
- estadorace = nuevoestado
- end
- addEvent("onRaceStateChanging", true)
- addEventHandler( "onRaceStateChanging", getRootElement(), cambiodeRACE)
- function expulsarAFK(jugador)
- kickPlayer(jugador, "Has estado afk por 3 rondas de race!!!")
- end
- addEvent("ExpulsionAFK", true)
- addEventHandler("ExpulsionAFK", root, expulsarAFK)
- function cargarcliente()
- local msgActivo = get( "msgActivo" )
- local msgColor = get( "msgColor" )
- if(msgActivo) then
- if(msgActivo == "true") then
- mensajeA = true
- else
- mensajeA = false
- end
- if(msgColor) then
- colordetexto = msgColor
- end
- end
- local tiempomaximo = get( "tiempoafkMAX" )
- local wtiempo = get( "tiempoWARN" )
- triggerClientEvent ( "onSettingsReady", getRootElement(), tiempomaximo, wtiempo)
- end
- addEvent("onClientLoaded", true)
- addEventHandler( "onClientLoaded", getRootElement(), cargarcliente)
- function volverdeAFK()
- outputChatBox(getPlayerName(source).. " #ffffffHa vuelto al teclado.", getRootElement(), 255,0,0,true)
- end
- addEvent("volverAFK", true)
- addEventHandler( "volverAFK", getRootElement(), volverdeAFK)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement