09.07.2013, 20:10
Hello, I'm working on a dynamic filterscript. However there is one issue, when I spawn the vehicle it wont assign the correct id to the correct vehicle.
I also have a command to teleport me to a specifyed vehicle and it dosent take me to the correct vehicleID I get when I enter the vehicle
pawn Код:
stock SpawnCars()
{
for(new ID = 0; ID < sizeof(VehInfo); ID++)
{
if(!(VehInfo[ID][VehCreated] == 0))
{
new plate[12];
VEHICL[ID] = CreateVehicle(VehInfo[ID][VehType], VehInfo[ID][VehSpawnX], VehInfo[ID][VehSpawnY], VehInfo[ID][VehSpawnZ], VehInfo[ID][VehZAngle], VehInfo[ID][VehColor1], VehInfo[ID][VehColor2], -1);
}
}
return 1;
}
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new string[64];
format(string, sizeof(string),"you enterd vehicle ID :%d",VEHICL[vehicleid]);
SCM(playerid, COLOR_GREEN, string);
return 1;
}