19.08.2009, 23:45
I need a command where a player that isn't a on the police team*TEAM_POLICE 1*get rejected from a cop car.
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;
}
}