iFoReX Posted July 11, 2012 Posted July 11, 2012 cuando pongo los scripts no me aparece nada en el chat ni me teletransporta a otra dimension ni me freezea function afk() if source == getElementsByType("player") then if getElementDimension(source) == 0 and not isPedInVehicle(source) then local dimensionAFK = setElementDimension(source,math.random(1,3000)) setElementFrozen(source,true) outputChatBox(getPlayerName(source)..", esta AFK",getRootElement(),255,255,255,true) elseif getElementDimension(source) > 0 and not isPedInVehicle(source) then outputChatBox("ya estas AFK !",source) elseif isPedInVehicle(source) then outputChatBox("estas dentro de un vehiculo !",source) end end end addCommandHandler("afk",afk) function back() if source == getElementsByType("player") then if getElementDimension(source) == 0 and not isPedInVehicle(source) then outputChatBox("no estas AFK !",source) elseif getElementDimension(source) > 0 and not isPedInVehicle(source) then setElementDimension(source,0) setElementFrozen(source,true) outputChatBox(getPlayerName(source)..",esta devuelta",getRootElement(),255,255,255,true) elseif isPedInVehicle(source) then outputChatBox("estas dentro de un Vehiculo !",source) end end end addCommandHandler("back",back) elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
Castillo Posted July 11, 2012 Posted July 11, 2012 'source' no esta definido en ninguna parte, tenes que poner el primer argumento en la funcion. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Alexs Posted July 11, 2012 Posted July 11, 2012 En un comando el jugador es playerSource, intenta con esto: function afk(playerSource) if getElementDimension(playerSource) == 0 and not isPedInVehicle(source) then local dimensionAFK = setElementDimension(playerSource,math.random(1,3000)) setElementFrozen(playerSource,true) outputChatBox(getPlayerName(playerSource)..", esta AFK",getRootElement(),255,255,255,true) elseif getElementDimension(playerSource) > 0 and not isPedInVehicle(playerSource) then outputChatBox("ya estas AFK !",playerSource) elseif isPedInVehicle(playerSource) then outputChatBox("estas dentro de un vehiculo !",playerSource) end end addCommandHandler("afk",afk) function back(playerSource) if getElementDimension(playerSource) == 0 and not isPedInVehicle(playerSource) then outputChatBox("no estas AFK !",source) elseif getElementDimension(playerSource) > 0 and not isPedInVehicle(playerSource) then setElementDimension(playerSource,0) setElementFrozen(playerSource,true) outputChatBox(getPlayerName(playerSource)..",esta devuelta",getRootElement(),255,255,255,true) elseif isPedInVehicle(playerSource) then outputChatBox("estas dentro de un Vehiculo !",playerSource) end end addCommandHandler("back",back) PD: si utilizas interiors o mabako-services entonces los usuarios no podran ponerse AFK en un AmmuNation. Developer @ MYVAL
iFoReX Posted July 11, 2012 Author Posted July 11, 2012 no uso interiors o mabako services solo house_system, Ok, gracias alexs lo ire a probar enseguida. elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
BorderLine Posted July 11, 2012 Posted July 11, 2012 me parece que el freze siges moviendote. Debes deshabilitar las bindkeys para moverse, w,a,s,d, salto, correr y nose cuales mas eran. En fin suerte Actual Nick: [XGN]BorderLine Actual Clan: XLatino Actual Status: Staff, Mod Level 1 (BOSS)Yakuza - [vS]Yakuza - [sXE]Yakuza - [uG]Yakuza - [FTLS]Racing - [XGN]Borderline
Recommended Posts