xyz Posted March 30, 2016 Posted March 30, 2016 function plate(player, cmdName, text) local acc = getPlayerAccount(player) local accn = getAccountName(acc) local occveh = getPedOccupiedVehicle(player) if occveh then if getElementData(occveh, "vehsAcc") == accn and text then -- This checks if the vehicle is the player's personal veh. If you're wondering setVehiclePlateText(occveh, text) outputChatBox("Plate text changed!", player, 0, 255, 0) else end outputChatBox("This isn't your personal vehicle!", player, 255, 0, 0) else outputChatBox("You must be in a vehicle to change the plate!", player, 255, 0, 0) end end addCommandHandler("plate", plate) The problem is, that when everything is correct it still outputs "You must be in a vehicle to change the plate!", how can I fix that?
Dimos7 Posted March 30, 2016 Posted March 30, 2016 function plate(player, cmdName, text) local acc = getPlayerAccount(player) local accn = getAccountName(acc) local occveh = getPedOccupiedVehicle(player) if occveh then if getElementData(occveh, "vehsAcc") == accn and text then -- This checks if the vehicle is the player's personal veh. If you're wondering setVehiclePlateText(occveh, text) outputChatBox("Plate text changed!", player, 0, 255, 0) else outputChatBox("This isn't your personal vehicle!", player, 255, 0, 0) end else outputChatBox("You must be in a vehicle to change the plate!", player, 255, 0, 0) end end addCommandHandler("plate", plate)
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