Raised This Month: $12 Target: $400
 3% 

give_item to all players


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
m_pro_m
Junior Member
Join Date: Nov 2010
Old 11-19-2010 , 10:25   give_item to all players
Reply With Quote #1

Hi, i am new in this forum ...
I speak English only little

Here is my problem :
Code:
give_item(id , "weapon_m4a1")
When I wanted that m4a1 will have all players, I changed id to 0 .
But it doesnt work
What I must do ?

Last edited by m_pro_m; 11-19-2010 at 10:32.
m_pro_m is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-19-2010 , 10:35   Re: give_item to all players
Reply With Quote #2

Loop through all players.
__________________
Arkshine is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 11-19-2010 , 10:38   Re: give_item to all players
Reply With Quote #3

Basically when a native doesn't support index 0 as all players, you make a loop:
Code:
new players[32], count; get_players(players, count, "a");   for (new i; i < count; i++)         give_item(players[i], "weapon_m4a1");
This will go through all alive players and give them M4A1.
__________________
hleV is offline
Leon_12
Senior Member
Join Date: Jul 2010
Location: Bulgaria
Old 11-19-2010 , 10:45   Re: give_item to all players
Reply With Quote #4

if you use id its only for one player not for all if you use player or players i'm not sure you'll give to all players
Leon_12 is offline
Send a message via Skype™ to Leon_12
m_pro_m
Junior Member
Join Date: Nov 2010
Old 11-19-2010 , 11:01   Re: give_item to all players
Reply With Quote #5

Thank YOU !

It was helpful
m_pro_m is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:54.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode