New coder needs help!
Hey, Im a really new coder and I figured I'd give a try and creating a HideNSeek rules plugin. I can't find what the problem with this is, please help me out:)
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #define PLUGIN "HideNSeekRules" #define VERSION "3.0" #define AUTHOR "Qvantry" #define PREFIX "Your website here" public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("say /rules", "ConnectShowRules"); register_concmd("rules", "ShowRulesConsole"); RegisterHam(Ham_Spawn, "player", "CT_PlayerSpawn", 1); } public client_putinserver(id) { set_task(1.0, "ConnectShowRules", id) } public ConnectShowRules(id) { new iName[64]; get_user_name(id, iName, 33) set_hudmessage(255, 127, 0, 0.055, 0.2, 0, 6.0, 15.0) show_hudmessage(id, "Hi %s and welcome to %s^nIf you don't follow these rules you will be punished.^n ^n1. Obey the rules!^n2. No hacking!^n3. Spamming and/or yelling!^n4. No advertising!^n5. No funnyjumping(CT)!^n6. No free killing!^n7. No bad disconnecting!^n8. No underblocking!^n9. No understabing!^n10. Hiders are allowed to camp for 60 seconds!^n11. Do NOT retry if you die early!^n12. No spawnkilling!^n ^nVisit our website at your website here for more info!", iName, PREFIX) } public CT_PlayerSpawn(id) { new iName[64]; get_user_name(id, iName, 33) set_hudmessage(255, 127, 0, 0.055, 0.2, 0, 6.0, 15.0) show_hudmessage(id, "If you don't follow these rules you will be punished.^n ^n1. Obey the rules!^n2. No hacking!^n3. Spamming and/or yelling!^n4. No advertising!^n5. No funnyjumping(CT)!^n6. No free killing!^n7. No bad disconnecting!^n8. No underblocking!^n9. No understabing!^n10. Hiders are allowed to camp for 60 seconds!^n11. Do NOT retry if you die early!^n12. No spawnkilling!^n ^nVisit our website at your website here for more info!", iName, PREFIX) } public CT_PlayerSpawn(id) if(cs_get_user_team(id) == CS_TEAM_CT) set_task(2.0, "CT_PlayerSpawn", id) else return; } public ShowRulesConsole(id) { new iName[64]; get_user_name(id iName, 33) console_print(id,"Hi %s, if you don't follow these rules you will be punished!"); console_print(id,"1. Obey the rules!"); console_print(id,"No hacking!"); console_print(id,"No advertising!"); console_print(id,"No funnyjumping(CT)!"); console_print(id,"No free killing!"); console_print(id,"No bad disconnecting!"); console_print(id,"No underblocking!"); console_print(id,"No understabing!"); console_print(id,"Hiders are allowed to camp for 60 seconds!"); console_print(id,"Do NOT retry if you die early in the round!"); console_print(id,"No spawnkilling(10seconds)!"); console_print(id,"Respect the admins!"); } |
Re: New coder needs help!
/* Plugin generated by AMXX-Studio */
#include <amxmodx> #include <hamsandwich> #include <cstrike> #define PLUGIN "HideNSeekRules" #define VERSION "3.0" #define AUTHOR "Qvantry" #define PREFIX "Your website here" public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("say /rules", "RoundStart"); register_concmd("rules", "ShowRulesConsole"); RegisterHam(Ham_Spawn, "player", "CT_PlayerSpawn", 1); } public client_putinserver(id) { set_task(1.0, "ConnectShowRules", id) } public ConnectShowRules(id) { new iName[64]; get_user_name(id, iName, 33) set_hudmessage(255, 127, 0, 0.055, 0.2, 0, 6.0, 12.0) show_hudmessage(id, "Hi %s and welcome to %s^nIf you don't follow these rules you will be punished.^n ^n1. Obey the rules!^n2. No hacking!^n3. Spamming and/or yelling!^n4. No advertising!^n5. No funnyjumping(CT)!^n6. No free killing!^n7. No bad disconnecting!^n8. No underblocking!^n9. No understabing!^n10. Hiders are allowed to camp for 60 seconds!^n11. Do NOT retry if you die early!^n12. No spawnkilling!^n ^nVisit our website at your website here for more info!", iName, PREFIX) } public RoundStart(id) { new iName[64]; get_user_name(id, iName, 33) set_hudmessage(255, 127, 0, 0.055, 0.2, 0, 6.0, 10.0) show_hudmessage(id, "If you don't follow these rules you will be punished.^n ^n1. Obey the rules!^n2. No hacking!^n3. Spamming and/or yelling!^n4. No advertising!^n5. No funnyjumping(CT)!^n6. No free killing!^n7. No bad disconnecting!^n8. No underblocking!^n9. No understabing!^n10. Hiders are allowed to camp for 60 seconds!^n11. Do NOT retry if you die early!^n12. No spawnkilling!^n ^nVisit our website at your website here for more info!", iName, PREFIX) } public CT_PlayerSpawn(id) if(cs_get_user_team(id) == CS_TEAM_CT) set_task(0.5, "RoundStart", id) else return; public ShowRulesConsole(id) { console_print(id,"If you don't follow these rules you will be punished!"); console_print(id,"1. Obey the rules!"); console_print(id,"2. No hacking!"); console_print(id,"3. No advertising!"); console_print(id,"4. No funnyjumping(CT)!"); console_print(id,"5. No free killing!"); console_print(id,"6. No bad disconnecting!"); console_print(id,"7. No underblocking!"); console_print(id,"8. No understabing!"); console_print(id,"9. Hiders are allowed to camp for 60 seconds!"); console_print(id,"10. Do NOT retry if you die early in the round!"); console_print(id,"11. No spawnkilling(10seconds)!"); console_print(id,"12. Respect the admins!"); } Managed to fix it, thanks anyway! :) |
Re: New coder needs help!
next time, use [php][ /php] tags.
|
Re: New coder needs help!
And please do not double post
|
| All times are GMT -4. The time now is 10:05. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.