Jumper_Mych Posted January 18, 2011 Author Posted January 18, 2011 1. omfg! you are doing random code as i said, this makes no sense o_o, you want to setPlayerName in a vehicle?? I try change to setPlayerFromNick is doesn't work i change next setPlayerType but doesn't work it all doesn't work, unless my code are error 2.simply ask you, i want Vehicle is owned Jumper_Mych VINEWOOD
Jumper_Mych Posted January 18, 2011 Author Posted January 18, 2011 Which will work 1.setPlayerName 2.getPlayerName 3.getPlayerFromNick 4.getElementType 5.other (add me function) VINEWOOD
Castillo Posted January 18, 2011 Posted January 18, 2011 what are you trying to do? i would recommend doing something like this: vehicle = createVehicle ( 496, 2425, -55, 27, 0, 0, 0 ) setElementData(vehicle,"vehicle","car") setElementData(vehicle, "owner", "Jumper_Mych") function enterVehicle ( player, seat, jacked ) if (getElementData(source, "vehicle" ) == "car") and ( not getElementData(source, "owner" ) == getPlayerName(player) ) then outputChatBox ( "Vehicle owner: Jumper_Mych", player ) cancelEvent() end end addEventHandler ( "onVehicleStartEnter", getRootElement(), enterVehicle ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Jumper_Mych Posted January 18, 2011 Author Posted January 18, 2011 what are you trying to do? i would recommend doing something like this: vehicle = createVehicle ( 496, 2425, -55, 27, 0, 0, 0 ) setElementData(vehicle,"vehicle","car") setElementData(vehicle, "owner", "Jumper_Mych") function enterVehicle ( player, seat, jacked ) if (getElementData(source, "vehicle" ) == "car") and ( not getElementData(source, "owner" ) == getPlayerName(player) ) then outputChatBox ( "Vehicle owner: Jumper_Mych", player ) cancelEvent() end end addEventHandler ( "onVehicleStartEnter", getRootElement(), enterVehicle ) Weak code and doesn't work Topic to scrap But thanks you Solidsnake14 was first code work VINEWOOD
Castillo Posted January 18, 2011 Posted January 18, 2011 vehicle = createVehicle ( 496, 2425, -55, 27, 0, 0, 0 ) setElementData(vehicle,"vehicle","car") setElementData(vehicle, "owner", "Jumper_Mych") function enterVehicle ( player, seat, jacked ) if (getElementData(source, "vehicle" ) == "car") and ( getElementData(source, "owner" ) ~= getPlayerName(player) ) then outputChatBox ( "Vehicle owner: Jumper_Mych", player ) cancelEvent() end end addEventHandler ( "onVehicleStartEnter", getRootElement(), enterVehicle ) you only had to remove "not" and change "==" to "~=" San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Jumper_Mych Posted January 18, 2011 Author Posted January 18, 2011 Thanks you! 1/2 and 2/2 Close Topic No deleted, A beginner might be useful VINEWOOD
Castillo Posted January 18, 2011 Posted January 18, 2011 OMG! ur seriusly? finally! San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Jumper_Mych Posted January 18, 2011 Author Posted January 18, 2011 maybe finally, but next my work on code target doesn't work i New Topic VINEWOOD
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now