SAM Help - 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: SAM Help (
/showthread.php?tid=277757)
SAM Help -
Ludesert31 - 19.08.2011
Hello, I saw this topic ==>
https://sampforum.blast.hk/showthread.php?tid=115695
I use this include, and it works perfectly, but now I want to make the sams to fire only on a defined team. All in a filterscript.
My teams are defined in my GM, they are cops and gangsta.
Is it possible to do that ?
Thanks a lot =)
Re : SAM Help -
Ludesert31 - 21.08.2011
HEEEEEEEEEEEEELP PLEASE !!!
Re: SAM Help -
Pinguinn - 21.08.2011
pawn Code:
for new(i; i < MAX_PLAYERS; i++)
{
if(gTeam[i] == ...)
{
// disable SAM here
}
else
{
// enable SAM here
}
}
Re : SAM Help -
Ludesert31 - 21.08.2011
Yes, but it's in a filterscript, and the teams are defined in the GM. And take a lok at the include, I think it's the include that I must change ... Can you look at the include to help me please ? =)
Re: SAM Help -
Pinguinn - 21.08.2011
Not sure if it works. If you get an error, post it
pawn Code:
for new(i; i < MAX_PLAYERS; i++)
{
if(gTeam[i] == ...)
{
SAM_cancel(samid);
}
}
Re : SAM Help -
Ludesert31 - 21.08.2011
Quote:
You must use return 0; to cancel a SAM from firing now. SAM_cancel(); NO LONGER EXISTS!
|
I saw this. Where must I return 0 ?
Re: SAM Help -
PowerPC603 - 21.08.2011
If each team has a different skin, then you can check the skin to determine in what team a player is.
So your filterscript doesn't need to know anything about the gamemode.
Re : SAM Help -
Ludesert31 - 21.08.2011
Yeah, that's a good idea.
The teams are Cops ang Gangstas.
Cops ID = 4, 5, 6, 7
Gangstas ID = 0, 1, 2, 3
How can I set the SAM fire only on >Cops or Gangstas ?