hadeS- | Дата: Суббота, 22.09.2012, 23:27 | Сообщение # 1 |
- Сообщения: 7
- Награды: 0
- Замечания:
|
Hello i want some help for some changes on changerace menu
I want to change the changerace menu to look like this :
Select Race Experience 1.Undead Scourge ( Level x ) XP 2. Human Alliance ( Level x ) XP 3. Orchis Horde ( Level x ) XP 4. Night Elves Of Kalimndor ( Level x ) XP Select Hero 5. Blood Mage ( Level x ) XP 6. Warden ( Level x ) XP 7. Crypt Lord ( Level x ) XP 8. A new race ( Level x ) XP 9. Next Page
And on 2nd page :
Select Race Experience 1. Another new race ( Level x ) XP 2. Another new race ( Level x ) XP 3. Another new race ( Level x ) XP 4. Chameleon ( Level x ) XP
9. Back Page 0. Exit
I saw this on o server, but i try to do, and doesn't work... if somebody can help me please And i have one little problem, i did that a player can buy 3 items and now ankh of reincarnation work just if i bought when i'm dead, if i bought when i'm alive it say me, i bought it but does not work, what i can do ? SORRY for bad english... Thanks for who want help me, and i and I hope you can help me... L.E. : you can tell me in russian, i understand, but i'm to lazy for download a language pack for my keyboard...
Сообщение отредактировал hadeS- - Воскресенье, 23.09.2012, 16:12 |
|
| |
SMaster | Дата: Воскресенье, 23.09.2012, 18:41 | Сообщение # 2 |
- Сообщения: 2189
- Награды: 46
- Замечания:
|
Чтобы помочь нужно видеть исходный код. Без него никто, даже если захочет не поможет.
Наша группа вконтакте http://vk.com/nano_world_cs
Контакты: ICQ 607786179 Skype xonahead
|
|
| |
hadeS- | Дата: Воскресенье, 23.09.2012, 21:58 | Сообщение # 3 |
- Сообщения: 7
- Награды: 0
- Замечания:
|
i think this is :
Code // Function will display the changerace menu public MENU_ChangeRace( id, iRaceXP[MAX_RACES] ) {
new szRaceName[MAX_RACES+1][64], i, pos, iKeys = 0, szMenu[512], szXP[16];
// Get our race names for ( i = 0; i < get_pcvar_num( CVAR_wc3_races ); i++ ) { lang_GetRaceName( i + 1, id, szRaceName[i], 63 ); }
pos += formatex( szMenu[pos], 512-pos, "%L", id, "MENU_SELECT_RACE" );
// Then add the experience column if ( get_pcvar_num( CVAR_wc3_save_xp ) ) { pos += formatex( szMenu[pos], 512-pos, "\R%L^n^n", id, "MENU_WORD_LEVEL" ); } else { pos += formatex( szMenu[pos], 512-pos, "^n^n" ); }
// Build the changerace menu (for every race) for ( i = 0; i < get_pcvar_num( CVAR_wc3_races ); i++ ) { num_to_str( iRaceXP[i], szXP, 15 );
// Add the "Select a Hero" message if necessary if ( i == 4 ) { pos += format( szMenu[pos], 512-pos, "%L", id, "SELECT_HERO" ); }
// User's current race if ( i == p_data[id][P_RACE] - 1 ) { pos += formatex( szMenu[pos], 512-pos, "\d%d. %s\d\R%s^n", i + 1, szRaceName[i], ( (get_pcvar_num( CVAR_wc3_save_xp )) ? szXP : " " ) );
iKeys |= (1<<i); }
// Race the user wants to change to else if ( i == p_data[id][P_CHANGERACE] - 1 ) { pos += formatex( szMenu[pos], 512-pos, "\r%d. %s\r\R%s^n", i + 1, szRaceName[i], ( (get_pcvar_num( CVAR_wc3_save_xp )) ? szXP : " " ) );
iKeys |= (1<<i); }
// All other cases else { /* new iRaceLimit = get_pcvar_num( CVAR_wc3_race_limit ); new bool:bAllowRace = true;
if ( iRaceLimit > 0 ) { new iTotal[MAX_RACES];
// Get how many people are using each race new iPlayers[32], iNumPlayers, i, iTarget; get_players( iPlayers, iNumPlayers );
for ( i = 0; i < iNumPlayers; i++ ) { iTarget = iPlayers[i];
if ( iTarget != id && p_data[iTarget][P_RACE] > 0 && p_data[iTarget][P_RACE] <= get_pcvar_num( CVAR_wc3_races ) ) { iTotal[p_data[iTarget][P_RACE]]++; } }
// Now if we have more races selected than iRaceLimit provides us with, then we need to increase iRaceLimit while ( HLPR_TotalUsingRaces( iTotal ) > iRaceLimit * get_playersnum() ) { iRaceLimit++; }
// Check to see if there was an increase that was necessary if ( iRaceLimit > get_pcvar_num( CVAR_wc3_race_limit ) ) { WC3_Log( true, "Error, increase wc3_race_limit to at least %d", iRaceLimit ); }
if ( iTotal[i+1] >= iRaceLimit ) { bAllowRace = false;
} }*/
new bool:bAllowRace = true;
// Check to see if the user can choose this race (are there too many of this race?) if ( bAllowRace ) { pos += formatex( szMenu[pos], 512-pos, "\w%d. %s\y\R%s^n", i + 1, szRaceName[i], ( (get_pcvar_num( CVAR_wc3_save_xp )) ? szXP : " " ) );
iKeys |= (1<<i); }
// If not, display the race, but don't give them a key to press else { pos += formatex( szMenu[pos], 512-pos, "\d%d. %s\y\R%s^n", i + 1, szRaceName[i], ( (get_pcvar_num( CVAR_wc3_save_xp )) ? szXP : " " ) ); } }
}
iKeys |= (1<<i);
// This is needed so we can make the Auto-Select option "0" if the number of races is 9 if ( get_pcvar_num( CVAR_wc3_races ) == 9 ) { i = -1; }
pos += format( szMenu[pos], 512-pos, "%L", id, "SELECT_RACE_FOOTER", i + 1 );
// Add a cancel button to the bottom if ( get_pcvar_num( CVAR_wc3_races ) != 9 ) { iKeys |= (1<<9);
pos += format( szMenu[pos], 512-pos, "^n\w0. %L", id, "WORD_CANCEL" ); }
// Show the menu to the user! show_menu( id, iKeys, szMenu, -1 );
return; }
/*HLPR_TotalUsingRaces( iTotalRaces[MAX_RACES] ) { new iTotal = 0; for ( new i = 1; i <= get_pcvar_num( CVAR_wc3_races ); i++ ) { WC3_Log( true, "%d", i ); iTotal += iTotalRaces[i]; }
return iTotal; }*/
public _MENU_ChangeRace( id, key ) {
if ( !WC3_Check() ) { return PLUGIN_HANDLED; }
// User pressed 0 (cancel) if ( get_pcvar_num( CVAR_wc3_races ) < 9 && key - 1 == get_pcvar_num( CVAR_wc3_races ) ) { return PLUGIN_HANDLED; }
// Save the current race data before we change DB_SaveXP( id, false );
new iRace, iAutoSelectKey = KEY_0;
if ( get_pcvar_num( CVAR_wc3_races ) != 9 ) { iAutoSelectKey = get_pcvar_num( CVAR_wc3_races ) }
// Auto select a race if ( key == iAutoSelectKey ) { iRace = random_num( 1, get_pcvar_num( CVAR_wc3_races ) ); }
// Otherwise race is set else { iRace = key + 1; }
// User currently has a race if ( p_data[id][P_RACE] != 0 ) {
// Change the user's race at the start of next round if ( iRace != p_data[id][P_RACE] ) {
// Special message for csdm if ( CVAR_csdm_active > 0 && get_pcvar_num( CVAR_csdm_active ) == 1 ) { client_print( id, print_center, "Your race will be changed when you respawn" ); } else { client_print( id, print_center, "%L", id, "CENTER_CHANGED_NEXT" ); }
p_data[id][P_CHANGERACE] = iRace; }
// Do nothing else { p_data[id][P_CHANGERACE] = 0; } }
// User doesn't have a race so give it to him!!! else { WC3_SetRace( id, iRace ); }
return PLUGIN_HANDLED; }
but all i want is hao to add that ( Level %d ) to all race, to move Chamaleon race on 2nd page to be the last and how to create 9 next page, and on 2nd page 9 back page and 0 exit and delete that race footer and how to do a race only for vip ? and with ankh of reincarnation doaes not work if i buy when i'm alive, work just if buy when i'm death can you help me ?
Сообщение отредактировал hadeS- - Воскресенье, 23.09.2012, 22:01 |
|
| |
hadeS- | Дата: Воскресенье, 23.09.2012, 23:39 | Сообщение # 5 |
- Сообщения: 7
- Награды: 0
- Замечания:
|
i'm not russian, i just understent some words, not all... so i don't know to use this forum in russian.... thanks dancerek, now SMaster can you help me please, to change te changerace menu to show near the race in parenthesis how level is that race ? and to create 2nd page and a call back ? i don't understand some menus from war3ft...
Сообщение отредактировал hadeS- - Воскресенье, 23.09.2012, 23:50 |
|
| |
hadeS- | Дата: Среда, 26.09.2012, 23:10 | Сообщение # 6 |
- Сообщения: 7
- Награды: 0
- Замечания:
|
SMaster can you help me please, i know you know how to do this changerace menu i want. And how to create a new page 9 next page and 0 exit, and to 2nd page 9 back page and 0 exit.
Сообщение отредактировал hadeS- - Среда, 26.09.2012, 23:12 |
|
| |