SA-MP Forums Archive
Message Help (+rep) - 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: Message Help (+rep) (/showthread.php?tid=488316)



Message Help (+rep) - ScripteRMKD - 17.01.2014

fixed


Re: Message Help (+rep) - iOxide - 17.01.2014

Its because, the SendClientMessageToAll or SendClientMessage shouldn't be under the looping process. i.e for(new i = 0; i <MAX_PLAYERS; i++)

You should put the message sending method outside it.
Try this one and tell me what happens.

pawn Код:
if(strcmp(cmd, "/zemioruzjeall", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pAdmin] >= 1337)
            {
                for(new i; i < MAX_PLAYERS; i++)
                {
                    ResetPlayerWeapons(i);
                }
                format(string, sizeof(string), "Admin %s go odzema oruzjeto na site igraci", sendername);
                SendClientMessageToAll(COLOR_TEO, string);
            }
        }
        return 1;
    }



Re: Message Help (+rep) - ScripteRMKD - 17.01.2014

Fixed ) Repped thanks


Re: Message Help (+rep) - ReD_HunTeR - 17.01.2014

Код:
if(strcmp(cmd, "/zemioruzjeall", true) == 0)    
{
        if(IsPlayerConnected(playerid))        
        {
            if(PlayerInfo[playerid][pAdmin] >= 1337)
            {
                for(new i; i < MAX_PLAYERS; i++)
                {
                    ResetPlayerWeapons(i);              
                }
                format(string, sizeof(string), "Admin %s go odzema oruzjeto na site igraci", sendername);                    
                SendClientMessageToAll(COLOR_TEO, string);  
            }
        }        
        return 1;
 }