AFK Help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: AFK Help (
/showthread.php?tid=152635)
AFK Help -
Sascha - 05.06.2010
Hi, I wanted to make a kind of AFK system, but it doesn't work...if I use /afk it doesn't change my name... I don't get an error though..
here is a part of the Command
Код:
new string[256], name[256], pname[MAX_PLAYER_NAME];
PlayerData[playerid][SName] = GetPlayerName(playerid, pname, sizeof(pname));
format(name, sizeof(name), "!AFK!%s", pname);
format(string, sizeof(string), "RLRP Bot: %s is AFK.", pname);
SendClientMessageToAll(ORANGE, string);
SetPlayerName(playerid, name);
printf("---RLRP Bot: %s is afk", pname);
return 1;
the SName is defined as SName[MAX_PLAYER_NAME]
ty
Re: AFK Help -
DJDhan - 05.06.2010
Код:
new string[256], name[256], pname[MAX_PLAYER_NAME];
PlayerData[playerid][SName] = GetPlayerName(playerid, pname, sizeof(pname));
format(name, sizeof(name), "!AFK!%s", pname);
SetPlayerName(playerid, name);
format(string, sizeof(string), "RLRP Bot: %s is AFK.", pname);
SendClientMessageToAll(ORANGE, string);
printf("---RLRP Bot: %s is afk", pname);
return 1;