11.08.2011, 01:43
Quote:
RemovePlayerFromVehicle wont work in OnPlayerEnterVehicle
Just use OnPlayerStateChange and the state PLAYER_STATE_DRIVER |
EDIT: This code should work for you. There is a new variable at the top, learn where it goes.
pawn Code:
new iRVehicle; // This needs to be the vehicle ID of "Robert's" vehicle.
public OnPlayerStateChange(playerid,newstate,oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
if(GetPlayerVehicleID(playerid) == iRVehicle))
{
new szName[MAX_PLAYER_NAME];
GetPlayerName(playerid, szName, sizeof(szName));
if(!strcmp(szName, "Robert", false)) return 1;
else RemovePlayerFromVehicle(playerid, GetPlayerVehicleID(playerid)), SendClientMessage(playerid, 0xFFFFFFFF, "GET THE FUCK OUT!!! THIS VEHICLE BELONGS TO ROBERT!!!");
}
}
return 1;
}