SA-MP Forums Archive
Can you tell me why my cmd dont work - 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: Can you tell me why my cmd dont work (/showthread.php?tid=175155)



[HEL] Please look at this - zack3021 - 08.09.2010

Ok when i type /lgate it does not open the gate or closes it, i compiled it without errors

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/lgate", cmdtext, true, 10) == 0)
    {
        if(gateopen == 1)
        {
               new pskin = GetPlayerSkin(playerid);
            if(pskin == 265 || pskin == 266 || pskin == 267 || pskin == 280 || pskin == 281 || pskin == 284 || pskin == 285 || pskin == 286 || pskin == 287 || pskin == 288)
                 {
            gateopen = 0;
            MoveObject(lgate,2681.3083496094, 659.74249267578, 11.495002746582,3.0);
            SendClientMessage(playerid,0xFFFF00FF,"You have just opened the front gate");
            return 1;
                }
               else
                {
            gateopen = 1;
            MoveObject(lgate,2680.9462890625, 651.83990478516, 11.495002746582,3.0);
            SendClientMessage(playerid,0xFFFF00FF,"You have just closed the front gate");
        }
            return SendClientMessage(playerid, 0xFF0000AA, "You are not a law enforcer!");
    }
        return 1;
}



Re: Can you tell me why my cmd dont work - zack3021 - 08.09.2010

no help


Re: Can you tell me why my cmd dont work - Mike_Peterson - 08.09.2010

dno if it works
Код:
else if(gateopen == 0)