15.01.2011, 12:08
Here's an example for this:
At the top of your script.
Insert AdminVehicle = .... into OnGameModeInit, EXAMPLE:
This is when he presses enter.
At the top of your script.
pawn Код:
new AdminVehicle;
pawn Код:
public OnGameModeInit()
{
AdminVehicle = AddStaticVehicle(...);
return 1;
}
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;
}