SendClientMessageToAll +1 rep
#4

pawn Код:
if(!strcmp("/afk", cmdtext, true))
{
     SendClientMessage(playerid, 0xFFFF00C8 , "You have activated AFK mode. Use /back to return to the game!");
     SetPlayerHealth(playerid, 99999.0);
     TogglePlayerControllable(playerid, 0);
     new fstr[55], name[MAX_PLAYER_NAME];
     GetPlayerName(playerid, name, sizeof(name));
     format(fstr, sizeof(fstr), "[INFO] Player %s is now AFK.", name);
     SendClientMessageToAll(-1, fstr);
     return 1;
}
Sources:
https://sampwiki.blast.hk/wiki/Format
https://sampwiki.blast.hk/wiki/GetPlayerName
https://sampwiki.blast.hk/wiki/SendClientMessageToAll
Reply


Messages In This Thread
SendClientMessageToAll +1 rep - by [SU]Spartan - 17.06.2014, 13:33
Re: SendClientMessageToAll +1 rep - by Rittik - 17.06.2014, 13:37
Re: SendClientMessageToAll +1 rep - by Konstantinos - 17.06.2014, 13:37
Re: SendClientMessageToAll +1 rep - by Threshold - 17.06.2014, 13:39
Re: SendClientMessageToAll +1 rep - by Sojo12 - 17.06.2014, 13:39
Re: SendClientMessageToAll +1 rep - by [SU]Spartan - 17.06.2014, 13:41
Re: SendClientMessageToAll +1 rep - by Kimossab - 17.06.2014, 13:42

Forum Jump:


Users browsing this thread: 1 Guest(s)