Admin owned vehicles
#4

Quote:
Originally Posted by [XST]O_x
Посмотреть сообщение
pawn Код:
new aVeh;

public OnGameModeInit()
{
   aVeh = CreateVehicle(/**/);
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER && GetPlayerVehicleID(playerid) == aVeh && !IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid, -1, "SERVER: You are not allowed to enter this vehicle. Good-bye.");
        RemovePlayerFromVehicle(playerid); // Kicks him out of the car instead of the server ;)
    }
    return 1;
}
Edited a small bit
Reply


Messages In This Thread
Admin owned vehicles - by Riven - 28.03.2013, 19:09
Re: Admin owned vehicles - by [XST]O_x - 28.03.2013, 19:19
Re: Admin owned vehicles - by Riven - 28.03.2013, 19:36
Re: Admin owned vehicles - by judothijs - 28.03.2013, 19:38
Re: Admin owned vehicles - by Riven - 28.03.2013, 19:44
Re: Admin owned vehicles - by Konstantinos - 28.03.2013, 19:46
Re: Admin owned vehicles - by BigGroter - 28.03.2013, 19:47
Re: Admin owned vehicles - by Pawnie - 28.03.2013, 20:17
Re: Admin owned vehicles - by Riven - 28.03.2013, 20:23
Re: Admin owned vehicles - by [XST]O_x - 28.03.2013, 22:51

Forum Jump:


Users browsing this thread: 4 Guest(s)