/wanted
#5

This should work

pawn Код:
if(strcmp(cmd,"/wanted", true) == 0)
{
    //getting the id into 'tmp'
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp)) return SendClientMessage(playerid, 0xE3E3E3FF, "USAGE: /wanted [playerid] [wantedlevel]");
    giveplayerid = strval(tmp);
    if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid,0xE3E3E3FF,"Player not connected");
   
    //getting the name into 'tmp'
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp)) return SendClientMessage(playerid, 0xE3E3E3FF, "USAGE: /wanted [playerid] [wantedlevel]");
    new wantedlvl = strval(tmp);
    if (wantedlvl < 0 || wantedlvl > 6) return SendClientMessage(playerid, 0xE3E3E3FF, "Valid wanted levels: 1 - 6");
   
    if(sapd[giveplayerid] >= 1)
    {
        if(sapd[playerid] >= 1)
        {
            SetPlayerWantedLevel(giveplayerid, wantedlvl);
        }
        else
        {
            SendClientMessage(playerid,0xE3E3E3FF,"Je mag dit niet doen");
        }
    }
    return 1;
}
Reply


Messages In This Thread
/wanted - by bartje01 - 06.07.2010, 13:50
Re: /wanted - by iJumbo - 06.07.2010, 14:10
Re: /wanted - by bartje01 - 06.07.2010, 14:11
Re: /wanted - by iJumbo - 06.07.2010, 14:16
Re: /wanted - by dice7 - 06.07.2010, 14:35
Re: /wanted - by bartje01 - 06.07.2010, 14:45
Re: /wanted - by iJumbo - 06.07.2010, 14:51
Re: /wanted - by bartje01 - 06.07.2010, 14:54
Re: /wanted - by WillyP - 10.07.2010, 10:15

Forum Jump:


Users browsing this thread: 2 Guest(s)