micheal1230 Posted June 25, 2012 Share Posted June 25, 2012 Well The Title Says All function fixplayerveh(player, command, target) local isveh = getPedOccupiedVehicle(target) local targetPlayer = getPlayerFromNamePart( target ) if ( hasObjectPermissionTo ( player, "function.aexec" ) ) then if not isveh then if target then fixVehicle(target) else outputChatBox("SYNTAX: /fixveh [Player]",player , 255, 194, 14) end else outputChatBox("The player is not in a vehicle.", player, 255, 0, 0) end end end addCommandHandler("fixveh", fixplayerveh) Link to comment
TAPL Posted June 25, 2012 Share Posted June 25, 2012 (edited) function fixplayerveh(player, command, target) if (hasObjectPermissionTo(player, "function.aexec")) then local targetPlayer = getPlayerFromNamePart(target) if target and targetPlayer then local veh = getPedOccupiedVehicle(targetPlayer) if veh then fixVehicle(veh) else outputChatBox("The player is not in a vehicle.",player,255,0,0) end else outputChatBox("SYNTAX: /fixveh [Player]",player,255,194,14) end else outputChatBox("You don't have Permission.",player,255,0,0) end end addCommandHandler("fixveh", fixplayerveh) Edited June 26, 2012 by Guest Link to comment
Guest Guest4401 Posted June 26, 2012 Share Posted June 26, 2012 fixVehicle(target) Shouldn't it be fixVehicle(veh) ? 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