[HELP] My Simple AFK System
#1

I made this AFK system and it works fine, but i need help going back... When im npr. at bank i type AFK and im afk, but when i type /back then im at same spot... Here is the script...
Код:
//AFK System
	if (!strcmp("/afk", cmdtext))
	{
	if(PlayerInfo[playerid][pAdmin] > 1)
	{
	new Float:cx, Float:cy, Float:cz;
	GetPlayerPos(playerid, cx, cy, cz);
	new string[256];
	new sendername[MAX_PLAYER_NAME];
	GetPlayerName(playerid, sendername, sizeof(sendername));
	SetPlayerHealth(playerid, 10000)
	SetPlayerPos(playerid, 0,0,5)
	SetPlayerInterior(playerid, 5)
	format(string, sizeof(string), "* %s je Sada AFK.", sendername);
	SendClientMessageToAll(0xFFD700AA, string);
	}
	return 1;
	}

	if (!strcmp("/back", cmdtext))
	{
	if(PlayerInfo[playerid][pAdmin] > 1)
	{
	new string[256];
	new sendername[MAX_PLAYER_NAME];
	new Float:cx, Float:cy, Float:cz;
	GetPlayerName(playerid, sendername, sizeof(sendername));
	SetPlayerHealth(playerid, 50)
	SetPlayerPos(playerid, cx, cy, cz);
	SetPlayerInterior(playerid, 0)
	format(string, sizeof(string), "* %s Nije Vise AFK.", sendername);
	SendClientMessageToAll(0xFFD700AA, string);
	}
	return 1;
	}
Reply


Messages In This Thread
[HELP] My Simple AFK System - by Phantomkiller - 10.12.2011, 12:44
Re: [HELP] My Simple AFK System - by Roberto Saviano - 10.12.2011, 12:47
Re: [HELP] My Simple AFK System - by Phantomkiller - 10.12.2011, 12:48
Re: [HELP] My Simple AFK System - by Roberto Saviano - 10.12.2011, 13:14
Re: [HELP] My Simple AFK System - by suhrab_mujeeb - 10.12.2011, 13:24
Re: [HELP] My Simple AFK System - by Phantomkiller - 10.12.2011, 13:39
Re: [HELP] My Simple AFK System - by suhrab_mujeeb - 10.12.2011, 13:45

Forum Jump:


Users browsing this thread: 2 Guest(s)