22.11.2009, 20:01
Hi, can somebody explain to me how i can make a shorter code to add Nos to all vehicles? this is what i have..
Thats the vehicleid, now here is cb.
My issue is, its only adding the nos to the last vehicle on that list. So how can i do it without re-making 500 "if(vehicleid"'s?
pawn Код:
lilgunna = AddStaticVehicleEx(560, 288.13833618164, 2472.4133300781, 16.281105041504, 0.000000, -1, -1, 60); //32
lilgunna = AddStaticVehicleEx(560, 284.63854980469, 2472.4951171875, 16.281105041504, 0.000000, -1, -1, 60); //33
lilgunna = AddStaticVehicleEx(560, 280.38958740234, 2472.5947265625, 16.281105041504, 0.000000, -1, -1, 60); //34
lilgunna = AddStaticVehicleEx(560, 276.63958740234, 2472.6826171875, 16.281105041504, 0.000000, -1, -1, 60); //35
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if (vehicleid == lilgunna)
{
AddVehicleComponent(lilgunna, 1010); // Nitro
}
return 1;
}
My issue is, its only adding the nos to the last vehicle on that list. So how can i do it without re-making 500 "if(vehicleid"'s?