Raised This Month: $ Target: $400
 0% 

errors 29 and 30


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Mini_Midget
Veteran Member
Join Date: Jan 2006
Location: It's a mystery.
Old 05-24-2006 , 05:29  
Reply With Quote #7

thxs everyone who helped me out especially Hawk
the plugin works fine now and i added some things but now i've come across a bug in my plugin
when i start a new game, my name is Pte. Mini_Midget
(Pte. means Private) and when I get my first kill in the server, my rank
and name should change to "Cpl. Mini_Midget" but instead it changes to
"Cpl. Pte. Mini_Midget". i change my name and then it resets back to normal "Cpl. Mini_Midget"
btw, when a user connects, i can't get the client_print code to show in game

Code:
#include <amxmodx> #include <amxmisc> #define PLUGIN  "Army Ranks" #define VERSION "0.1" #define AUTHOR  "Mini_Midget" public plugin_init()     {     register_plugin(PLUGIN, VERSION, AUTHOR); } public client_connect(id)     {     new newName[33]     get_user_info(id,"name",newName,32)         if(containi(newName,"Pte.") == -1)         {         format(newName,32,"Pte. %s",newName)         set_user_info(id,"name",newName)           client_print(id, print_chat, "G'day Private %s", newName)     } } public client_infochanged(id)     {     new newName[33]     get_user_info(id,"name",newName,32)         if(get_user_frags(id) >= 1 && containi(newName,"Cpl.") == -1)         {         format(newName,32,"Cpl. %s",newName)         set_user_info(id,"name",newName)           client_print(id, print_chat, "Congratulations Private! You are now promoted to Corporal!")     } } public client_putinserver(id)     set_task(20.0,"client_infochanged",id)
i forgot to credit hawk for doing the part when a user connects and he changes his name
http://forums.alliedmods.net/showthread.php?t=28761
__________________
It's a mystery.
Mini_Midget is offline
 



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 16:23.


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