SA-MP Forums Archive
Help with Jail... - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help with Jail... (/showthread.php?tid=79926)



Help with Jail... - gecatahh - 31.05.2009

Any one can help me ??

pawn Код:
new jailcell1_status = 1;
new jailcell2_status = 1;
new jailcell3_status = 1;
new jailcell4_status = 1;
new jailcell5_status = 1;
new jailcell6_status = 1;
new jailcell7_status = 1;



if(strcmp(cmdtext, "/cell", true) == 0)
{
    if(PlayerInfo[playerid][Leader] == 1)
    {
        new x_nr[256];
        x_nr = strtok(cmdtext, idx);
        if(!strlen(x_nr))
        {
        SendClientMessage(playerid, COLOR_WHITE, "|__________________ Cell help __________________|");
        SendClientMessage(playerid, COLOR_WHITE, "USAGE: /cell [cellid]");
        SendClientMessage(playerid, COLOR_GREY, "CELL'S ID: 1,2,3,4,5,6,7");
        SendClientMessage(playerid, COLOR_WHITE, "|________________________________________________|");
        return 1;
        }
        if(strcmp(x_nr,"1",true) == 0)
        {
        if(jailcell1_status == 1)
        {
                MoveStreamedObject(JailGate[1], -510.654938, 2551.714111, 42.437794,3);
                SendClientMessage(playerid, COLOR_RED, "CELL 1 IT'S OPEN");
                jailcell1_status = 0;
            }
            else if(jailcell1_status == 0)
            {
                MoveStreamedObject(JailGate[1], -510.654938, 2551.714111, 52.437794,7);
                SendClientMessage(playerid, COLOR_GREEN, "CELL 1 IT'S CLOSED");
            jailcell1_status = 1;
            }
        }
        else if(strcmp(x_nr,"2",true) == 0)
        {
            if(jailcell2_status == 1)
            {
                MoveStreamedObject(JailGate[2], -519.187744, 2551.722412, 42.449818,3);
                SendClientMessage(playerid, COLOR_RED, "CELL 2 IT'S OPEN");
                jailcell2_status = 0;
            }
            else if(jailcell2_status == 0)
            {
                MoveStreamedObject(JailGate[2], -519.187744, 2551.722412, 52.449818,7);
            SendClientMessage(playerid, COLOR_GREEN, "CELL 2 IT'S CLOSED");
            jailcell2_status = 1;
            }
        }
        else if(strcmp(x_nr,"3",true) == 0)
        {
            if(jailcell3_status == 1)
            {
                MoveStreamedObject(JailGate[3], -528.001526, 2551.718018, 42.474804,3);
                SendClientMessage(playerid, COLOR_RED, "CELL 3 IT'S OPEN");
                jailcell3_status = 0;
            }
            else if(jailcell3_status == 0)
            {
                MoveStreamedObject(JailGate[3], -528.001526, 2551.718018, 52.474804,7);
            SendClientMessage(playerid, COLOR_GREEN, "CELL 3 IT'S CLOSED");
            jailcell3_status = 1;
            }
        }
        else if(strcmp(x_nr,"4",true) == 0)
        {
            if(jailcell4_status == 1)
            {
                MoveStreamedObject(JailGate[4], -536.766418, 2551.675293, 42.424847,3);
                SendClientMessage(playerid, COLOR_RED, "CELL 4 IT'S OPEN");
                jailcell4_status = 0;
            }
            else if(jailcell4_status == 0)
            {
                MoveStreamedObject(JailGate[4], -536.766418, 2551.675293, 52.424847,7);
            SendClientMessage(playerid, COLOR_GREEN, "CELL 4 IT'S CLOSED");
            jailcell4_status = 1;
            }
        }
        else if(strcmp(x_nr,"5",true) == 0)
        {
            if(jailcell5_status == 1)
            {
                MoveStreamedObject(JailGate[5], -542.499634, 2555.284180, 42.405003,3);
                SendClientMessage(playerid, COLOR_RED, "CELL 5 IT'S OPEN");
                jailcell5_status = 0;
            }
            else if(jailcell5_status == 0)
            {
                MoveStreamedObject(JailGate[5], -542.499634, 2555.284180, 52.449818,7);
            SendClientMessage(playerid, COLOR_GREEN, "CELL 5 IT'S CLOSED");
            jailcell5_status = 1;
            }
        }
        else if(strcmp(x_nr,"6",true) == 0)
        {
            if(jailcell6_status == 1)
            {
                MoveStreamedObject(JailGate[6], -542.287109, 2564.196045, 42.449818,3);
                SendClientMessage(playerid, COLOR_RED, "CELL 6 ITS OPEN");
                jailcell6_status = 0;
            }
            else if(jailcell6_status == 0)
            {
                MoveStreamedObject(JailGate[6], -542.287109, 2564.196045, 52.449818,7);
            SendClientMessage(playerid, COLOR_GREEN, "CELL 6 ITS CLOSED");
            jailcell6_status = 1;
            }
        }
        else if(strcmp(x_nr,"7",true) == 0)
        {
            if(jailcell7_status == 1)
            {
                MoveStreamedObject(JailGate[7], -542.013245, 2573.026367, 42.449818,3);
                SendClientMessage(playerid, COLOR_RED, "CELL 7 ITS OPEN");
                jailcell7_status = 0;
            }
            else if(jailcell7_status == 0)
            {
                MoveStreamedObject(JailGate[7], -542.013245, 2573.026367, 52.449818,7);
            SendClientMessage(playerid, COLOR_GREEN, "CELL 7 ITS CLOSED");
            jailcell7_status = 1;
            }
        }
    }
    else
    {
        SendClientMessage(playerid, COLOR_GREY, "You Are not a Cop!");
    }
    return 1;
}

In game i get Unknown command please help!!!!


Re: Help with Jail... - gecatahh - 31.05.2009

Any one can help


Re: Help with Jail... - Correlli - 31.05.2009

1. stop spamming your topics.
2. upload big codes to pastebin.


Re: Help with Jail... - gecatahh - 31.05.2009

3.only admins can make warns!


Re: Help with Jail... - HuRRiCaNe - 31.05.2009

4. Here there are no admins, Only Moderators


Re: Help with Jail... - Correlli - 31.05.2009

Quote:
Originally Posted by gecatahh
3.only admins can make warns!
No, i can remind you what forum rules are as well as admins.


Quote:
Originally Posted by alfixer
4. Here there are no admins, Only Moderators
Only Kye is admin.


Re: Help with Jail... - Correlli - 31.05.2009

Delete this.


Re: Help with Jail... - gecatahh - 31.05.2009

Like you say stop spamming, Any one can help ??


Re: Help with Jail... - bineboy - 01.06.2009

post the errors


Re: Help with Jail... - gecatahh - 01.06.2009

That it's problem - No errors , every thing its fine.

But in game when i do /cell 1(or another) --> Unknown Command