Car Spawn Help
#1

so I have this code
PHP код:
          for (new 0sizeof(pdCoords); d++)
          {
            if (
PointToPoint2D(xypdCoords[d][0], pdCoords[d][1]) <= PointToPoint2D(xypdCoords[tvar3][0], pdCoords[tvar3][1])) {
                
tvar4 = -1;
                for (new 
0sizeof(pdCarCoords); b++) {
                    if (
pdCarCoords[b][4] == d+&& holdsv[b] == 0) {
                        
tvar4 b;
                        break;
                    }
                }
                if (
tvar4 != -1) {
                    
moneys1 tvar4;
                }
                
tvar3 d;
            }
        } 
PHP код:
new Float:pdCarCoords[42][5] =
{
    {
1549.322, -1607.10113.363180.0LS_CAR},
    {
1553.322, -1607.10113.363180.0LS_CAR},
    {
1557.322, -1607.10113.363180.0LS_CAR},
    {
1561.322, -1607.10113.363180.0LS_CAR},
    {
1565.322, -1607.10113.363180.0LS_CAR},
    {
1569.322, -1607.10113.363180.0LS_CAR},
    {
1573.322, -1607.10113.363180.0LS_CAR},
    {
1577.322, -1607.10113.363180.0LS_CAR},
    {
1581.322, -1607.10113.363180.0LS_CAR},
    {
1585.322, -1607.10113.363180.0LS_CAR},
    {
641.301, -610.11816.3230.0RC_CAR},
    {
638.101, -610.11816.3230.0RC_CAR},
    {
634.901, -610.11816.3230.0RC_CAR},
    {
631.701, -610.11816.3230.0RC_CAR},
    {-
2177.209, -2368.74130.50751.5FC_CAR},
    {-
2172.623, -2362.96030.60751.5FC_CAR},
    {-
1575.799651.2737.1700.0SF_CAR},
    {-
1581.799651.2737.1700.0SF_CAR},
    {-
1587.799651.2737.1700.0SF_CAR},
    {-
1593.799651.2737.1700.0SF_CAR},
    {-
1599.799651.2737.1700.0SF_CAR},
    {-
1605.799651.2737.1700.0SF_CAR},
    {-
1611.799651.2737.1700.0SF_CAR},
    {-
1582.358673.7757.171180.0SF_CAR},
    {-
1588.358673.7757.171180.0SF_CAR},
    {-
1594.358673.7757.171180.0SF_CAR},
    {-
1400.2752659.71055.66990.0BC_CAR},
    {-
1400.2752656.61055.66990.0BC_CAR},
    {-
1400.2752653.51055.66990.0BC_CAR},
    {-
227.024991.36519.507270.0LV_CAR},
    {-
227.024995.56519.507270.0LV_CAR},
    {-
227.024999.76519.507270.0LV_CAR},
    {-
210.690999.48619.63990.0LV_CAR},
    {-
210.690995.98619.63990.0LV_CAR},
    {
2256.1072477.49410.6020.0T__CAR},
    {
2269.1682477.48810.6020.0T__CAR},
    {
2282.1792477.48710.6020.0T__CAR},
    {
2282.1612459.62510.602180.0T__CAR},
    {
2273.4852460.03010.6020.0T__CAR},
    {
256.1062460.02110.6020.0T__CAR},
    {
2256.0852442.68310.602180.0T__CAR},
    {
2273.5122442.70210.602180.0T__CAR}
};
new 
Float:pdCoords[7][4] =
{
    {
1543.836, -1627.44113.16590.0},
    {
636.889, -574.68316.040180.076},
    {-
2188.499, -2352.59430.329141.5},
    {-
1578.228662.3716.970270.0},
    {-
1413.3602641.15755.46990.0},
    {-
218.8271005.34219.4970.0},
    {
2241.0852453.8410.60290.0}
};
new 
holdsv[sizeof(pdCarCoords)];
new 
pdNames[][] =
{
    {
"Los Santos Police Department"},
    {
"Dillimore Police Department, Red County"},
    {
"Angel Pine Police Department, Whetstone"},
    {
"San Fierro Police Department"},
    {
"El Quebrados Police Department, Tierra Robada"},
    {
"Fort Carson Police Department, Bone County"},
    {
"Las Venturas Police Department"}
}; 
when I am in sf and want to reset car it always spawn at lv why?
PHP код:
CreateVehicle(tvar2pdCarCoords[moneys1][0], pdCarCoords[moneys1][1], pdCarCoords[moneys1][2], pdCarCoords[moneys1][3], vehcol[pvehicle[playerid][0]][0], vehcol[pvehicle[playerid][0]][1], -1); 
tvar2 is the vehicle model
plz help thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)