CityWide Problem - 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: CityWide Problem (
/showthread.php?tid=75252)
CityWide Problem -
Ov3r - 30.04.2009
I added some new cars in my script(LSPD,SFPD and LVPD Cars) . But I want to make it that ONLY the cops to drive them, so I must modify the kind of the car(Like the IsATaxiCar, IsAnAmbulance etc.). The problem is: HOW can I?!
pawn Код:
public IsACopCar(carid)
{
if (CarInfo[carid][cType]==CARTYPE_COP) return 1;
return 0;
}
How can I make the Car Type of the cars to Cop Car Types?!
Sorry for my bad English.
Re: CityWide Problem -
James_Alex - 30.04.2009
try this one
pawn Код:
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(IsACopCar(vehicleid))
{
if(!IsACop(playerid))
{
new Float:PAX, Float:PAY, Float:PAY;
GetPlayerPos(playerid, PAX, PAY, PAZ);
SetPlayerPos(playerid, PAX, PAY, PAZ);
SendClientMessage(playerid, COLOR_LIGHTRED, "You are not allowed to enter this vehicle(cops only)");
return 1;
}
return 1;
}
}
Re: CityWide Problem -
Ov3r - 30.04.2009
OMG...I don't want to restrict...I want to make a car into a COP CAR One!
Re: CityWide Problem -
Ov3r - 30.04.2009
Anybody? OMG! I am desperate
Re: CityWide Problem -
Weirdosport - 30.04.2009
Quote:
Originally Posted by Ov3r
But I want to make it that ONLY the cops to drive them
|
That's what James' script does foo'
It checks if it's a police car, and checks if the player entering isn't a cop. If they're not a cop, it effectively ejects them.
Re: CityWide Problem -
Ov3r - 30.04.2009
Another one... I want to make a simple car to a cop car...So that script is useless if I don't even have a cop car...
Re: CityWide Problem -
Andom - 30.04.2009
Quote:
Originally Posted by Ov3r
Another one... I want to make a simple car to a cop car...So that script is useless if I don't even have a cop car...
|
You sir, are an idiot (like WeeDar sais)
We are trying to help you, and you response like ''this is not good, i want another script''
Re: CityWide Problem -
Weirdosport - 30.04.2009
The script is only useless because you don't have a ****ing clue what you are asking for...