06.10.2011, 03:23
pawn Code:
new truck[6];
new VehicleID[MAX_PLAYERS];//in this function this variable have no use
//-------------------------------
OnGameModeInit
truck[0] = CreateVehicle(515,616.83020020,1660.73547363,8.14590836,64.00000000,-1,-1,500);
truck[1] = CreateVehicle(515,613.18267822,1657.07287598,8.14590836,66.00000000,-1,-1,500);
truck[2] = CreateVehicle(514,608.20312500,1654.12878418,7.69186258,66.00000000,-1,-1,500);
truck[3] = CreateVehicle(514,602.98663330,1651.26123047,7.69186258,66.00000000,-1,-1,500);
truck[4] = CreateVehicle(403,599.76226807,1647.28845215,7.69218779,66.00000000,-1,-1,500);
truck[5] = CreateVehicle(403,594.54644775,1644.41662598,7.69218779,66.00000000,-1,-1,500);
//OnPlayerStateChange
new carid = GetPlayerVehicleID(playerid);
if(newstate == PLAYER_STATE_DRIVER && carid>=truck[0] && carid<=truck[5])
{
//Put the dialog here
}