How Do I Attach These?
#4

pawn Code:
COMMAND:arrest(playerid, params[])
{
    stunedid = strval(params);
    if(gTeam[playerid] == TEAM_ENFORCERS)
    {
        if (strval(params)>0)
        {
          if (Stuned[stunedid] == 1)
          {
            new rand = random(sizeof(JAIL));
            SetPlayerScore(stunedid,GetPlayerScore(stunedid)-10);
            GivePlayerMoney(stunedid,-1000);
            SetPlayerPos(stunedid, JAIL[rand][0],JAIL[rand][1],JAIL[rand][2]);
            SetCameraBehindPlayer(stunedid);
            SendClientMessage(stunedid,COLOR_GREY,"* You have been arrested! You lost 10000$ and 10 Score");
            GameTextForPlayer(stunedid,"~r~ARRESTED!",3000,3);
            SetPlayerScore(playerid,GetPlayerScore(playerid)+10);
            GivePlayerMoney(playerid,10000);
            SendClientMessage(playerid,COLOR_GREY,"* You arrested Criminal and received 10000$ and 10 Score");
          }
          else SendClientMessage(playerid, COLOR_RED, "ERROR: That player is not stunned!");
        }
        else SendClientMessage(playerid, COLOR_RED, "Usage: /arrest <stuned-playerid>");
    }
    else SendClientMessage(playerid, COLOR_RED, "ERROR: Only Enforcers can use this command!");
    return 1;
}
Untested. Edit: Thanks for noticing drebin
Reply


Messages In This Thread
How Do I Attach These? - by Littlehelper - 02.02.2012, 14:47
Re: How Do I Attach These? - by Littlehelper - 02.02.2012, 15:10
Re: How Do I Attach These? - by vassilis - 02.02.2012, 15:12
Re: How Do I Attach These? - by thimo - 02.02.2012, 15:13
AW: How Do I Attach These? - by Drebin - 02.02.2012, 15:15
Re: How Do I Attach These? - by thimo - 02.02.2012, 15:20
Re: How Do I Attach These? - by Littlehelper - 02.02.2012, 15:22

Forum Jump:


Users browsing this thread: 3 Guest(s)