Jump to content

Que esta mal de esto ?


iFoReX

Recommended Posts

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) 

Link to comment

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.

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...