SA-MP Forums Archive
Help me for Freeze 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: Help me for Freeze command (/showthread.php?tid=560490)



Help me for Freeze command - Cr3dO - 28.01.2015

PHP код:
if(strcmp(cmd"/eventfreezeall"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            if (
PlayerInfo[playerid][pAdmin] >= 5)
            {
                for(new 
0MAX_PLAYERSi++)
                {
                    if(
eventon(i) == 1)
                {
                    
TogglePlayerControllable(i0);
                    
format(stringsizeof(string), "ADMIN: Замрази всички в евента");
                    
SendClientMessage(iCOLOR_ORANGEstring);
                }
            }
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GRAD1"Ти не си админ!");
            }
        }
        return 
1;
    } 
PHP код:
D:\Olcay\StreetWar\gamemodes\Credo.pwn(7055) : error 012invalid function callnot a valid address
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(7055) : warning 215expression has no effect
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(7055) : error 001expected token";"but found ")"
D:\Olcay\StreetWar\gamemodes\Credo.pwn(7055) : error 029invalid expressionassumed zero
D
:\Olcay\StreetWar\gamemodes\Credo.pwn(7055) : fatal error 107too many 
7055 - if(eventon(i) == 1)
Help me please...


Re: Help me for Freeze command - Sawalha - 28.01.2015

show me your definition of eventon variable


Re: Help me for Freeze command - arlindi - 28.01.2015

Why you dont use if ( eventon [ i ] ) Try this meaby work


Re: Help me for Freeze command - M0HAMMAD - 28.01.2015

pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(eventon[i] == 1) // here ! changed (i) to [i]
        {
            TogglePlayerControllable(i, 0);
            format(string, sizeof(string), "ADMIN: C,аi`?ази вn~ички в a*вa*i'o`а");
            SendClientMessage(i, COLOR_ORANGE, string);
        }
    }