Command
#1

I'd also like a genu command: / su (SPECT) playerid / name crimesdescription wantedlevel
Reply
#2

What? Explain Yourself
Reply
#3

I did it with ZCMD + sscanf2:
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 );
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.
Reply
#4

So thats what he meant... lol
Reply
#5

Yeah, usually it`s a cop command to give someone a wanted level. At least that`s what I know it is
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)