Raised This Month: $ Target: $400
 0% 

Seems to be an problem..


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KyleD
Member
Join Date: Mar 2005
Location: Anchorage, AK
Old 04-21-2005 , 02:08   Seems to be an problem..
Reply With Quote #1

Ok, when I go to test this and select the a certain race it will show that I selected every single race. I was also wondering if someone could tell me how to make it so a player has to be a certain class to select a race. I tried the != but it didnt seem to work...

Code..

Code:
public do_chooserace(id,key)  {      if(key == 0) {          if((g_playerclass[id] = class_covenant) && (g_race[id] == race_grunt))          client_print(id,print_chat,"[HaloMod] You're already a Grunt. Select a different race.")          changerace(id)      } else if((g_playerclass[id] == class_covenant) && (g_race[id] == race_grunt)) {          client_print(id,print_chat,"[HaloMod] You are now a Grunt under the Convenants.")      } else if(g_playerclass[id] != class_covenant) {          client_print(id,print_chat,"[HaloMod] You must be a Covenant to select this.")      }      if(key == 1) {          if((g_playerclass[id] = class_covenant) && (g_race[id] == race_jackel))          client_print(id,print_chat,"[HaloMod] You're already a Jackel. Select a different race.")          changerace(id)      } else if((g_playerclass[id] = class_covenant) && (g_race[id] = race_jackel)) {          client_print(id,print_chat,"[HaloMod] You are now a Jackel under the Convenants.")      } else if(g_playerclass[id] != class_covenant) {          client_print(id,print_chat,"[HaloMod] You must be a Covenant to select this.")          return PLUGIN_HANDLED;      }      if(key == 2) {          if((g_playerclass[id] = class_covenant) && (g_race[id] == race_elite))          client_print(id,print_chat,"[HaloMod] You're already an Elite. Select a different race.")          changerace(id)      } else if((g_playerclass[id] = class_covenant) && (g_race[id] = race_elite)) {          client_print(id,print_chat,"[HaloMod] You are now an Elite under the Covenants.")      } else if(g_playerclass[id] != class_covenant) {          client_print(id,print_chat,"[HaloMod] You must be a Covenant to select this.")          return PLUGIN_HANDLED;      }      if(key == 3) {          if((g_playerclass[id] = class_spartan) && (g_race[id] == race_marine))          client_print(id,print_chat,"[HaloMod] You're already a Marine. Select a different race.")          changerace(id)      } else if((g_playerclass[id] = class_spartan) && (g_race[id] = race_marine)) {          client_print(id,print_chat,"[HaloMod] You are now a Marine under the Spartans.")      } else if(g_playerclass[id] != class_spartan) {          client_print(id,print_chat,"[HaloMod] You must be a Spartan to select this.")          return PLUGIN_HANDLED;      }      if(key == 4) {          if((g_playerclass[id] = class_spartan) && (g_race[id] == race_forerunner))          client_print(id,print_chat,"[HaloMod] You're already a Forerunner. Select a different race.")          changerace(id)      } else if((g_playerclass[id] = class_spartan) && (g_race[id] = race_forerunner)) {          client_print(id,print_chat,"[HaloMod] You are now a Forerunner under the Spartans")      } else if(g_playerclass[id] != class_spartan) {          client_print(id,print_chat,"[HaloMod] You must be a Spartan to select this.")          return PLUGIN_HANDLED;      }      ShowHUD(id)      return PLUGIN_HANDLED;  }
__________________
KyleD is offline
Send a message via MSN to KyleD
slurpycof
Senior Member
Join Date: Nov 2004
Old 04-21-2005 , 05:19  
Reply With Quote #2

try this
Code:
    if(key == 3) {         if((g_race[id] == race_marine)){             client_print(id,print_chat,"[HaloMod] You're already a Marine. Select a different race.")             changerace(id)         } else if((g_playerclass[id] = class_spartan)) {             client_print(id,print_chat,"[HaloMod] You are now a Marine under the Spartans.")             return PLUGIN_HANDLED         } else{             client_print(id,print_chat,"[HaloMod] You must be a Spartan to select this.")             changerace(id)         }     }
slurpycof is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 04-21-2005 , 13:37  
Reply With Quote #3

Seems as though there's a lot of people making plugins involving races and such.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 04-21-2005 , 15:20  
Reply With Quote #4

ARGH!

Code:
if(variable = value)
will ALWAYS return true, just to let you know. You do this several times throughout your plugin. I can't say it's the cause of the problem, but it does create its own problems, liking making variable now equal value.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Dot.Infinity
Junior Member
Join Date: Sep 2005
Location: Miami, FL
Old 09-23-2005 , 23:00  
Reply With Quote #5

nice kyled, im impressed how hard your working on this plugin
i expect good progress from u .. keep up the good work
Dot.Infinity is offline
Send a message via AIM to Dot.Infinity Send a message via MSN to Dot.Infinity Send a message via Yahoo to Dot.Infinity
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 09-24-2005 , 00:28  
Reply With Quote #6

I want to know how your making this plugin....like what similarities to halo are there. Becase 1) I thought everyone had given up on this mod 2) becuase I had my own ideas on what to do and i think i could help you.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Reply


Thread Tools
Display Modes

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 10:01.


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