[Ajuda] Hospital
#8

Aqui funcionou certinho tente.


PHP код:
stock GetProxHosp(playerid)
{
    if(!
IsPlayerConnected(playerid)) return 0;
    new 
Float:Hospital[][4] =
    {
        {-
2651.6501634.45100014.4531180.0},
        {
1173.58420, -1324.561515.1953270.0},
        {
2031.94150, -1404.357817.2614165.0},
        {
1582.561501768.7921010.820390.00},
        {-
318.815001050.8890020.3403360.0},
        {-
1514.79592522.8506055.82460.000},
        {-
2200.2214, -2306.545230.6250320.0},
        {
1242.37130328.45200019.7555335.0}
    };
    new 
hospitalproximo;
    for(new 
hospid 0Float:prevdistFloat:disthospid sizeof(Hospital); hospid++)
    {
        
dist GetPlayerDistanceFromPoint(playeridHospital[hospid][0], Hospital[hospid][1], Hospital[hospid][2]);
        if(
hospid == || dist prevdistprevdist disthospitalproximo 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;

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: 2 Guest(s)