14.02.2015, 15:18
i want when player use /afk , Write on top his skin (AFK)
help
help
PHP код:
CMD:afk(playerid,params[])
{
if(AFK[playerid] == 1)
{
return SendClientMessage(playerid,COLOR_RED,"You're Already In AFK");
}
new string[128];
new PNAME[MAX_PLAYER_NAME];
new vehicleid;
vehicleid = GetPlayerVehicleID(playerid);
AFK[playerid] = 1;
SetPlayerHealth(playerid,999999999);
SetVehicleHealth(vehicleid,9999999999);
GetPlayerHealth(playerid,OldHealth);
GetVehicleHealth(vehicleid,OldHealth);
SendClientMessage(playerid,GREEN,"You're Now In AFK");
GetPlayerName(playerid, PNAME, MAX_PLAYERS);
format(string, sizeof(string), "{ffff00}%s now away from keyboard", PNAME);
SendClientMessageToAll(COLOR_BLUE,string);
TogglePlayerControllable(playerid,0);
return 1;
}