SA-MP Forums Archive
Sumo - 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: Sumo (/showthread.php?tid=413876)



Sumo - Louris - 07.02.2013

Code:
if(dialogid == 321)
{
if(response)
{
if(listitem == 0)
{
for(new i; i < MAX_PLAYERS; i++)
{
Sumoprasidejes[i] = true;
}
if(listitem == 1)
{
for(new i; i < MAX_PLAYERS; i++)
{
Sumoprasidejes[i] = false;
}
}
}
}
}

        COMMAND:tpsumo( playerid, params[ ] )
{
        for(new i; i < MAX_PLAYERS; i++)
        if(Sumoprasidejes[i]) return SendClientMessage(playerid, 0xDEEE20FF, "Registracija uћdaryta!");
        if(DM[playerid]) return SendClientMessage(playerid, 0xDEEE20FF, "Jūs DM zonoje!");
        if(TMDM[playerid]) return SendClientMessage(playerid, 0xDEEE20FF, "Jūs Team DM zonoje!");
        SetPlayerPos(playerid,1572.8695,-1238.7939,277);
        return
1;
}

The problem is when admin chose listitem == 1, it doesn't works.. It writes
Code:
if(Sumoprasidejes[i]) return SendClientMessage(playerid, 0xDEEE20FF, "Registracija uћdaryta!");
always.