Raised This Month: $ Target: $400
 0% 

About A Plugin That Compiled Successfully but Doesn't Work


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Jess98
Junior Member
Join Date: Apr 2018
Old 12-19-2018 , 06:45   About A Plugin That Compiled Successfully but Doesn't Work
Reply With Quote #1

Hi, I have made a simple plugin which gives ammo packs to players who use the valid nicknames that I wrote when they connect server. As I said in the title, it compiled without any errors. I also tried it with the forward "client_putinserver()" but still same. What's wrong with this?

Code:
#include <amxmodx>
#include <zombieplague>

#define PLUGIN "Giving Ammo Packs When Valid Nicknames Perception"
#define VERSION "1.0"
#define AUTHOR "Jess"

public plugin_init() {

       register_plugin(PLUGIN, VERSION, AUTHOR)

       register_clcmd("say /sil", "Event_Of_Remove_Ammo_Packs")
       register_clcmd("say /sil", "Event_Of_Remove_Ammo_Packs")
}

public client_connect(ID) {

       new Get_Player_Name[32]
       get_user_name(ID, Get_Player_Name, charsmax(Get_Player_Name))

       if(equali(Get_Player_Name, "Alex"))
       {
              client_print_color(ID, ID, "^4Hey, welcome to the server. You have got ^399999 Ammo Packs. ^4Enjoy the game!")
              client_print_color(ID, ID, "^4Hey, welcome to the server. You have got ^399999 Ammo Packs. ^4Enjoy the game!")
              client_print_color(ID, ID, "^4Hey, welcome to the server. You have got ^399999 Ammo Packs. ^4Enjoy the game!")

              zp_set_user_ammo_packs(ID, zp_get_user_ammo_packs(ID) + 99999)
       }
          
       else if(equali(Get_Player_Name, "Kevin"))
       {
              client_print_color(ID, ID, "^4Hey, welcome to the server. You have got ^399999 Ammo Packs. ^4Enjoy the game!")
              client_print_color(ID, ID, "^4Hey, welcome to the server. You have got ^399999 Ammo Packs. ^4Enjoy the game!")
              client_print_color(ID, ID, "^4Hey, welcome to the server. You have got ^399999 Ammo Packs. ^4Enjoy the game!")

              zp_set_user_ammo_packs(ID, zp_get_user_ammo_packs(ID) + 99999)
       }
}

public Event_Of_Remove_Ammo_Packs(ID) {

       zp_set_user_ammo_packs(ID, zp_get_user_ammo_packs(ID) - 97000)
}

Last edited by Jess98; 12-19-2018 at 09:38. Reason: Edited an error
Jess98 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 07:36.


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