Üdv.!
Valaki, akinek van ideje, kijavítaná nekem ezt?
Error,warn:
Kód:
- Welcome to the AMX Mod X 1.76-300 Compiler. 
- Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team 
-   
- Error: Array must be indexed (variable "-unknown-") on line 63 
- Warning: Expression has no effect on line 64 
- Warning: Symbol is assigned a value that is never used: "pont" on line 66 
- Warning: Loose indentation on line 119 
- Warning: Loose indentation on line 141 
- Warning: Loose indentation on line 163 
- Warning: Loose indentation on line 185 
- Warning: Loose indentation on line 207 
- Warning: Loose indentation on line 229 
- Warning: Loose indentation on line 251 
- Warning: Loose indentation on line 273 
- Warning: Loose indentation on line 295 
- Warning: Loose indentation on line 317 
- Warning: Loose indentation on line 339 
- Warning: Loose indentation on line 361 
- Warning: Loose indentation on line 383 
- Warning: Loose indentation on line 405 
- Warning: Loose indentation on line 427 
-   
- 1 Error. 
-   
-   
SMA:
Kód:
-   
- #include <amxmodx> 
- #include <amxmisc> 
- #include <cstrike> 
- #include <fakemeta> 
- #include <fun> 
- #include <colorchat> 
- #include <dhudmessage> 
- #include <hamsandwich> 
- #include <nvault> 
-   
- #define PLUGIN "Pont rendszer" 
- #define VERZIO "2.3" 
- #define KESZITO "Oroszrulett." 
-   
-   
- #define KEZDOPONT       5 
- #define KEZDOPONT_VIP   10 
- #define OLESPONT        2 
- #define OLESPONT_VIP    5 
-   
- #define BONUSZ1         5 
- #define BONUSZ2         7 
- #define BONUSZ3         8 
-   
- #define BONUSZIDO1      180.0 
- #define BONUSZIDO2      300.0 
- #define BONUSZIDO3      600.0 
-   
- #define VIPJOG          ADMIN_LEVEL_B 
-   
- #define SZINT_2         50 
- #define SZINT_2_BONUSZ  10 
-   
-   
- new pontok[33] 
- new r 
- new g 
- new b 
- new playernev[33][32] 
- new vault 
-   
- public plugin_init() { 
-         register_plugin(PLUGIN, VERZIO, KESZITO) 
-         register_clcmd("say /pontok", "kiir_pont") 
-         register_clcmd("say /pont", "kiir_pont") 
-         register_clcmd("say /shop", "menu") 
-         register_clcmd("say /bolt", "menu") 
-         register_clcmd("say /1000pont", "ad_pont") 
-          
-         register_dictionary("pontrendszer.txt") 
-         vault = nvault_open("Ponton"); 
-          
-         RegisterHam(Ham_Killed,         "player", "fw_player_killed") 
-          
-          
- } 
-   
- public ad_pont(id) 
- { 
-         if(get_user_flags(id) == ADMIN_BAN) 
-         { 
-                 new pont = pontok 
-                 pontok[id] + 1000 
-                 client_print(id, print_chat, "[Pontrendszer] +100 Pontot kaptal!") 
-         } 
- } 
-   
- public menu(id) 
- { 
-         if (cs_get_user_team(id) == CS_TEAM_CT) 
-         { 
-                 new menu = menu_create("\yDubStepCity Shop  \w[By Bence98007]","fegyver_menu") 
-                  
-                 menu_additem(menu,"\yAK47 Dragon \w|25 pont|","1",0) 
-                 menu_additem(menu,"\yAnaconda \w|15 pont|","2",0) 
-                 menu_additem(menu,"\yGitar \w|20 pont|","3",0) 
-                 menu_additem(menu,"\yKSG-12 \w|25 pont|","4",0) 
-                 menu_additem(menu,"\yLuger \w|10 pont|","5",0) 
-                 menu_additem(menu,"\yM4A1 Dragon \w|25 pont|","6",0) 
-                 menu_additem(menu,"\yMP-7 \w|15 pont|","7",0) 
-                 menu_additem(menu,"\yWinchester \w|30 pont|","8",0) 
-                 menu_additem(menu,"\yPKM \w|50 pont|","9",0) 
-                 menu_additem(menu,"\yMusket \w|16 pont|","10",0) 
-                 menu_additem(menu,"\ySkull-1 \w|20 pont|","11",0) 
-                 menu_additem(menu,"\ySkull-7 \w|50 pont|","12",0) 
-                 menu_additem(menu,"\yXM8 \w|20 pont|","13",0) 
-                 menu_additem(menu,"\yInfiniti \w|18 pont|","14",0) 
-                 menu_additem(menu,"\yM95 Sniper Rifle \w|18 pont|","15",0) 
-                 menu_setprop(menu,MPROP_EXIT,MEXIT_ALL) 
-                 menu_display(id,menu,0) 
-         } 
- } 
- public fegyver_menu(id,menu,item) 
- { 
-          
-         if(item==MENU_EXIT) 
-         { 
-                 menu_destroy(menu) 
-                 return PLUGIN_HANDLED 
-         } 
-          
-         new data[6], iName[64] 
-         new access, callback 
-          
-         menu_item_getinfo(menu, item, access, data,5, iName, 63, callback); 
-          
-         new key = str_to_num(data) 
-          
-         switch(key) 
-         { 
-                 case 1 : { 
-                         if (!is_user_alive(id)) 
-                 { 
-                                 client_print(id, print_chat, "[Pontrendszer] Elonek kell lenned hogy vasarolhass!") 
-                                 return PLUGIN_HANDLED 
-                 } 
-                 
-                 new penz = pontok[id] 
-                 
-                 if (penz < 600) 
-                 { 
-                                 client_print(id, print_chat, "[Pontrendszer] Nincs eleg pontod ehez az itemhez!") 
-                                 return PLUGIN_HANDLED 
-                 } 
-                 else 
-                 { 
-                                 cs_set_user_money(id, penz -= 25) 
-                                 client_print(id, print_chat, "[Pontrendszer] Sikeres vasarlas!") 
-                                 client_cmd(id, "ak47") 
-                 } 
-                          
-                 } 
-                 case 2 : { 
-                         if (!is_user_alive(id)) 
-                 { 
-                                 client_print(id, print_chat, "[Pontrendszer] Elonek kell lenned hogy vasarolhass!") 
-                                 return PLUGIN_HANDLED 
-                 } 
-                 
-                 new penz = pontok[id] 
-                 
-                 if (penz < 600) 
-                 { 
-                                 client_print(id, print_chat, "[Pontrendszer] Nincs eleg pontod ehez az itemhez!") 
-                                 return PLUGIN_HANDLED 
-                 } 
-                 else 
-                 { 
-                                 cs_set_user_money(id, penz -= 25) 
-                                 client_print(id, print_chat, "[Pontrendszer] Sikeres vasarlas!") 
-                                 client_cmd(id, "anaconda") 
-                 } 
-                          
-                 } 
-                 case 3 : { 
-                         if (!is_user_alive(id)) 
-                 { 
-                                 client_print(id, print_chat, "[Pontrendszer] Elonek kell lenned hogy vasarolhass!") 
-                                 return PLUGIN_HANDLED 
-                 } 
-                 
-                 new penz = pontok[id] 
-                 
-                 if (penz < 600) 
-                 { 
-                                 client_print(id, print_chat, "[Pontrendszer] Nincs eleg pontod ehez az itemhez!") 
-                                 return PLUGIN_HANDLED 
-                 } 
-                 else 
-                 { 
-                                 cs_set_user_money(id, penz -= 25) 
-                                 client_print(id, print_chat, "[Pontrendszer] Sikeres vasarlas!") 
-                                 client_cmd(id, "gitar") 
-                 } 
-                          
-                 } 
-                 case 4 : { 
-                         if (!is_user_alive(id)) 
-                 { 
-                                 client_print(id, print_chat, "[Pontrendszer] Elonek kell lenned hogy vasarolhass!") 
-                                 return PLUGIN_HANDLED 
-                 } 
-                 
-                 new penz = pontok[id] 
-                 
-                 if (penz < 600) 
-                 { 
-                                 client_print(id, print_chat, "[Pontrendszer] Nincs eleg pontod ehez az itemhez!") 
-                                 return PLUGIN_HANDLED 
-                 } 
-                 else 
-                 { 
-                                 cs_set_user_money(id, penz -= 25) 
-                                 client_print(id, print_chat, "[Pontrendszer] Sikeres vasarlas!") 
-                                 client_cmd(id, "ksg") 
-                 } 
-                          
-                 } 
-                 case 5 : { 
-                         if (!is_user_alive(id)) 
-                 { 
-                                 client_print(id, print_chat, "[Pontrendszer] Elonek kell lenned hogy vasarolhass!") 
-                                 return PLUGIN_HANDLED 
-                 } 
-                 
-                 new penz = pontok[id] 
-                 
-                 if (penz < 600) 
-                 { 
-                                 client_print(id, print_chat, "[Pontrendszer] Nincs eleg pontod ehez az itemhez!") 
-                                 return PLUGIN_HANDLED 
-                 } 
-                 else 
-                 { 
-                                 cs_set_user_money(id, penz -= 25) 
-                                 client_print(id, print_chat, "[Pontrendszer] Sikeres vasarlas!") 
-                                 client_cmd(id, "lug") 
-                 } 
-                          
-                 } 
-                 case 6 : { 
-                         if (!is_user_alive(id)) 
-                 { 
-                                 client_print(id, print_chat, "[Pontrendszer] Elonek kell lenned hogy vasarolhass!") 
-                                 return PLUGIN_HANDLED 
-                 } 
-                 
-                 new penz = pontok[id] 
-                 
-                 if (penz < 600) 
-                 { 
-                                 client_print(id, print_chat, "[Pontrendszer] Nincs eleg pontod ehez az itemhez!") 
-                                 return PLUGIN_HANDLED 
-                 } 
-                 else 
-                 { 
-                                 cs_set_user_money(id, penz -= 25) 
-                                 client_print(id, print_chat, "[Pontrendszer] Sikeres vasarlas!") 
-                                 client_cmd(id, "m4") 
-                 } 
-                          
-                 } 
-                 case 7 : { 
-                         if (!is_user_alive(id)) 
-                 { 
-                                 client_print(id, print_chat, "[Pontrendszer] Elonek kell lenned hogy vasarolhass!") 
-                                 return PLUGIN_HANDLED 
-                 } 
-                 
-                 new penz = pontok[id] 
-                 
-                 if (penz < 600) 
-                 { 
-                                 client_print(id, print_chat, "[Pontrendszer] Nincs eleg pontod ehez az itemhez!") 
-                                 return PLUGIN_HANDLED 
-                 } 
-                 else 
-                 { 
-                                 cs_set_user_money(id, penz -= 25) 
-                                 client_print(id, print_chat, "[Pontrendszer] Sikeres vasarlas!") 
-                                 client_cmd(id, "mp7") 
-                 } 
-                          
-                 } 
-                 case 8 : { 
-                         if (!is_user_alive(id)) 
-                 { 
-                                 client_print(id, print_chat, "[Pontrendszer] Elonek kell lenned hogy vasarolhass!") 
-                                 return PLUGIN_HANDLED 
-                 } 
-                 
-                 new penz = pontok[id] 
-                 
-                 if (penz < 600) 
-                 { 
-                                 client_print(id, print_chat, "[Pontrendszer] Nincs eleg pontod ehez az itemhez!") 
-                                 return PLUGIN_HANDLED 
-                 } 
-                 else 
-                 { 
-                                 cs_set_user_money(id, penz -= 25) 
-                                 client_print(id, print_chat, "[Pontrendszer] Sikeres vasarlas!") 
-                                 client_cmd(id, "win") 
-                 } 
-                          
-                 } 
-                 case 9 : { 
-                         if (!is_user_alive(id)) 
-                 { 
-                                 client_print(id, print_chat, "[Pontrendszer] Elonek kell lenned hogy vasarolhass!") 
-                                 return PLUGIN_HANDLED 
-                 } 
-                 
-                 new penz = pontok[id] 
-                 
-                 if (penz < 600) 
-                 { 
-                                 client_print(id, print_chat, "[Pontrendszer] Nincs eleg pontod ehez az itemhez!") 
-                                 return PLUGIN_HANDLED 
-                 } 
-                 else 
-                 { 
-                                 cs_set_user_money(id, penz -= 25) 
-                                 client_print(id, print_chat, "[Pontrendszer] Sikeres vasarlas!") 
-                                 client_cmd(id, "pkm") 
-                 } 
-                          
-                 } 
-                 case 10 : { 
-                         if (!is_user_alive(id)) 
-                 { 
-                                 client_print(id, print_chat, "[Pontrendszer] Elonek kell lenned hogy vasarolhass!") 
-                                 return PLUGIN_HANDLED 
-                 } 
-                 
-                 new penz = pontok[id] 
-                 
-                 if (penz < 600) 
-                 { 
-                                 client_print(id, print_chat, "[Pontrendszer] Nincs eleg pontod ehez az itemhez!") 
-                                 return PLUGIN_HANDLED 
-                 } 
-                 else 
-                 { 
-                                 cs_set_user_money(id, penz -= 25) 
-                                 client_print(id, print_chat, "[Pontrendszer] Sikeres vasarlas!") 
-                                 client_cmd(id, "musket") 
-                 } 
-                          
-                 } 
-                 case 11 : { 
-                         if (!is_user_alive(id)) 
-                 { 
-                                 client_print(id, print_chat, "[Pontrendszer] Elonek kell lenned hogy vasarolhass!") 
-                                 return PLUGIN_HANDLED 
-                 } 
-                 
-                 new penz = pontok[id] 
-                 
-                 if (penz < 600) 
-                 { 
-                                 client_print(id, print_chat, "[Pontrendszer] Nincs eleg pontod ehez az itemhez!") 
-                                 return PLUGIN_HANDLED 
-                 } 
-                 else 
-                 { 
-                                 cs_set_user_money(id, penz -= 25) 
-                                 client_print(id, print_chat, "[Pontrendszer] Sikeres vasarlas!") 
-                                 client_cmd(id, "skull1") 
-                 } 
-                          
-                 } 
-                 case 12 : { 
-                         if (!is_user_alive(id)) 
-                 { 
-                                 client_print(id, print_chat, "[Pontrendszer] Elonek kell lenned hogy vasarolhass!") 
-                                 return PLUGIN_HANDLED 
-                 } 
-                 
-                 new penz = pontok[id] 
-                 
-                 if (penz < 600) 
-                 { 
-                                 client_print(id, print_chat, "[Pontrendszer] Nincs eleg pontod ehez az itemhez!") 
-                                 return PLUGIN_HANDLED 
-                 } 
-                 else 
-                 { 
-                                 cs_set_user_money(id, penz -= 25) 
-                                 client_print(id, print_chat, "[Pontrendszer] Sikeres vasarlas!") 
-                                 client_cmd(id, "skull7") 
-                 } 
-                          
-                 } 
-                 case 13 : { 
-                         if (!is_user_alive(id)) 
-                 { 
-                                 client_print(id, print_chat, "[Pontrendszer] Elonek kell lenned hogy vasarolhass!") 
-                                 return PLUGIN_HANDLED 
-                 } 
-                 
-                 new penz = pontok[id] 
-                 
-                 if (penz < 600) 
-                 { 
-                                 client_print(id, print_chat, "[Pontrendszer] Nincs eleg pontod ehez az itemhez!") 
-                                 return PLUGIN_HANDLED 
-                 } 
-                 else 
-                 { 
-                                 cs_set_user_money(id, penz -= 25) 
-                                 client_print(id, print_chat, "[Pontrendszer] Sikeres vasarlas!") 
-                                 client_cmd(id, "xm8") 
-                 } 
-                          
-                 } 
-                 case 14 : { 
-                         if (!is_user_alive(id)) 
-                 { 
-                                 client_print(id, print_chat, "[Pontrendszer] Elonek kell lenned hogy vasarolhass!") 
-                                 return PLUGIN_HANDLED 
-                 } 
-                 
-                 new penz = pontok[id] 
-                 
-                 if (penz < 600) 
-                 { 
-                                 client_print(id, print_chat, "[Pontrendszer] Nincs eleg pontod ehez az itemhez!") 
-                                 return PLUGIN_HANDLED 
-                 } 
-                 else 
-                 { 
-                                 cs_set_user_money(id, penz -= 25) 
-                                 client_print(id, print_chat, "[Pontrendszer] Sikeres vasarlas!") 
-                                 client_cmd(id, "infi") 
-                 } 
-                          
-                 } 
-                 case 15 : { 
-                         if (!is_user_alive(id)) 
-                 { 
-                                 client_print(id, print_chat, "[Pontrendszer] Elonek kell lenned hogy vasarolhass!") 
-                                 return PLUGIN_HANDLED 
-                 } 
-                 
-                 new penz = pontok[id] 
-                 
-                 if (penz < 600) 
-                 { 
-                                 client_print(id, print_chat, "[Pontrendszer] Nincs eleg pontod ehez az itemhez!") 
-                                 return PLUGIN_HANDLED 
-                 } 
-                 else 
-                 { 
-                                 cs_set_user_money(id, penz -= 25) 
-                                 client_print(id, print_chat, "[Pontrendszer] Sikeres vasarlas!") 
-                                 client_cmd(id, "m95") 
-                 } 
-                          
-                 } 
-         } 
-         return PLUGIN_HANDLED 
- }   
-   
- public client_putinserver( id ) 
- { 
-         get_user_name(id, playernev[id], 31) 
-         Betoltes(id) 
-         set_task(5.0, "kiir_hud_pont", id) 
-         set_task(5.1, "kiir_chat_info", id)     
-          
-         //Ido bonusz 
-         set_task(BONUSZIDO1, "bonusz_1", id) 
-         set_task(BONUSZIDO2, "bonusz_2", id) 
-         set_task(BONUSZIDO3, "bonusz_3", id) 
- } 
- public client_disconnect(id) 
- { 
-         Mentes(id) 
-         pontok[id] = 0 
- } 
- public bonusz_1( id ) 
- { 
-         pontok[id] += BONUSZ1 
-         ColorChat(id, GREEN, "%L", LANG_PLAYER, "BONUSZ_1", BONUSZ1, BONUSZIDO1) 
- } 
- public bonusz_2( id ) 
- { 
-         pontok[id] += BONUSZ2 
-         ColorChat(id, GREEN, "%L", LANG_PLAYER, "BONUSZ_2", BONUSZ2, BONUSZIDO1) 
- } 
- public bonusz_3( id ) 
- { 
-         pontok[id] += BONUSZ3 
-         ColorChat(id, GREEN, "%L", LANG_PLAYER, "BONUSZ_3", BONUSZ3, BONUSZIDO1) 
- } 
-   
- public kiir_hud_pont( id ) 
- { 
-         r = random_num(50, 256) 
-         g = random_num(50, 256) 
-         b = random_num(50, 256) 
-         set_dhudmessage(r, g, b, 0.7,-1.0, 0, 6.0, 12.0) 
-         show_dhudmessage(id, "%L", LANG_PLAYER, "PONTOK_HUD", pontok[id]) 
- } 
-   
- public kiir_chat_info( id ) 
- { 
-         ColorChat(id, GREEN, "%L", LANG_PLAYER, "INFO_CHAT_1") 
-         ColorChat(id, GREEN, "%L", LANG_PLAYER, "INFO_CHAT_2") 
- } 
-   
- public kiir_pont( id ) 
- { 
-         ColorChat(id, GREEN, "%L", LANG_PLAYER, "PONTOK_CHAT", pontok[id]) 
- } 
-   
-   
- public fw_player_killed(victim, attacker, shouldgib, id) 
- { 
-         if(get_user_flags(id, VIPJOG)) 
-         { 
-                 pontok[attacker] += OLESPONT_VIP 
-                 ColorChat(attacker, GREEN, "%L", LANG_PLAYER, "OLES", OLESPONT_VIP) 
-                  
-                 if(pontok[id] >= SZINT_2) 
-                 {       
-                         new name[33] 
-                         get_user_name(id, name, 31) 
-                         ColorChat(0, RED, "%L", LANG_PLAYER, "SZINTLEPES", name, SZINT_2_BONUSZ) 
-                         pontok[id] += SZINT_2_BONUSZ 
-                 }       
-                 }else{ 
-                 pontok[attacker] += OLESPONT 
-                 ColorChat(attacker, GREEN, "%L", LANG_PLAYER, "OLES", OLESPONT) 
-         } 
- } 
-   
- public Mentes(id) 
- { 
-         new vaultkey[128],vaultdata[256]; 
-         format(vaultkey, charsmax(vaultkey),"%s-pont", playernev[id]); 
-         format(vaultdata, charsmax(vaultdata),"%i", pontok[id]); 
-         nvault_set(vault,vaultkey,vaultdata); 
-          
-         return PLUGIN_CONTINUE; 
- } 
-   
- public Betoltes(id) 
- { 
-         new vaultkey[128],vaultdata[256]; 
-         format(vaultkey, charsmax(vaultkey),"%s-pont", playernev[id]); 
-         nvault_get(vault,vaultkey,vaultdata,255) 
-          
-         pontok[id] = (str_to_num(vaultdata)>KEZDOPONT)?str_to_num(vaultdata):KEZDOPONT; 
-          
-         return PLUGIN_CONTINUE; 
- } 
-