06.08.2010, 21:14
Why are you using a table (more space) if you got only 1 function in it?
Try
Add someone in OnPlayerCommandText
Remove the Cars[Police] =, and add also at your OnPlayerEnterVehicle
Try
pawn Code:
new Cars[MAX_VEHICLES];
new Skins[MAX_PLAYERS];
new Job[MAX_PLAYERS];
pawn Code:
if(!strcmp(cmdtext, "/police", true))
{
Job[playerid] = 1;
return 1;
}
if(!strcmp(cmdtext, "/civilian", true))
{
Job[playerid] = 0;
return 1;
}
pawn Code:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(GetVehicleModel(vehicleid))
{
switch(GetVehicleModel))
{
case 596, 598, 597:
{
if(Job[playerid] != 1) return RemovePlayerFromVehicle(vehicleid); // kicks them when they'r not job 1 == police
return 1;
}
}
}
return 1;
}