256 cells.
#4

I am doing a arrest command, it works fine, but i just wanna change the 256 to 128, I don't have strtok function at my GM, i just added to my includes dini. it has strtok.

Anyway, /arrest command:

pawn Код:
if(strcmp(cmd, "/arrest", true) == 0)
    {
        if(gTeam[playerid] != TEAM_COPS) return SendClientMessage(playerid, 0xFF0000AA, "-> You are not a Police Officer.");
           
    new id;
    tmp = strtok(cmdtext, index);
    if(strlen(tmp))
        {
        id = strval(tmp);
        if (IsPlayerConnected(id))
            {
                if (Jailed[id] == 1)
                    {
                    if (Wanted[id] == 1)
                        {
                        SetPlayerPos(id, 1958.3783, 1343.1572, 15.3746);
                        SendClientMessage(id, 0x00FF00AA, "-> You have been jailed for 120 seconds, YOU CRIMINAL!");
                        Jailed[id] = 0;
                        SendClientMessage(playerid, 0x00FF00AA, "-> Player Jailed, Keep the Good work officer!");
                        return 1;
                        }
                       
                        else return SendClientMessage(playerid, 0xFF0000AA, "-> The Player isn't Wanted.");
                        }
                       
                        else return SendClientMessage(playerid, 0xFF0000AA, "-> The Player is already jailed.");
                        }

                        else return SendClientMessage(playerid, 0xFF0000AA, "-> Player not found.");
                        }
                       
                        else return SendClientMessage(playerid, 0xFF0000AA, "-> You mean: /arrest [PlayerID]");
                        }
Reply


Messages In This Thread
256 cells. - by Hot - 18.05.2009, 18:04
Re: 256 cells. - by MenaceX^ - 18.05.2009, 18:34
Re: 256 cells. - by Jefff - 18.05.2009, 18:39
Re: 256 cells. - by Hot - 18.05.2009, 18:45
Re: 256 cells. - by Jefff - 18.05.2009, 19:41
Re: 256 cells. - by MenaceX^ - 18.05.2009, 20:03

Forum Jump:


Users browsing this thread: 1 Guest(s)