11.03.2011, 23:58
(
Последний раз редактировалось antonio112; 12.03.2011 в 00:49.
)
I did it with ZCMD + sscanf2:
tempname = playerid
tempreason = crime decscription
tempwanted = wanted level
So, it works like: "/suspect antonio112 Speeding 1". This will give the suspect a level 1 wanted for Speeding.
About the CMD: su ... it`s so you can use like /su or /suspect, which do exactly the same.
Now, this is a simple example.
pawn Код:
CMD:suspect( playerid, params[] )
{
new tempname, tempreason[ 70 ], tempwanted;
if ( sscanf( params, "us[ 70 ]i", tempname, tempreason, tempwanted ) )
return SendClientMessage( playerid, -1, "Usage: /awanted <PlayerID> <Reason> [WantedLevel]");
if ( !IsPlayerConnected( tempname ) )
return SendClientMessage( playerid, -1, ""COL_RED"Player is not connected.");
SetPlayerWantedLevel( tempname, tempwanted );
return 1;
}
CMD:su( playerid, params[] ) return cmd_suspect( playerid, params );
tempreason = crime decscription
tempwanted = wanted level
So, it works like: "/suspect antonio112 Speeding 1". This will give the suspect a level 1 wanted for Speeding.
About the CMD: su ... it`s so you can use like /su or /suspect, which do exactly the same.
Now, this is a simple example.