BorderLine Posted January 26, 2012 Share Posted January 26, 2012 Hi forum Well i was trying to make this script this is about respawn my own car with a command, but just i want do this command, no other players so i did this function yakuza() local account = getPlayerAccount ( thePlayer ) if account == "yakuza" then outputChatBox ( "You cant make this use", thePlayer, 255, 200, 0 ) else respawnVehicle ( vehicle1 ) end end addCommandHandler("respawnmycar", yakuza) its a server side thx Link to comment
Xeno Posted January 26, 2012 Share Posted January 26, 2012 You did it the wrong way around ;3 function yakuza() local account = getPlayerAccount ( thePlayer ) if account == "yakuza" then respawnVehicle ( vehicle1 ) else outputChatBox ( "You cant make this use", thePlayer, 255, 200, 0 ) end end addCommandHandler("respawnmycar", yakuza) Link to comment
JR10 Posted January 26, 2012 Share Posted January 26, 2012 function yakuza(thePlayer) local account = getPlayerAccount ( thePlayer ) if not isGuestAccount(account) and getAccountName(account) == "yakuza" then respawnVehicle ( vehicle1 ) else outputChatBox ( "You cant make this use", thePlayer, 255, 200, 0 ) end end addCommandHandler("respawnmycar", yakuza) Is vehicle1 a global variable? Link to comment
BorderLine Posted January 26, 2012 Author Share Posted January 26, 2012 its a personal car.. with account to but this work JR10 thx so much Link to comment
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