A weird bug with my aleave command
#3

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


Messages In This Thread
A weird bug with my aleave command - by ivndosos - 26.01.2018, 18:12
Re: A weird bug with my aleave command - by RowdyrideR - 26.01.2018, 18:25
Re: A weird bug with my aleave command - by ivndosos - 26.01.2018, 18:31
Re: A weird bug with my aleave command - by rfr - 26.01.2018, 18:45
Re: A weird bug with my aleave command - by ivndosos - 26.01.2018, 18:51

Forum Jump:


Users browsing this thread: 3 Guest(s)