Chaky Posted January 27, 2014 Share Posted January 27, 2014 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 ) Link to comment
MTA Team 0xCiBeR Posted January 27, 2014 MTA Team Share Posted January 27, 2014 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 ) Link to comment
Chaky Posted January 27, 2014 Author Share Posted January 27, 2014 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 ? Link to comment
MTA Team 0xCiBeR Posted January 27, 2014 MTA Team Share Posted January 27, 2014 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 Link to comment
Recommended Posts