SA-MP Forums Archive
using command - 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)
+--- Thread: using command (/showthread.php?tid=423533)



using command - DarkB0y - 18.03.2013

Player can use the command and i have set it if he is in death match he can't use it but he still idk what the problem the other commands work fine but on this command not working

pawn Код:
CMD:cs(playerid,params[])
    {
        if(Teleport[playerid] == 1)
        {
        SendClientMessage(playerid, COLOR_RED, "You can't teleport when u are in class section");
        return 1;
        }
        if(indeathmatch[playerid] == 1)
        {
        SendClientMessage(playerid, COLOR_RED, "Type /Killme to leave the DM FIRST.");
        return 1;
        }
        else
        {
        ShowPlayerDialog(playerid, CSDIALOG, DIALOG_STYLE_MSGBOX, "{0094FF}MiniGame - Police VS Terrorist","{267F00}Select police or {267F00}terrorist\n\n","Police","Terrorist");
    return 1;
    }
}



Re: using command - Konstantinos - 18.03.2013

Are you sure that when he joins in /cs, it sets "indeathmatch[playerid]" to 1?