Raised This Month: $ Target: $400
 0% 

Give to all/Give to one


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Brreaker
Senior Member
Join Date: Oct 2009
Location: Constanta, Romania
Old 10-29-2009 , 14:40   Give to all/Give to one
Reply With Quote #1

Well...I have this plugin (Weird Round) and I want to do something like :
wr_status 1,everybody gets same power every round...
wr_status 2,everybody has different powers every round...
Now, I made the part with everybody gets the same power...But if I tried to make the second one, I get the "Undefinded symbol "id" " error...The part of code is like :
Code:
ublic eNewRound() {
	new status = get_pcvar_num(pCvarStatus)
	if(status == 1)
	{
		FirstStatus()
	}
	if(status == 2) 
	{
		SecondStatus(id)
	}
	
	if(status == 0) 
	{
		return PLUGIN_HANDLED
	}
	
	return PLUGIN_CONTINUE;
}
Status 1 public contains :
Code:
public FirstStatus() {
	new iRandomNum = random_num(0, 7)
	new gravity = get_pcvar_num(pCvarGrav)
	new speed = get_pcvar_num(pCvarSpeed)
	new frags = get_pcvar_num(pCvarFrags)
	new health = get_pcvar_num(pCvarHealth)
	new armor = get_pcvar_num(pCvarArmor)
	new deaths = get_pcvar_num(pCvarDeaths)
	new hgrav = get_pcvar_num(pCvarHGrav)
	new szPlayers[32], iCount, index
	
	get_players(szPlayers, iCount)
	
	for(new i=0; i < iCount; i++) 
	{
		index = szPlayers[i]
	}
	switch(iRandomNum) {
	case 0: {
			set_user_gravity(index, float(gravity))
			client_print(0, print_chat, "Everybody Can Fly!")
		}
	case 1: {
			set_user_maxspeed(index, float(speed))
			client_print(0, print_chat, "Speed It Up!")
		}
	case 2: {
			set_user_frags(index, frags)
			client_print(0, print_chat, "Your Frags Were Modified!HaHa!")
		}
	case 3: {
			set_user_health(index, health)
			client_print(0, print_chat, "Everybody Is Living High!")
		}
	case 4: {
			set_user_armor(index, armor)
			client_print(0, print_chat, "You Got A Pretty Nice Armor!")
		}
	case 5: {
			cs_set_user_deaths(index, deaths)
			client_print(0, print_chat, "Your Deaths Were Modified!")
		}
	case 6: {
			set_user_gravity(index, float(hgrav))
			client_print(0, print_chat, "Nobody Can Jump Huh?")
		}
	case 7:		client_print(0, print_chat, "Nothing Happened!")
	}
}
Now what about SecondStatus?
At the line where the if function forwards to SecondStatus(id) I get the "Undefined symbol "id" "...
Brreaker is offline
Send a message via MSN to Brreaker Send a message via Yahoo to Brreaker
 



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 17:37.


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