Posts: 409
Threads: 40
Joined: May 2009
Reputation:
0
I've been wondering... What is the script line to give ALL players a weapon?
Sorry I knew this before but I forgot and searched everywhere!
Thanks
-SampStunta
Posts: 6,129
Threads: 36
Joined: Jan 2009
With
foreach, I've made this function for you:
pawn Код:
stock giveWeaponToAllPlayers(weaponid, ammo) {
foreach(Player, x) {
GivePlayerWeapon(x, weaponid, ammo);
}
return 1;
}
Quote:
Originally Posted by Monty_Burns
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { PlayerPlaySound(i,1057,0.0,0.0,0.0); GivePlayerWeapon(i,weap,ammo); //Change weap && ammo to what your weapon and ammo should be. }
has willsuckformoney sayed
|
You just copied his code
completely...