AFK Help
#1

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
Reply
#2

Код:
  
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;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)