[HELP] My Simple AFK System
#5

pawn Код:
//Top of your script
    new Float:cx[MAX_PLAYERS], Float:cy[MAX_PLAYERS], Float:cz[MAX_PLAYERS];
// Under you OnPlayerCommandText
if (!strcmp("/afk", cmdtext))
    {
    if(PlayerInfo[playerid][pAdmin] > 1)
    {
    GetPlayerPos(playerid, cx[playerid], cy[playerid], cz[playerid]);
    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];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    SetPlayerHealth(playerid, 50)
    SetPlayerPos(playerid, cx[playerid], cy[playerid], cz[playerid]);
    SetPlayerInterior(playerid, 0)
    format(string, sizeof(string), "* %s Nije Vise AFK.", sendername);
    SendClientMessageToAll(0xFFD700AA, string);
    }
    return 1;
    }
Try this, untested.
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: 1 Guest(s)