Free weapon GiveAway
#1

He i want help about i want a script in which anyplayer id recieves any weapons freeaway.
Reply
#2

pawn Код:
stock GiveLoopWeapon(weapon_id)
{
     for (new p = 0; p < MAX_PLAYERS; p++) { GivePlayerWeapon(p, weapon_id, 9999); }
}
Usage:
pawn Код:
GiveLoopWeapon(22); // Gives Desert Eagle to all.
Reply
#3

can i see this code anywhere
Reply
#4

showing error
C:\Users\Bhupesh\Downloads\Compressed\samp\gamemod es\lvdm.pwn(513) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

Can u make a fs or give me a fs code here
Reply
#5

Quote:
Originally Posted by wheelman_WM
Посмотреть сообщение
showing error
C:\Users\Bhupesh\Downloads\Compressed\samp\gamemod es\lvdm.pwn(513) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

Can u make a fs or give me a fs code here
it actually works lol
Reply
#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


Forum Jump:


Users browsing this thread: 1 Guest(s)