SA-MP Forums Archive
Reject player from car - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Reject player from car (/showthread.php?tid=92418)



Reject player from car - craponnaruto - 19.08.2009

I need a command where a player that isn't a on the police team*TEAM_POLICE 1*get rejected from a cop car.


Re: Reject player from car - coole210 - 19.08.2009

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(GetVehicleModel(vehicleid) == //VEHICLEID OF COP CAR)
    {
    if(gTeam[playerid] == TEAM_POLICE || ispassenger)
        {
        return 1;
        }
    else
    {
        SendClientMessage(playerid, c_r, "[ ! ] This vehicle is for cops only !");
        new Float:LocX,Float:LocY,Float:LocZ;
        GetPlayerPos(playerid,Float:LocX,Float:LocY,Float:LocZ);
        SetPlayerPos(playerid,Float:LocX,Float:LocY,Float:LocZ);
        return 1;
        }
    }