09.03.2011, 16:37
(
Последний раз редактировалось Mean; 10.03.2011 в 12:43.
)
Well, example with ZCMD
Gives sawnoffs to everyone.
EDIT: In loops, to reduce lag, you should use IsPlayerConnected.
pawn Код:
stock GiveLoopWeapon(weapon_id)
{
for (new p = 0; p < MAX_PLAYERS; p++) { GivePlayerWeapon(p, weapon_id, 9999); }
}
CMD:sawntoall( playerid, params[ ] )
{
GiveLoopWeapon( 26 );
return 1;
}
EDIT: In loops, to reduce lag, you should use IsPlayerConnected.
pawn Код:
stock GiveLoopWeapon(weapon_id)
{
for (new p = 0; p < MAX_PLAYERS; p++) if(IsPlayerConnected(p)) { GivePlayerWeapon(p, weapon_id, 9999); }
}