Raised This Month: $ Target: $400
 0% 

Change Map


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
SlientArmy
Junior Member
Join Date: Aug 2019
Old 08-07-2019 , 10:04   Change Map
Reply With Quote #1

Hello forum members! İf round 30, I want to change map.
I didin't do this part. How I can do it ?
PHP Code:
public pRemoveChoose(id) {    
        static 
a,b,c,d,e
        a 
pVote_This[1]
        
pVote_This[2]
        
pVote_This[3]
        
pVote_This[4]
        
pVote_This[5]
        if(
>= && >= && >= && >= e) {
            
client_printc(id"!n[ !t- !g%s !t- !n] !gThis Map Selected !t%s",TAG,pMap_Names[pMap_Check[0]][0])
            return 
PLUGIN_HANDLED;
        }
        if(
>= && >= && >= && >= e) {
            
client_printc(id"!n[ !t- !g%s !t- !n] !gThis Map Selected !t%s",TAG,pMap_Names[pMap_Check[1]][0])
            return 
PLUGIN_HANDLED;
        }
        if(
>= && >= && >= && >= e) {
            
client_printc(id"!n[ !t- !g%s !t- !n] !gThis Map Selected !t%s",TAG,pMap_Names[pMap_Check[2]][0]) 
            return 
PLUGIN_HANDLED;
        }
        if(
>= && >= && >= && >= e) {
            
client_printc(id"!n[ !t- !g%s !t- !n] !gThis Map Selected !t%s",TAG,pMap_Names[pMap_Check[3]][0])
            return 
PLUGIN_HANDLED;
        }
        if(
>= && >= && >= && >= a) {
            
client_printc(id"!n[ !t- !g%s !t- !n] !gThis Map Selected !t%s",TAG,pMap_Names[pMap_Check[4]][0])
            return 
PLUGIN_HANDLED;
        }
    return 
PLUGIN_HANDLED;

Plugin Full Version :
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"
#define TAG "KIRAATHANE"

new pMap_Check[5],pVote_This[6],pRound_Num

new pMap_Names[][] = {    
    {
"jail_buyukisyan_dark"},
    {
"jail_buyukisyan_v8"},
    {
"jail_oyunhavuzu"},
    {
"jail_kg_aquacity"},
    {
"jail_pixelcity"},
    {
"jail_arkasokaklar"},
    {
"jail_pixelcityv2"},
    {
"jail_buyukisyan_v4"},
    {
"jail_buyukisyan_v7"}
}

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_logevent("pEnd"2"1=Round_End");
    
register_clcmd("gunekle","Plus")
}
public 
Plus() pRound_Num 29
public pEnd() {
    
pRound_Num++
    if(
pRound_Num == 30) {
        
set_task(3.0,"pMapChooser")
        new 
players[32], inum;
        static 
Uid;
        
get_players(playersinum"a")
        for(new 
iinumi++) {
            
Uid players[i];
            
set_task(6.0,"pChooserMenu",Uid)
            
set_task(36.0,"pRemoveChoose",Uid)
        }
    }
}
public 
pMapChooser() {
    new 
lNow;
    for(new 
i5i++){
        
lNow random_num(0,charsmax(pMap_Names));
        while(
pMapChoosen(lNow)){
            
lNow random_num(0,charsmax(pMap_Names));
        }
        
pMap_Check[i] = lNow;
    }
}
public 
pMapChoosen(pChoosenMap){
    for(new 
i5i++){
        if(
pMap_Check[i] == pChoosenMap){
            return 
true;
        }
    }
    return 
false;
}
public 
pChooserMenu(id){    
    static 
Item[128]
    
    
formatex(Itemcharsmax(Item),"\d| \w`\r%s \d| \d| \wMap \yOylama \wMenusu ",MENUTAG)
    new 
Menu menu_create(Item"pChooserMenu_")
    
    for(new 
i5i++){
        new 
lNTS[6];
        
num_to_str(i,lNTS,charsmax(lNTS));
        
formatex(Itemcharsmax(Item),"\d| \w`\r%s \d| \d- \w%s",MENUKISATAG,pMap_Names[pMap_Check[i]][0]);
        
menu_additem(MenuItem,lNTS)
    }
    
    
menu_setprop(Menu,MPROP_EXITNAME,"\wCikis")
    
menu_display(id,Menu,0)
}
public 
pChooserMenu_(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);
    
pVote_This[key]++
    return 
PLUGIN_HANDLED
}
public 
pRemoveChoose(id) {    
        static 
a,b,c,d,e
        a 
pVote_This[1]
        
pVote_This[2]
        
pVote_This[3]
        
pVote_This[4]
        
pVote_This[5]
        if(
>= && >= && >= && >= e) {
            
client_printc(id"!n[ !t- !g%s !t- !n] !gThis Map Selected !t%s",TAG,pMap_Names[pMap_Check[0]][0])
            return 
PLUGIN_HANDLED;
        }
        if(
>= && >= && >= && >= e) {
            
client_printc(id"!n[ !t- !g%s !t- !n] !gThis Map Selected !t%s",TAG,pMap_Names[pMap_Check[1]][0])
            return 
PLUGIN_HANDLED;
        }
        if(
>= && >= && >= && >= e) {
            
client_printc(id"!n[ !t- !g%s !t- !n] !gThis Map Selected !t%s",TAG,pMap_Names[pMap_Check[2]][0]) 
            return 
PLUGIN_HANDLED;
        }
        if(
>= && >= && >= && >= e) {
            
client_printc(id"!n[ !t- !g%s !t- !n] !gThis Map Selected !t%s",TAG,pMap_Names[pMap_Check[3]][0])
            return 
PLUGIN_HANDLED;
        }
        if(
>= && >= && >= && >= a) {
            
client_printc(id"!n[ !t- !g%s !t- !n] !gThis Map Selected !t%s",TAG,pMap_Names[pMap_Check[4]][0])
            return 
PLUGIN_HANDLED;
        }
    return 
PLUGIN_HANDLED;
}
stock client_printc(const id, const input[], any:...) {
    new 
count 1players[32];
    static 
msg[191];
    
vformat(msg190input3);
    
    
replace_all(msg190"!n""^x01"); // Default Renk(Sarı)
    
replace_all(msg190"!g""^x04"); // Yeşil Renk
    
replace_all(msg190"!t""^x03"); // Takım Renk( CT mavi , T kırmızı )
    
    
if (idplayers[0] = id; else get_players(playerscount"ch");
    {
    for (new 
0counti++){
        if (
is_user_connected(players[i])){
            
            
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i]);
            
write_byte(players[i]);
            
write_string(msg);
            
message_end();
        }
        
    }
}


Last edited by SlientArmy; 08-07-2019 at 10:32.
SlientArmy is offline
 


Thread Tools
Display Modes

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:31.


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