Am i doing it right? [Got little errors]
#3

Quote:
Originally Posted by Mionee
Посмотреть сообщение
You can't format strings like that.

https://sampwiki.blast.hk/wiki/Format

Also, use foreach for player loops.

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(GetPlayerWeapon(killerid) == 38)
    {
        foreach(new i: Player)
        {
            if(IsPlayerAdmin(i))
            {
                new string[110];
               
                format(string, sizeof(string), "{FF0000}%s has been reported automatically by the server[Reason: Minigun], Advice: Spec", killerid);
                SendClientMessage(i, -1, string);
            }
            else
            {
                if(IsPlayerConnected(killerid)) return SendClientMessage(i, -1, "{FF0000}WARNING: %s HAS LEFT THE SERVER", killerid);
            }
        }
    }
    return 1;
}
Same goes for his other line

pawn Код:
SendClientMessage(i, -1, "{FF0000}WARNING: %s HAS LEFT THE SERVER", killerid);
Reply


Messages In This Thread
Am i doing it right? [Got little errors] - by Glossy42O - 02.01.2015, 10:12
Re: Am i doing it right? [Got little errors] - by Dignity - 02.01.2015, 10:15
Re: Am i doing it right? [Got little errors] - by N.K.Stallone - 02.01.2015, 10:17
Re: Am i doing it right? [Got little errors] - by Dignity - 02.01.2015, 10:18
Re: Am i doing it right? [Got little errors] - by Glossy42O - 02.01.2015, 10:21
Re: Am i doing it right? [Got little errors] - by Glossy42O - 02.01.2015, 10:37
Re: Am i doing it right? [Got little errors] - by Ryz - 02.01.2015, 10:53
Re: Am i doing it right? [Got little errors] - by Glossy42O - 02.01.2015, 10:55
Re: Am i doing it right? [Got little errors] - by Ryz - 02.01.2015, 11:04
Re: Am i doing it right? [Got little errors] - by Glossy42O - 02.01.2015, 11:11

Forum Jump:


Users browsing this thread: 2 Guest(s)