13.04.2016, 19:56
The function is never called for some reason
I tried debugging using printf the vehicle id but nothing pops on console
stock and usage:
Stock
OnPlayerEnterVehicle
I tried debugging using printf the vehicle id but nothing pops on console
stock and usage:
Stock
PHP код:
stock IsPilotVehicle(vehicleid)
{
printf("Test: %s.", vehicleid);
for(new i=0; i<2; i++)
{
if(vehicleid == JobInfo[JOB_PILOT][jCars][i]) return 1;
}
return 0;
}
PHP код:
else if(IsPilotVehicle(vehicleid))
{
printf("Test = %i.", vehicleid);
if(PlayerInfo[playerid][pJob] != JOB_PILOT && PlayerInfo[playerid][pVIPJob] != JOB_PILOT)
{
printf("TEST = %i.",vehicleid);
new Float:pos[3];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SendClientMessage(playerid, COLOR_ORANGE, "You cannot start the engine as it belongs to the Los Santos Airline Company.");
}
}