26.01.2018, 18:31
Код:
CMD:arena1(playerid, params[]) { new Float:health, name[MAX_PLAYER_NAME], str[128]; GetPlayerHealth(playerid, health); AFKTime[playerid] = SetTimer("AFKCheck",1000,1); new arenainterior = GetPlayerInterior(playerid); if(health < 90) return SendClientMessage(playerid, -1, "{c3c3c3}(INFO) You must have atleast 90 HP in order to go to the arena"); if(arenainterior == 18) return SendClientMessage(playerid, -1, "{c3c3c3}(INFO) You're already inside arena1, Use /aleave to leave"); else { InArena1[playerid] = 1; SetPlayerVirtualWorld(playerid, 2); SetPlayerInterior(playerid, 18); new randomarena1 = random(sizeof(RandomArena1Spawns)); SetPlayerPos(playerid, RandomArena1Spawns[randomarena1][0],RandomArena1Spawns[randomarena1][1],RandomArena1Spawns[randomarena1][2]); SetPlayerFacingAngle(playerid, RandomArena1Spawns[randomarena1][3]); GetPlayerName(playerid, name, sizeof(name)); format(str, sizeof(str), "{4286f4}(INFO) %s has teleported to Arena 1, To go there type /arena1.", name); SendClientMessageToAll(-1, str); GivePlayerWeapon(playerid, 24, 999); GivePlayerWeapon(playerid, 25, 999); } return 1; }