/arrest still not working
#1

ok so i finished scripting a /arrest cmd but its not working, can someone plz fix it, or tell me whats wrorng, thanks
pawn Код:
if(strcmp("/arrest", cmdtext, true, 7) == 0)
    {
        if(gTeam[playerid] != TEAM_COP) return SendClientMessage(playerid, COLOR_RED, "You Are Not A Cop. Only Cops Can Use This Command.");
        if(strlen(cmdtext[8]) == playerid) return SendClientMessage(playerid,COLOR_RED,"You Cannot Arrest Yourself, Idoit.");

        if(strlen(cmdtext[8]) == 0){

        new closest[MAX_PLAYERS];
        new closestlvl;
        closest[playerid] = GetClosestPlayer(1);
        closestlvl = GetPlayerWantedLevel(closest[playerid]);
        if(closestlvl >= 4)
        {


        new copname[MAX_PLAYER_NAME];
        new cmdname[MAX_PLAYER_NAME], string[128];

        GetPlayerName(playerid, copname, sizeof(cmdname));
        GetPlayerName(strval(cmdtext[8]), cmdname, sizeof(cmdname));

        format(string, sizeof(string), "%s (%d) Has Been Arested By Officer %s (%d)", cmdname,strval(cmdtext[8]),copname,playerid);
        SendClientMessageToAll(COLOR_PURPLE, string);

        new rand;
        rand = random(sizeof(AJail));
        SetPlayerInterior(strval(cmdtext[8]), 3);
        SetPlayerPos(strval(cmdtext[8]), AJail[rand][0], AJail[rand][1], AJail[rand][2]);
        gPlayerJailed[playerid] = 1;
        SetPlayerWantedLevel(strval(cmdtext[8]),0);

        return 1;
        } else return SendClientMessage(playerid,COLOR_RED,"No Wanted Players Close Enough TO Arrest.");

        }
       
        return 1;
    }
Reply


Messages In This Thread
/arrest still not working - by StrickenKid - 25.02.2009, 22:47
Re: /arrest still not working - by brett7 - 25.02.2009, 23:43
Re: /arrest still not working - by StrickenKid - 26.02.2009, 00:00
Re: /arrest still not working - by Jefff - 26.02.2009, 00:24
Re: /arrest still not working - by Salmon - 26.02.2009, 02:00

Forum Jump:


Users browsing this thread: 1 Guest(s)