Raised This Month: $51 Target: $400
 12% 

Solved String


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
SlientArmy
Junior Member
Join Date: Aug 2019
Old 08-05-2019 , 15:41   String
Reply With Quote #1

I want to write the names of the maps as a string, but I can't. The same maps will not come out in the vote.
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <engine>

#define PLUGIN "Plugin Name"
#define VERSION "1.0"
#define AUTHOR "Slient Army"
#define MENUTAG "KIRAATHANE"
#define MENUKISATAG "KG"

new Rounds_Num,Map_Check[6],Vote_This[6]

new 
Map_Names[][] = {    
    {
""},
    {
"jail_buyukisyan_dark"},
    {
"jail_buyukisyan_v8"},
    {
"jail_buyukisyan_v1"},
    {
"jail_buyukisyan_v2"},
    {
"jail_buyukisyan_v3"},
    {
"jail_buyukisyan_v4"},
    {
"jail_buyukisyan_v5"},
    {
"jail_buyukisyan_v6"},
    {
"jail_buyukisyan_v7"}
}

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_logevent("saEnd"2"1=Round_End");
    
register_logevent("saRs"2"1=Round_Start");
}
public 
saEnd() {
    
Rounds_Num++
}
public 
saRs() {
    for(new 
isizeof Map_Namesi++) {
        
Map_Check[1] = random_num(0,Map_Names[random_num(0,i)][0])
        
    }
    for(new 
cget_maxplayers(); c++) OylamaMenu(c)
}

public 
OylamaMenu(id){    
    static 
Item[128]
    
    
formatex(Itemcharsmax(Item),"\d| \w`\r%s \d| \d| \wMap \yOylama \wMenusu ",MENUTAG)
    new 
Menu menu_create(Item"OylamaMenu_")

    
formatex(Itemcharsmax(Item),"\d| \w`\r%s \d| \d- \w%s",MENUKISATAG,Map_Check[1])
    
menu_additem(MenuItem"1")
    
formatex(Itemcharsmax(Item),"\d| \w`\r%s \d| \d- \w%s",MENUKISATAG,Map_Check[2])
    
menu_additem(MenuItem"2")
    
formatex(Itemcharsmax(Item),"\d| \w`\r%s \d| \d- \w%s",MENUKISATAG,Map_Check[3])
    
menu_additem(MenuItem"3")
    
formatex(Itemcharsmax(Item),"\d| \w`\r%s \d| \d- \w%s",MENUKISATAG,Map_Check[4])
    
menu_additem(MenuItem"4")
    
formatex(Itemcharsmax(Item),"\d| \w`\r%s \d| \d- \w%s",MENUKISATAG,Map_Check[5])
    
menu_additem(MenuItem"5")
        
    
menu_setprop(Menu,MPROP_EXITNAME,"\wCikis")
    
menu_display(id,Menu,0)
}
public 
OylamaMenu_(idmenuitem) {
    if( 
item == MENU_EXIT ) {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }

    new 
data[6], iName[64];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata,5iName63callback);
    new 
key str_to_num(data);

    switch(
key){
        case 
1: {
            
Vote_This[1]++
        }
        case 
2: {
            
Vote_This[2]++
        }
        case 
3: {
            
Vote_This[3]++
        }
        case 
4: {
            
Vote_This[4]++
        }
        case 
5: {
            
Vote_This[5]++
        }    
    }
    return 
PLUGIN_HANDLED


Last edited by Bugsy; 08-06-2019 at 20:15.
SlientArmy 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 17:42.


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