Xeonon
04-09-2009, 11:27 PM
Hi guys I want to make it so a police officer does /sus <playerID/playerName> <Reason>
And so other officers can't suspect each other. And also so it shows that Officer Xeonon suspected Player Name for Reason.
Here is my code so far.
function SuspectPlayer(PlayerID, Player2, Reason)
if not Player2 then
outputChatBox ( PlayerID,"SYNTAX: //suspect Player Reason", 255, 0, 0, 255 )
elseif isPlayerSpawned ( PlayerID ) == 0 then
outputChatBox(PlayerID, "You must be spawned", 255, 0, 0, 255 )
else
setPlayerFixedWantedLevel (PlayerID, 1)
end
end
addCommand("sus", "SuspectPlayer")
Edit: I also wan't it to give a officer about $500 if he kills a suspect ;)
And so other officers can't suspect each other. And also so it shows that Officer Xeonon suspected Player Name for Reason.
Here is my code so far.
function SuspectPlayer(PlayerID, Player2, Reason)
if not Player2 then
outputChatBox ( PlayerID,"SYNTAX: //suspect Player Reason", 255, 0, 0, 255 )
elseif isPlayerSpawned ( PlayerID ) == 0 then
outputChatBox(PlayerID, "You must be spawned", 255, 0, 0, 255 )
else
setPlayerFixedWantedLevel (PlayerID, 1)
end
end
addCommand("sus", "SuspectPlayer")
Edit: I also wan't it to give a officer about $500 if he kills a suspect ;)