[HELP] removePlayerFromVehicle
#2

Here's an example for this:

At the top of your script.
pawn Код:
new AdminVehicle;
Insert AdminVehicle = .... into OnGameModeInit, EXAMPLE:
pawn Код:
public OnGameModeInit()
{
    AdminVehicle = AddStaticVehicle(...);
    return 1;
}
This is when he presses enter.
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new vehicle = GetPlayerVehicleID(playerid);
    if(vehicle == AdminVehicle && !IsPlayerAdmin(playerid)) // If this is an admin vehicle and he's not an rcon admin.
    {
        RemovePlayerFromVehicle(playerid);
        SendClientMessage(playerid, 0xFFFFFFAA, "This is an admin vehicle, you can't drive it.");
    }
    return 1;
}
Reply


Messages In This Thread
[HELP] removePlayerFromVehicle - by yarrum3 - 15.01.2011, 11:55
Re: [HELP] removePlayerFromVehicle - by Toreno - 15.01.2011, 12:08
Re: [HELP] removePlayerFromVehicle - by Alexy_Dramon - 10.03.2012, 12:37
Re: [HELP] removePlayerFromVehicle - by Rac3r - 10.03.2012, 12:50

Forum Jump:


Users browsing this thread: 1 Guest(s)