Hola tengo un script de autos privados el problema que tengo es que cuando otro user se acerca no sale el aviso que no es de el yo quiero que salga algo como
[server]auto propiedad de tal jugador
que devo de hacer
chaky = createVehicle (541, -2018.904296875, -260.40234375, 34.422100067139, 0, 0, 88.747253417969)
setElementData(chaky , "owner", "chaky")
setVehicleDamageProof (chaky, true )
setVehicleColor ( chaky , f , f , f , f , f , f )
function onLockedVehicleEnter ( player, seat, jacked )
if getElementData(source, "owner") and getElementData(source, "owner" ) ~= getAccountName(getPlayerAccount(player)) and ( seat == 0 ) then
cancelEvent()
end
end
addEventHandler ( "onVehicleStartEnter", getRootElement(), onLockedVehicleEnter )
function Lolr (thePlayer)
local account = getPlayerAccount ( thePlayer )
if not isGuestAccount(account) and getAccountName(account) == "chaky" then
respawnVehicle ( chaky )
else
outputChatBox ( "No puedes usar este comando", thePlayer, 255, 200, 0 )
end
end
addCommandHandler("chaky", stre)
addCommandHandler("stre",function(thePlayer)
local account = getPlayerAccount ( thePlayer )
if not isGuestAccount(account) and getAccountName(account) == "chaky" then
local x,y,z = getElementPosition(thePlayer)
setElementPosition(chaky,x+3,y,z+3)
end
end
)