PoliceCars only for Police Officers - 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: PoliceCars only for Police Officers (
/showthread.php?tid=37157)
PoliceCars only for Police Officers -
luma - 23.05.2008
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.
Re: PoliceCars only for Police Officers -
wafffllesss - 23.05.2008
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;
}
}
Re: PoliceCars only for Police Officers -
luma - 23.05.2008
good joke -.-
Re: PoliceCars only for Police Officers -
wafffllesss - 23.05.2008
Quote:
Originally Posted by luma
good joke -.-
|
=]
(sorry but i needed to do it :P )
Re: PoliceCars only for Police Officers -
alleras - 23.05.2008
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
Re: PoliceCars only for Police Officers -
luma - 24.05.2008
but i thing this for all players... bu t cops should drive police cars...
Re: PoliceCars only for Police Officers -
Damon_Black - 24.05.2008
Yes, all you have to do is add a faction check.
P.S. - don't copy and paste the code above. (bad brackets)
Re: PoliceCars only for Police Officers -
Mobst3r111 - 27.05.2009
yes its called learning to code? why dnt u just fix it its not hard :P
Re: PoliceCars only for Police Officers -
Jakku - 27.05.2009
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;
}
}
|