SendClientMessageToAll +1 rep
#7

https://sampwiki.blast.hk/wiki/Function:...ntMessageToAll
https://sampwiki.blast.hk/wiki/GetPlayerName
https://sampwiki.blast.hk/wiki/Format

You'll need those 3 functions ^

when you don't know what funtion it is just go to ****** and search for what you want, like "Player Name samp wiki" and you'll get it right away.

anyway, since I'm in a coding mood here's what you have to do:
pawn Код:
if (strcmp("/afk", cmdtext, true) == 0)
{
     new String[280], Name[MAX_PLAYER_NAME];
     SendClientMessage(playerid, 0xFFFF00C8 , "You have activated AFK mode,Use /back to return to the game!");
     GetPlayerName(playerid, Name, sizeof(Name));
     format(String, sizeof(String), "[INFO] %d (%s) is now AFK!", playerid, Name);
     SendClientMessageToAll(0xFFFF00C8 , String);
     SetPlayerHealth(playerid, 1000000000);
     TogglePlayerControllable(playerid,0);
     return 1;
}
EDIT:
Seriously, my net is so pro, just noticed that this topic got over helped xD
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)