/(w)hisper crashes the server lol wtf
#5

What exactly are you trying to do with these lines
Код:
new idx,string[512],length = strlen(params);
		while ((idx < length) && (params[idx] <= ' '))
		{
			idx++;
		}
		new offset = idx;
		new result[512];
		while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
		{
			result[idx - offset] = params[idx];
			idx++;
		}
		result[idx - offset] = EOS;
And also this loop will send the nearest player many messages..
Код:
 for (new i = 0; i < GetMaxPlayers(); i++)
        {

            i = GetClosestPlayer(playerid);
            if (IsPlayerConnected(i))
            {
                if (i != playerid)
                {
                    if (GetDistanceBetweenPlayers(playerid, i) < 10)
                    {
                        SendClientMessage(i,GetPlayerColor(playerid), string);
                    }
                }
            }
        }
If u are trying to send message to all players within range of 10 to playerid then use this
Код:
 for (new i = 0; i < GetMaxPlayers(); i++)
        {
            if (IsPlayerConnected(i))
            {
                if (i != playerid)
                {
                    if (GetDistanceBetweenPlayers(playerid, i) < 10)
                    {
                        SendClientMessage(i,GetPlayerColor(playerid), string);
                    }
                }
            }
        }
Reply


Messages In This Thread
/(w)hisper crashes the server lol wtf - by Ritzy2K - 24.03.2015, 09:52
Re: /(w)hisper crashes the server lol wtf - by ATGOggy - 24.03.2015, 10:16
Re: /(w)hisper crashes the server lol wtf - by KayJ - 24.03.2015, 10:37
Re: /(w)hisper crashes the server lol wtf - by Sew_Sumi - 24.03.2015, 11:29
Re: /(w)hisper crashes the server lol wtf - by BroZeus - 24.03.2015, 11:54
Re: /(w)hisper crashes the server lol wtf - by Sew_Sumi - 24.03.2015, 13:07
Re: /(w)hisper crashes the server lol wtf - by SickAttack - 24.03.2015, 13:12

Forum Jump:


Users browsing this thread: 2 Guest(s)