[Ajuda] Hospital
#1

new bool: sHospital[MAX_PLAYERS][8];

public OnPlayerSpawn(playerid):
Код:
if(sHospital[playerid][0])
	{
	    SetPlayerPos(playerid,-2652.4170,633.1534,14.4531);
	    sHospital[playerid][0] = 0;
	}
	else if(sHospital[playerid][1])
	{
	    SetPlayerPos(playerid,-2207.6372,-2285.8066,30.6250);
	    sHospital[playerid][1] = 0;
	}
	else if(sHospital[playerid][2])
	{
	    SetPlayerPos(playerid,1173.3130,-1323.3795,15.3935);
	    sHospital[playerid][2] = 0;
	}
	else if(sHospital[playerid][3])
	{
	    SetPlayerPos(playerid,2029.2570,-1419.2135,16.9922);
	    sHospital[playerid][3] = 0;
	}
	else if(sHospital[playerid][4])
	{
	    SetPlayerPos(playerid,1244.6365,332.0834,19.5547);
	    sHospital[playerid][4] = 0;
	}
	else if(sHospital[playerid][5])
	{
	    SetPlayerPos(playerid,-319.9589,1050.6843,20.3403);
	    sHospital[playerid][5] = 0;
	}
	else if(sHospital[playerid][6])
	{
	    SetPlayerPos(playerid,607.0730,1819.1471,10.8280);
	    sHospital[playerid][6] = 0;
	}
	else if(sHospital[playerid][7])
	{
	    SetPlayerPos(playerid,-1514.7872,2523.3406,55.8154);
	    sHospital[playerid][7] = 0;
	}
public OnPlayerDeath(playerid, killerid, reason)
Код:
272: sHospital[playerid][8] = 1;
Код:
(272) : error 032: array index out of bounds (variable "sHospital")
Nгo sei se estб correto o modo que estou fazendo, Mas o que eu gostaria de fazer й o seguinte : Quando player morrer nascer no hospital mais prуximo, estou fazendo no modo correto? Alguem poderia ajudar?
Reply


Messages In This Thread
Hospital - by BuDweiSeR - 15.12.2017, 16:04
Re: Hospital - by Cidiei - 15.12.2017, 16:17
Re: Hospital - by IlanZ - 15.12.2017, 16:18
Re: Hospital - by JeffSantos2 - 15.12.2017, 16:22
Re: Hospital - by BuDweiSeR - 15.12.2017, 17:18
Re: Hospital - by Marllun - 15.12.2017, 18:01
Re: Hospital - by JeffSantos2 - 15.12.2017, 18:04
Re: Hospital - by Marllun - 15.12.2017, 18:20
Re: Hospital - by BuDweiSeR - 15.12.2017, 20:08

Forum Jump:


Users browsing this thread: 3 Guest(s)