/ar +rep
#3

Try this or modify it:
pawn Код:
if ((strcmp("/ar", cmd, true) == 0) || (strcmp(cmd, "/arrest", true) == 0))
    {
    new tmp[256];
    tmp = strtok(cmdtext, idx);
   
    new playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
   
    giveplayerid = strval(tmp);

    if(!strlen(tmp)) {
    SendClientMessage(playerid,0xFF0000AA, "USAGE: /Ar [Playerid] / [Player Name]");
    return 1;
    }
    if(!IsPlayerConnected(giveplayerid))
    {
    SendClientMessage(playerid,0xFF0000AA,"ERROR: Invaild ID!");
    return 1;
    }
    if(GetPlayerWantedLevel(playerid) >= 4)
    {
    format(string, sizeof(string), "You Have Been Arrested by Officer %s[%d]!",playername,playerid);
    SendClientMessage(giveplayerid,0x33CCFFAA,string);
   
    format(string, sizeof(string), "~r~BUSTED!");
    GameTextForPlayer(giveplayerid,string,3000,5);
   
    format(string, sizeof(string), "You Arrested %s[%d], You Get $2500!",playername,giveplayerid);
    SendClientMessage(playerid,0x33CCFFAA,string);
   
    format(string, sizeof(string), "Suspect %s[%d] Has Been Arrested By Officer %s[%d].",playername,giveplayerid,playername,playerid);
    SendClientMessageToAll(0x33CCFFAA,string);
   
    format(string, sizeof(string), "~b~WELL DONE!");
    GameTextForPlayer(playerid,string,3000,5);
   
    GivePlayerMoney(playerid,2500);
    SetPlayerScore(playerid,1);
   
    SetPlayerSpecialAction(giveplayerid,SPECIAL_ACTION_HANDSUP);
    ResetPlayerWeapons(giveplayerid);
    }
    return 1;
    }
    return 0;
}
Reply


Messages In This Thread
/ar +rep - by TheMightyEddy - 11.04.2012, 14:48
Re: /ar +rep - by TheMightyEddy - 11.04.2012, 15:26
Re: /ar +rep - by Faisal_khan - 11.04.2012, 15:34
Re: /ar +rep - by TheMightyEddy - 11.04.2012, 15:56
Re: /ar +rep - by Jonny5 - 11.04.2012, 16:36
Re: /ar +rep - by TheMightyEddy - 11.04.2012, 16:52

Forum Jump:


Users browsing this thread: 1 Guest(s)