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

odd problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
knekter
Senior Member
Join Date: Mar 2004
Location: PA
Old 03-24-2004 , 08:23   odd problem
Reply With Quote #1

Right now, im working on a current bug for my plugin, the Insane Pistol Arena. But im having a slight problem, everything works, except only the first person gets all the pistols, everyone else gets the speed, glow, health ect. To give everyone all the pistols, I used a for loop. Here it is:

*edit: sry about indentations, the small code f***ed it up....

Code:
public StartRound()  // called at start of new round {     if(ArenaOn == true)  // if arena is on start the commands below     {     new players[32], numberofplayers, i, cur_id  // gets number of players in server         get_players(players,numberofplayers)         // and use the commands below on them         for (i=0;i<numberofplayers;i++)         {         cur_id = players[i]             client_cmd(cur_id,"drop weapon_shield")  // if they have a shield it will drop it             cs_set_user_money(cur_id,0)  // set their money to 0             new red = random_num(50,255)  // randomizes the color red             new green = random_num(50,255)  // randomizes the color green             new blue = random_num(50,255)  // randomizes the color blue         set_user_rendering(cur_id,kRenderFxGlowShell,red,green,blue,kRenderNormal,16)         give_item(cur_id,"weapon_deagle")             give_item(cur_id,"ammo_50ae")             give_item(cur_id,"ammo_50ae")              give_item(cur_id,"ammo_50ae")                  give_item(cur_id,"ammo_50ae")                  give_item(cur_id,"ammo_50ae")                  give_item(cur_id,"ammo_50ae")                    give_item(cur_id,"ammo_50ae")                      give_item(cur_id,"weapon_glock18")                    give_item(cur_id,"ammo_9mm")                      give_item(cur_id,"ammo_9mm")                      give_item(cur_id,"ammo_9mm")                      give_item(cur_id,"ammo_9mm")                      give_item(cur_id,"ammo_9mm")                      give_item(cur_id,"ammo_9mm")                      give_item(cur_id,"ammo_9mm")                      give_item(cur_id,"ammo_9mm")                      give_item(cur_id,"weapon_usp")                    give_item(cur_id,"ammo_45acp")                      give_item(cur_id,"ammo_45acp")                      give_item(cur_id,"ammo_45acp")                      give_item(cur_id,"ammo_45acp")                      give_item(cur_id,"ammo_45acp")                      give_item(cur_id,"ammo_45acp")                      give_item(cur_id,"ammo_45acp")                      give_item(cur_id,"ammo_45acp")                      give_item(cur_id,"weapon_p228")                    give_item(cur_id,"ammo_357sig")                give_item(cur_id,"ammo_357sig")                give_item(cur_id,"ammo_357sig")                give_item(cur_id,"ammo_357sig")                  give_item(cur_id,"ammo_357sig")                  give_item(cur_id,"ammo_357sig")                    give_item(cur_id,"weapon_fiveseven")                give_item(cur_id,"ammo_57mm")                give_item(cur_id,"ammo_57mm")                give_item(cur_id,"ammo_57mm")                give_item(cur_id,"ammo_57mm")                  give_item(cur_id,"weapon_elite")              give_item(cur_id,"ammo_9mm")                    give_item(cur_id,"ammo_9mm")                    give_item(cur_id,"ammo_9mm")                    give_item(cur_id,"ammo_9mm")                    give_item(cur_id,"item_assaultsuit")         give_item(cur_id,"weapon_hegrenade")         set_user_health(cur_id,get_cvar_num("arena_health"))  // set their health         set_cvar_num("sv_maxspeed",800)                  client_cmd(cur_id,"cl_forwardspeed 800")  // sets users forward speed         client_cmd(cur_id,"cl_sidespeed 800")  // sets users sidespeed         client_cmd(cur_id,"cl_backspeed 800")  // sets users backspeed         set_user_maxspeed(cur_id,float(800))         return PLUGIN_CONTINUE     }         return PLUGIN_CONTINUE     }     return PLUGIN_HANDLED }

Why isn't this working?
__________________
More updates for Matrix Mod!
knekter is offline
Send a message via AIM to knekter Send a message via MSN to knekter
BAILOPAN
Join Date: Jan 2004
Old 03-24-2004 , 10:31  
Reply With Quote #2

there is a bug in give_item

see if the next release fixes it
__________________
egg
BAILOPAN is offline
MagicShot
Senior Member
Join Date: Mar 2004
Location: MN
Old 03-24-2004 , 11:53  
Reply With Quote #3

Does it Work in the Current CVS bail?
__________________
|v|agic$hot
.
Without a Sound
MagicShot is offline
Send a message via MSN to MagicShot Send a message via Yahoo to MagicShot
BAILOPAN
Join Date: Jan 2004
Old 03-24-2004 , 12:00  
Reply With Quote #4

yes
release is today if not, tomorrow
__________________
egg
BAILOPAN is offline
knekter
Senior Member
Join Date: Mar 2004
Location: PA
Old 03-24-2004 , 19:43   ummmm
Reply With Quote #5

how exactly does this CVS work, what do I do with it?
__________________
More updates for Matrix Mod!
knekter is offline
Send a message via AIM to knekter Send a message via MSN to knekter
devicenull
Veteran Member
Join Date: Mar 2004
Location: CT
Old 03-24-2004 , 20:54  
Reply With Quote #6

If you have to ask - don't bother
Its a way to share changes in the source of a program - meaning you would have to compile amxx to get the update.

Just wait for the update- or just get the include files from the CVS
__________________
Various bits of semi-useful code in a bunch of languages: http://code.devicenull.org/
devicenull 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 21:01.


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