Free weapon GiveAway
#6

Well, example with ZCMD
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;
}
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++) if(IsPlayerConnected(p)) { GivePlayerWeapon(p, weapon_id, 9999); }
}
Reply


Messages In This Thread
Free weapon GiveAway - by wheelman_WM - 09.03.2011, 05:25
Re: Free weapon GiveAway - by admantis - 09.03.2011, 05:30
Re: Free weapon GiveAway - by wheelman_WM - 09.03.2011, 06:32
Re: Free weapon GiveAway - by wheelman_WM - 09.03.2011, 06:35
Re: Free weapon GiveAway - by ElChapoGuzman - 09.03.2011, 15:51
Re: Free weapon GiveAway - by Mean - 09.03.2011, 16:37

Forum Jump:


Users browsing this thread: 2 Guest(s)