12.07.2012, 11:43
Replace
With:
EDIT: Oops, I was meant to edit the other post 0_o :S
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
{
EnteredVehicle[playerid] = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(EnteredVehicle[playerid], engine, lights, alarm, doors, bonnet, boot, objective);
if(doors == 1)
{
//Remove Player From Vehicle Here
GameTextForPlayer(playerid, "~r~Vehicle Locked!", 5000, 5);
}
}
}
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
EnteredVehicle[playerid] = vehicleid;
GetVehicleParamsEx(EnteredVehicle[playerid], engine, lights, alarm, doors, bonnet, boot, objective);
if(doors == 1)
{
GameTextForPlayer(playerid, "~r~Vehicle Locked!", 5000, 5);
return 1;
}
return 1;
}