Raised This Month: $ Target: $400
 0% 

Const reading problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Estland
Member
Join Date: Nov 2012
Old 12-11-2014 , 10:28   Const reading problem
Reply With Quote #1

Code:
#include <amxmodx>

new const g_maps[][] =
{
   "de_inferno",
   "de_dust2"
}

public plugin_init(){
   register_plugin("Drop Awp","0.3","Faval")
   register_event("WeapPickup","Kontroll","b","1=18")
   return PLUGIN_CONTINUE
}

public Kontroll(id) {
   new map[32]
   get_mapname(map, 31)
   for(new i=0;i< sizeof(g_maps);i++)
   {
      if(equal(map, g_maps[i]))
      {
         return PLUGIN_CONTINUE
      }
      new llama = read_data(0)
      client_print(llama,print_center,"AWP pole lubatud.")
      engclient_cmd(llama, "drop","weapon_awp")
      client_cmd(llama,"drop weapon_awp")
      return PLUGIN_CONTINUE
   }
   return PLUGIN_HANDLED
}
My problem is that it reads the first map fine, but mapnames after that aren't read by the plugin.
Estland 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 15:32.


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