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

Try this:
PHP код:
COMMAND:w(playeridparams[])
{
    return 
cmd_whisper(playeridparams);
}
COMMAND:whisper(playeridparams[])
{
    if (
PlayerInfo[playerid][pSpawn] == 1){

        new 
idx,string[144],length strlen(params);
        while ((
idx length) && (params[idx] <= ' '))
        {
            
idx++;
        }
        new 
offset idx;
        new 
result[144];
        while ((
idx length) && ((idx offset) < (sizeof(result) - 1)))
        {
            
result[idx offset] = params[idx];
            
idx++;
        }
        
result[idx offset] = EOS;

        if (
PlayerInfo[playerid][pMute] == 1)
        {
            
SCM(playerid,COLOR_ERROR,"#Error: You Muted.");
            return 
1;
        }

        if (!
strlen(result))
        {
            
SendClientMessage(playeridCOLOR_ERROR"USAGE: /whisper (message).");
            return 
1;
        }

        
format(stringsizeof(string), "(WHISPER) %s (%d): %s",PlayerInfo[playerid][pName],playerid,result);
        
SendClientMessage(playerid,GetPlayerColor(playerid), string);
        for (new 
0GetMaxPlayers(); i++)
        {

            
GetClosestPlayer(playerid);
            if (
IsPlayerConnected(i))
            {
                if (
!= playerid)
                {
                    if (
GetDistanceBetweenPlayers(playeridi) < 10)
                    {
                        
SendClientMessage(i,GetPlayerColor(playerid), string);
                    }
                }
            }
        }

    }else{
        
SendClientMessage(playeridCOLOR_ERROR"You Cannot Use This Command When You're Dead.");
    }

    return 
1;

Post the log of crashdetect.dll
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)