Jump to content

Problema con Privatecar


Chaky

Recommended Posts

Posted

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 
) 

  • MTA Team
Posted
  
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() 
outputChatBox ( "Vehiculo propiedad de: "..tostring(getElementData(source,"owner")), player, 255, 200, 0 ) 
        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 
) 

Posted
  
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() 
outputChatBox ( "Vehiculo propiedad de: "..tostring(getElementData(source,"owner")), player, 255, 200, 0 ) 
        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 
) 

solo cambio lo que dice auto propiedad de chaky ?

  • MTA Team
Posted

Sí es lo que querias no? Qué salga Vehiculo Propiedad de ....

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

  • Recently Browsing   0 members

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