[Ajuda] Hospital
#5

Bom, Sou novato na programaзгo, Queria entender o cуdigo acima:
Код:
stock GetProxHosp(playerid)
{
    if(!IsPlayerConnected(playerid)) return 0;
	new Float:Hospital[][4] =
	{
	    {-2651.6501, 634.451000, 14.4531, 180.0},
	    {1173.58420, -1324.5615, 15.1953, 270.0},
		{2031.94150, -1404.3578, 17.2614, 165.0},
		{1582.56150, 1768.79210, 10.8203, 90.00},
		{-318.81500, 1050.88900, 20.3403, 360.0},
		{-1514.7959, 2522.85060, 55.8246, 0.000},
		{-2200.2214, -2306.5452, 30.6250, 320.0},
		{1242.37130, 328.452000, 19.7555, 335.0}
	};
	new hospitalproximo;
	for(new hospid = 0, Float:prevdist, Float:dist; hospid < sizeof(Hospital); hospid++)
	{
		dist = GetPlayerDistanceToPoint(playerid, Hospital[hospid][0], Hospital[hospid][1], Hospital[hospid][2]);

		if(hospid == 0 || dist < prevdist) prevdist = dist, hospitalproximo = hospid;
	}
	SetPVarFloat(playerid, "HospPosX", Hospital[hospitalproximo][0]);
	SetPVarFloat(playerid, "HospPosY", Hospital[hospitalproximo][1]);
	SetPVarFloat(playerid, "HospPosZ", Hospital[hospitalproximo][2]);
	SetPVarFloat(playerid, "HospPosA", Hospital[hospitalproximo][3]);
	return 1;
}
Pois quando vou compilar, hospid e Hospital sгo simbolos indefinidos...
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: 1 Guest(s)