Linking a car to a team? - 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: Linking a car to a team? (
/showthread.php?tid=122325)
Linking a car to a team? -
JoeDaDude - 21.01.2010
How to link a car to a team,
So like a team vehicle, So only one team can enter it,
Re: Linking a car to a team? -
`FuTuRe- - 21.01.2010
I am using this.
pawn Код:
public OnVehicleStreamIn(vehicleid, forplayerid)
{
if(vehicleid == XXXXX) {
if(GetPlayerTeam(forplayerid) == XXXXX) {
SetVehicleParamsForPlayer(XXXXX,forplayerid,1,1);
}
else
{
SetVehicleParamsForPlayer(XXXXX,forplayerid,1,0);
}
}
else if(vehicleid == XXXXX222)
{
if(GetPlayerTeam(forplayerid) == XXXXX222)
{
SetVehicleParamsForPlayer(XXXXX222,forplayerid,1,1);
}
else
{
SetVehicleParamsForPlayer(XXXXX222,forplayerid,1,0);
}
}
Re: Linking a car to a team? -
JoeDaDude - 21.01.2010
How about linking vehicle ids to a certain team
Like
597 = Police Car SFPD,
So like i put 597 and it makes every police car for one team,
You know what i mean, I hope xd