PoliceCars only for Police Officers
#1

Hey Guys... how I can make, when a Civilan enter a Policecar got Kicked out of The Car. And a Police Officer or so on (form Police) were not kicked form the car? Its like some Policecars at the Godfather.
Reply
#2

Quote:
Originally Posted by luma
Hey Guys... how I can make, when a Civilan enter a Policecar got Kicked out of The Car. And a Police Officer or so on (form Police) were not kicked form the car? Its like some Policecars at the Godfather.
OnPlayerStateChange

if(new == question_asked_3_times_a_day)
{
UseSearchButton(USE);
return billions resusts;
}

}
Reply
#3

good joke -.-
Reply
#4

Quote:
Originally Posted by luma
good joke -.-
=]

(sorry but i needed to do it :P )
Reply
#5

Look for the AddStaticVehicle(blah blah blah

add behind AddStaticVehicle(blah blah blah xD police1

like this:

Code:
police1 = AddStaticVehicle(blah blah blah
in OnPlayerEnterVehicle
Code:
if(GetPlayerVehicleID(playerid) == police1)
RemovePlayerFromVehicle(playerid);
}
An example...if you have 5 police cars you have to do this:
Code:
police1 = AddStaticVehicle(blah blah blah
police2 = AddStaticVehicle(blah blah blah
police3 = AddStaticVehicle(blah blah blah
police4 = AddStaticVehicle(blah blah blah
police5 = AddStaticVehicle(blah blah blah
in OnPlayerEnterVehicle
Code:
if(GetPlayerVehicleID(playerid) == police1)
RemovePlayerFromVehicle(playerid);
}
if(GetPlayerVehicleID(playerid) == police2)
RemovePlayerFromVehicle(playerid);
}
if(GetPlayerVehicleID(playerid) == police3)
RemovePlayerFromVehicle(playerid);
}
if(GetPlayerVehicleID(playerid) == police4)
RemovePlayerFromVehicle(playerid);
}
if(GetPlayerVehicleID(playerid) == police5)
RemovePlayerFromVehicle(playerid);
}
Thats it

Reply
#6

but i thing this for all players... bu t cops should drive police cars...
Reply
#7

Yes, all you have to do is add a faction check.

P.S. - don't copy and paste the code above. (bad brackets)

Reply
#8

yes its called learning to code? why dnt u just fix it its not hard :P
Reply
#9

Quote:
Originally Posted by wafffllesss
Quote:
Originally Posted by luma
Hey Guys... how I can make, when a Civilan enter a Policecar got Kicked out of The Car. And a Police Officer or so on (form Police) were not kicked form the car? Its like some Policecars at the Godfather.
OnPlayerStateChange

if(new == question_asked_3_times_a_day)
{
UseSearchButton(USE);
return billions resusts;
}

}
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)