10.12.2011, 13:24
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;
}