Raised This Month: $ Target: $400
 0% 

many erros on compiler


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
shawlinn
Senior Member
Join Date: May 2009
Location: Brazil
Old 12-23-2009 , 14:30   many erros on compiler
Reply With Quote #1

I can not confer that generate these errors when I compile these 2 plugins: =\
1_plugin_menushop_CT:

PHP Code:
#include <amxmodx>  
#include <cstrike> 
#include <fun> 
#include <fakemeta>

public plugin_init()  
{  
 
register_clcmd"say /ct","mainmenu");  //RENAMED menu > mainmenu
 
register_message(get_user_msgid("CurWeapon"), "message_cur_weapon")
}  
public 
mainmenu(id)   //RENAMED menu > mainmenu

 new 
menu menu_create("Menu: CT""menu_handler"); 
 
 
menu_additem(menu"Comprar 2Flashs por R$8000""1"0); 
 
menu_additem(menu"Comprar 200Hp por R$5000""2"0); 
 
menu_additem(menu"Comprar Bala Infinita por R$16000""3"0);
 
menu_additem(menu"Comprar HE-Grenade por R$10000""4"0);
 
menu_additem(menu"Andar Mais Rapido por R$8000""5"0);
 
menu_additem(menu"Camuflagem TR 15Seg por R$10000""6"0);
 
menu_additem(menu"Colete De 500 Armor por R$8000""7"0);
 
 
 
menu_setprop(menuMPROP_EXITMEXIT_ALL); 
 
menu_display(idmenu0); 

public 
menu_handler(idmenuitem
{     
 if (
cs_get_user_team(id) != CS_TEAM_CT || !is_user_alive(id))  
 {   
  return 
PLUGIN_HANDLED;  
 }  
 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:{ 
  if(!
is_user_alive(id)) return PLUGIN_HANDLED
   
new money cs_get_user_money(id
   if(
money>=8000){ 
    
cs_set_user_money(idmoney -8000);
     
give_item(id,"weapon_flashbang");
    
give_item(id"weapon_flashbang");
    
client_print(idprint_chat"[JBROX] Voce Comprou 2Flashs por R$8000!"); 
   }
  } 
/**************************************************************************************************/
  
case 2:{ 
  if(!
is_user_alive(id)) return PLUGIN_HANDLED
   
new money cs_get_user_money(id
   if(
money>=5000
   { 
    
cs_set_user_money(idmoney -5000); 
     
set_user_health(id200); 
    
client_print(idprint_chat"[JBROX]Voce Comprou 200Hp por R$5000!"); 
   } 
   
  } 
/**************************************************************************************************/
  
case 3:{ 
  if(!
is_user_alive(id)) return PLUGIN_HANDLED
   
new money cs_get_user_money(id
   if(
money>=16000
    
cs_set_user_money(idmoney -16000);
   
client_print(idprint_chat"[JBROX]Voce Comprou Bala Infinita por R$16000!");
   
InfiniteBullets(id,true); // REDIRECIONANDO PARA OUTRO SCRIPT
   //uso do comando : id = playerid    true/false = ligado/desligado 
  
}
  default:
  {
  
client_print(id,print_chat,"[JBROX]Esta Opcao Esta Indisponivel!");
  }
   
///ADICIONANDO PRA CIMA
 
}  //ADICIONADO } motivo: Faltando p Fechar o Switch
 
menu_destroy(menu); 
 return 
PLUGIN_HANDLED
}  
 
// SCRIPT EXTRA
// Max Clip for weapons
new const MAXCLIP[] = { -113, -110, -17, -13030, -13020253035251220,
10301008303020, -173030, -150 }

new 
is_user_inifitebullets[33];  
stock InfiniteBullets(id,enabled){
 if(
id && id <33)
  
is_user_inifitebullets[id] = enabled
 
else
  
server_print("FATAL ERROR evitado: id nao pode ser nulo e nem maior que 32; id=%d",id);
}

public 
message_cur_weapon(msg_idmsg_destmsg_entity){
 if (!
is_user_alive(msg_entity) || get_msg_arg_int(1) != 1)
  return;  
//Esta vivo ? ow nao tem arma ativa? TERMINA
 
 
 
if(!is_user_inifitebullets[msg_id]) // so pra da uma ideia: msg_id = ent_id = id ...
  
return;
 
 static 
weapon //pegar o ID da arma
 
weapon get_msg_arg_int(2);
 
 
 if (
get_msg_arg_int(3) < 7)
 {
  
// Get weapon entity
  
static wname[32], weapon_ent
  get_weaponname
(weaponwnamesizeof wname 1)
  
weapon_ent fm_find_ent_by_owner(-1wnamemsg_entity)
  
  
fm_set_weapon_ammo(weapon_entMAXCLIP[weapon]) //se por 120 no lugar do max clip crasha (recarrega a arma infinitamente ao aperta R
 
}
 
 
// mostra no HUD sempre carregado a arma
 
set_msg_arg_int(3get_msg_argtype(3), MAXCLIP[weapon])
}
 
stock fm_find_ent_by_owner(entity, const classname[], owner)
{
 while ((
entity engfunc(EngFunc_FindEntityByStringentity"classname"classname)) && pev(entitypev_owner) != owner) {}
 
 return 
entity;
}
const 
OFFSET_CLIPAMMO 51
const OFFSET_LINUX_WEAPONS // weapon offsets are only 4 steps higher on Linux
// Set Weapon Clip Ammo
stock fm_set_weapon_ammo(entityamount)
{
 
set_pdata_int(entityOFFSET_CLIPAMMOamountOFFSET_LINUX_WEAPONS)
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1046\\ f0\\ fs16 \n\\ par }
*/
/**************************************************************************************************/
  
case 4:{ 
  if(!
is_user_alive(id)) return PLUGIN_HANDLED
   
new money cs_get_user_money(id
   if(
money>=10000){ 
    
cs_set_user_money(idmoney -10000);
     
give_item(id"weapon_hegrenade");
    
client_print(idprint_chat"[JBROX] Voce Comprou Uma HE-Grenade por R$10000!"); 
   } 
  }
/**************************************************************************************************/
  
case 5:{ 
  if(!
is_user_alive(id)) return PLUGIN_HANDLED
   
new money cs_get_user_money(id
   if(
money>=8000){ 
    
cs_set_user_money(idmoney -8000);  
     
set_user_maxspeed(id,1000.0); 
    
client_print(idprint_chat"[JBROX] Voce Comprou Velocidade por R$8000!"); 
   } 
   
  }
/**************************************************************************************************/
  
case 6:{
  if(!
is_user_alive(id)) return PLUGIN_HANDLED
   
if(is_user_alive(id)){
    new 
money cs_get_user_money(id
    if(
money>=10000){ 
     
cs_set_user_money(idmoney -10000);
     
fm_set_user_model(id,random(4));
     
client_print(idprint_chat"[JBROX] Voce Comprou Camuflagem De 15 Segundos por R$16000!"); 
     
set_task(15.0,"remove_inv",id);
    }
   } else {
    
client_print(idprint_chat"[JBROX] Tenque Estar Vivo Antes De Efetuar Esse Comando"); 
   }
  }
/**************************************************************************************************/
 

 
menu_destroy(menu); 
 return 
PLUGIN_HANDLED
}
public 
remove_inv(id){
 if(
is_user_alive(id))
  
set_user_rendering(id)
 return 
PLUGIN_HANDLED;
}
new const 
Player_models[][] = { 
 
"models/player/JBROX/TR/bandido.mdl"
,"models/player/JBROX/TR/bandido.mdl"
,"models/player/JBROX/TR/bandido.mdl"
,"models/player/JBROX/TR/bandido.mdl"
}
/**************************************************************************************************/
  
case 2:{ 
  if(!
is_user_alive(id)) return PLUGIN_HANDLED
   
new money cs_get_user_money(id
   if(
money>=8000
   { 
    
cs_set_user_money(idmoney -8000); 
     
set_user_armor(id500); 
    
client_print(idprint_chat"[JBROX]Voce Comprou 200Hp por R$8000!"); 
   } 
   
  } 
/**************************************************************************************************/
public fm_set_user_model(id,modelid){
 
set_user_info(id"model"Player_models[modelid])
}
public 
plugin_precache(){
 new 
i;
 
// Custom player models
 
for (0sizeof Player_modelsi++){
  
engfunc(EngFunc_PrecacheModelPlayer_models[i])
 }
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1046\\ f0\\ fs16 \n\\ par }
*/ 
2_Plugin_menushop_T:

PHP Code:
#include <amxmodx> 
#include <cstrike> 
#include <fun>
#include <fakemeta>

public plugin_init() 

    
register_clcmd"say /tr","menu"); 


public 
menu(id

    new 
menu menu_create("Menu: TR""menu_handler"); 
    
    
menu_additem(menu"Velocidade por R$6000""1"0); 
    
menu_additem(menu"DEagle por R$16000""2"0); 
    
menu_additem(menu"HE-Grenade por R$8000""3"0); 
    
menu_additem(menu"Semi-Invisivel 15Seg por R$14000""4"0);
    
menu_additem(menu"Camuflagem 15Seg por R$16000""5"0);
    
menu_additem(menu"Andar Silencioso 30Seg por R$4000""6"0);
    
menu_additem(menu"Usp por R$14000""7"0);
    
menu_additem(menu"200 De HP por R$8000""8"0);
    
menu_additem(menu"500 De Colete por R$8000""9"0);
    
menu_additem(menu"2Flashs + 1Smoke por R$8000""10"0);    
    
    
menu_setprop(menuMPROP_EXITMEXIT_ALL); 
    
menu_display(idmenu0); 


public 
menu_handler(idmenuitem

    if (
cs_get_user_team(id) != CS_TEAM_T || !is_user_alive(id)){ 
        return 
PLUGIN_HANDLED
    } 
    
    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:{ 
        if(!
is_user_alive(id)) return PLUGIN_HANDLED
            
new money cs_get_user_money(id
            if(
money>=6000){ 
                
cs_set_user_money(idmoney -6000);  
                    
set_user_maxspeed(id,1000.0); 
                
client_print(idprint_chat"[JBROX] Voce Comprou Velocidade por R$6000!"); 
            } 
            
        }
/**************************************************************************************************/
        
case 2:{ 
        if(!
is_user_alive(id)) return PLUGIN_HANDLED
            
new money cs_get_user_money(id
            if(
money>=16000){ 
                
cs_set_user_money(idmoney -16000);
                    
give_item(id,"weapon_deagle");
                
client_print(idprint_chat"[JBROX] Voce Comprou Uma AK-47 + DEagle por R$16000!"); 
            }
        } 
/**************************************************************************************************/
        
case 3:{ 
        if(!
is_user_alive(id)) return PLUGIN_HANDLED
            
new money cs_get_user_money(id
            if(
money>=8000){ 
                
cs_set_user_money(idmoney -8000);
                    
give_item(id"weapon_hegrenade");
                
client_print(idprint_chat"[JBROX] Voce Comprou Uma HE-Grenade por R$8000!"); 
            } 
        }
/**************************************************************************************************/
        
case 4:{ 
        if(!
is_user_alive(id)) return PLUGIN_HANDLED
            
new money cs_get_user_money(id
            if(
money>=14000){ 
                
cs_set_user_money(idmoney -14000);
                
set_user_rendering(kRenderFxGlowShell,0,0,0kRenderTransAlpha,10// INVISI 94%;
                
client_print(idprint_chat"[JBROX] Voce Comprou Invisibilidade De 15Segundos por R$14000!"); 
                
set_task(15.0,"remove_inv",id);
            } 
        }
/**************************************************************************************************/
        
case 5:{
        if(!
is_user_alive(id)) return PLUGIN_HANDLED
            
if(is_user_alive(id)){
                new 
money cs_get_user_money(id
                if(
money>=16000){ 
                    
cs_set_user_money(idmoney -16000);
                    
fm_set_user_model(id,random(4));
                    
client_print(idprint_chat"[JBROX] Voce Comprou Camuflagem De 15 Segundos por R$16000!"); 
                    
set_task(15.0,"remove_inv",id);
                }
            } else {
                
client_print(idprint_chat"[JBROX] Tenque Estar Vivo Antes De Efetuar Esse Comando... -.-'"); 
            }
        }
/**************************************************************************************************/
    

    
menu_destroy(menu); 
    return 
PLUGIN_HANDLED
}
public 
remove_inv(id){
    if(
is_user_alive(id))
        
set_user_rendering(id)
    return 
PLUGIN_HANDLED;
}

new const 
Player_models[][] = { 
 
"models/player/JBROX/CT/guarda.mdl"
,"models/player/JBROX/CT/guarda.mdl"
,"models/player/JBROX/CT/guarda.mdl"
,"models/player/JBROX/CT/guarda.mdl"
}


public 
fm_set_user_model(id,modelid){
    
set_user_info(id"model"Player_models[modelid])
}

public 
plugin_precache(){
    new 
i;
    
// Custom player models
    
for (0sizeof Player_modelsi++){
        
engfunc(EngFunc_PrecacheModelPlayer_models[i])
    }
}
/**************************************************************************************************/
        
case 6:{ 
        if(!
is_user_alive(id)) return PLUGIN_HANDLED
            
new money cs_get_user_money(id
            if(
money>=4000){ 
                
cs_set_user_money(idmoney -4000);
                    
set_user_footsteps(id1); 
                
client_print(idprint_chat"[JBROX] Voce Agora Esta 30Seg Silencioso por R$4000"); 
                
set_task(30.0,"remove_inv",id);
            } 
            
        }
/**************************************************************************************************/
        
case 7:{ 
        if(!
is_user_alive(id)) return PLUGIN_HANDLED
            
new money cs_get_user_money(id
            if(
money>=14000){ 
                
cs_set_user_money(idmoney -14000);
                    
give_item(id,"weapon_usp"); 
                
client_print(idprint_chat"[JBROX] Voce Agora Esta Com Andar Silencioso por R$14000"); 
                
set_task(30.0,"remove_inv",id);
            } 
            
        }
/**************************************************************************************************/
        
case 8:{ 
        if(!
is_user_alive(id)) return PLUGIN_HANDLED    
            
new money cs_get_user_money(id
            if(
money>=5000){ 
                
cs_set_user_money(idmoney -5000);
                    
set_user_health(id200); 
                
client_print(idprint_chat"[JBROX]Voce Comprou 200Hp por R$5000!"); 
            } 
            
        } 
/**************************************************************************************************/
        
case 9:{ 
        if(!
is_user_alive(id)) return PLUGIN_HANDLED    
            
new money cs_get_user_money(id
            if(
money>=8000){ 
                
cs_set_user_money(idmoney -8000);
                    
set_user_armor(id500); 
                
client_print(idprint_chat"[JBROX]Voce Comprou 500Colete por R$8000!"); 
            } 
            
        } 
/**************************************************************************************************/
        
case 10:{ 
        if(!
is_user_alive(id)) return PLUGIN_HANDLED
            
new money cs_get_user_money(id
            if(
money>=8000){ 
                
cs_set_user_money(idmoney -8000);
                    
give_item(id,"weapon_smokegrenade");
                
give_item(id"weapon_flashbang");
                
give_item(id"weapon_flashbang");
                
client_print(idprint_chat"[JBROX] Voce Comprou 2Flashs + 1Smoke por R$8000!"); 
            }
        } 
can someone make this plugin work Thxx all helpers
shawlinn is offline
worldspawn
Senior Member
Join Date: Aug 2009
Location: Russia, Yekaterinburg
Old 12-23-2009 , 15:00   Re: many erros on compiler
Reply With Quote #2

There are both
Attached Files
File Type: sma Get Plugin or Get Source (menushop_T.sma - 373 views - 5.7 KB)
File Type: sma Get Plugin or Get Source (menushop_CT.sma - 531 views - 6.9 KB)

Last edited by worldspawn; 12-23-2009 at 15:17. Reason: done
worldspawn is offline
Send a message via ICQ to worldspawn Send a message via Skype™ to worldspawn
Reply



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 04:05.


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