Remove from vehicle
#1

I know the coding but how do i remove a player from vehicle if they get into a Police Department car?
P.S i know the code

RemovePlayerFromVehicle(playerid)
Reply
#2

Under the OnPlayerStateChange callback you need to do a check to see if he's becoming the driver of a vehicle, if he is, and the vehicle is a police car, call the code you have right there.
Reply
#3

under OnPlayerStateChange :
Код:
new vehicleid = GetVehicleId(playerid);
new modelid = GetVehicleModel(vehicleid);
if(gTeam != Team_Cops) 
{
if(modelid == cops car)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,COLOR_RED,"You Have To Be A Cop To Get In This Car");
}
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)