snipe rifle detect - 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)
+--- Thread: snipe rifle detect (
/showthread.php?tid=473587)
snipe rifle detect -
Ma$$ey - 03.11.2013
Welcome
How to make a script that when you type the command / snipe displayed in the GUI all the list of players who have (even if they have it hidden) gun sniper rifle
Re: snipe rifle detect -
Konstantinos - 03.11.2013
Use foreach for that.
pawn Код:
new
w,
a
;
foreach(new i : Player)
{
for( new j; j != 13; j++ )
{
GetPlayerWeaponData( i, j, w, a );
if( j == 34 )
{
// Playerid i has sniper
}
}
}
Re: snipe rifle detect -
Ma$$ey - 03.11.2013
And you can give the whole code? because I'm pretty green in pawno ..