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

[HELP] Error when compiling plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
joaokb
Junior Member
Join Date: Apr 2021
Location: brazil
Old 05-10-2021 , 11:04   [HELP] Error when compiling plugin
Reply With Quote #1

hey, I'm trying to compile this plugin but i'm getting this error idk why, if someone can help me with this

error:
https://prnt.sc/12rlchg

PHP Code:
/*

    Some Scripter, hellmonja, ConnorMcLeod eklentilerinden alinti yapilmistir.
    Assault Scope: https://gamebanana.com/gamefiles/4885
    Eklentinin Orijinali: Win Team Sprite
    Yararlanılan konular;
        https://wiki.alliedmods.net/CS_WeaponList_Message_Dump
        https://wiki.alliedmods.net/CS_Weapons_Information
        https://forums.alliedmods.net/showthread.php?t=191512


        * 2.1 Uzun model isimlerindeki cokme hatasi duzeltildi
        * 2.2
            - Normal crosshaire fov ayarı eklendi
            - Sniperlarda durbun acip kapatinca olusan fov bozulmasi duzeltildi
        * 2.3
            - Sunucu doluyken olusan degisken hatasi duzeltildi
            - amxmodx surumu 1.8.3 surumunden dusuk olanlar artik eklentiyi kullanabilecek
        *2.4
            - aug ve sg552 dürbünlerindeki sorun üzerinde düzeltme yapıldı
        *2.4.1
            - Coklu dil destegi eklendi
        *2.5
            - Farkli aug ve sg552 model kullanimindaki sunucuyu cokertme hatasi duzeltildi
*/


#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>
//#include <cstrike>
#include <engine>
#include <nvault>

native cs_get_user_zoom(index);
#define CSW_SHIELD  2
#define DEFAULT_FOV 90
#define SetPlayerBit(%1,%2)    ( %1 |=  ( 1 << ( %2 & 31 ) ) )
#define ClearPlayerBit(%1,%2)  ( %1 &= ~( 1 << ( %2 & 31 ) ) )
#define CheckPlayerBit(%1,%2)  ( %1 &   ( 1 << ( %2 & 31 ) ) )

#define HUD_HIDE_CROSS (1<<6)
#define HUD_DRAW_CROSS (1<<7)

#if AMXX_VERSION_NUM < 183
    #include < colorchat >
    #define client_disconnected client_disconnect
    #define print_team_default DontChange
    #define print_team_grey Grey
    #define print_team_red Red
    #define print_team_blue Blue
#endif

new const AUG_SCOPE[] = "models/v_augscope.mdl";
new const 
SIG_SCOPE[] = "models/v_sigscope.mdl";
//new const AUG[] = "models/v_aug.mdl";
//new const SG552[] = "models/v_sg552.mdl";
new weapon_weapon[][] =
{
    
"weapon_aug",
    
"weapon_sg552"
}

new 
g_Zoom[33], Float:g_ZoomTime[33]

new const 
silah_listesi[][][] = 
{
    {
"","","","","","","","",""},
    {
"weapon_p228",9,52,-1,-1,1,3,1,0},
    {
"","","","","","","","",""},
    {
"weapon_scout",2,90,-1,-1,0,9,3,0},
    {
"weapon_hegrenade",12,1,-1,-1,3,1,4,24},
    {
"weapon_xm1014",5,32,-1,-1,0,12,5,0},
    {
"weapon_c4",14,1,-1,-1,4,3,6,24},
    {
"weapon_mac10",6,100,-1,-1,0,13,7,0},
    {
"weapon_aug",4,90,-1,-1,0,14,8,0},
    {
"weapon_smokegrenade",13,1,-1,-1,3,3,9,24},
    {
"weapon_elite",10,120,-1,-1,1,5,10,0},
    {
"weapon_fiveseven",7,100,-1,-1,1,6,11,0},
    {
"weapon_ump45",6,100,-1,-1,0,15,12,0},
    {
"weapon_sg550",4,90,-1,-1,0,16,13,0},
    {
"weapon_galil",4,90,-1,-1,0,17,14,0},
    {
"weapon_famas",4,90,-1,-1,0,18,15,0},
    {
"weapon_usp",6,100,-1,-1,1,4,16,0},
    {
"weapon_glock18",10,120,-1,-1,1,2,17,0},
    {
"weapon_awp",1,30,-1,-1,0,2,18,0},
    {
"weapon_mp5navy",10,120,-1,-1,0,7,19,0},
    {
"weapon_m249",3,200,-1,-1,0,4,20,0},
    {
"weapon_m3",5,32,-1,-1,0,5,21,0},
    {
"weapon_m4a1",4,90,-1,-1,0,6,22,0},
    {
"weapon_tmp",10,120,-1,-1,0,11,23,0},
    {
"weapon_g3sg1",2,90,-1,-1,0,3,24,0},
    {
"weapon_flashbang",11,2,-1,-1,3,2,25,24},
    {
"weapon_deagle",8,35,-1,-1,1,1,26,0},
    {
"weapon_sg552",4,90,-1,-1,0,10,27,0},
    {
"weapon_ak47",2,90,-1,-1,0,1,28,0},
    {
"weapon_knife",-1,-1,-1,-1,2,1,29,0},
    {
"weapon_p90",7,100,-1,-1,0,8,30,0}
    
}
enum _ImlecBilgileri 
{
    
SeciliCrosshair,
    
AssaultKontrol,
    
SniperKontrol,
    
FovKontrol
}

#define MAX_FOV 20 // 5 VE 5'in katlarini girin, kapatmak icin 0 yazin.
#define MAX_CROSSHAIR 12
new ImlecKontrol[33][ImlecBilgileri];
new 
zoomkontrol[33]

// Eger bu kisimdan .SPR dosyalarinin isimlerini degistirirseniz .TXT dosyalari iceriginide duzenlemeniz gereklidir
new const genel_bilgiler[][][] = {
    {
"CS:GO Varsayilan 1","sprites/csgo_imlecleri1.txt","csgo_imlecleri1"},
    {
"CS:GO Varsayilan 2","sprites/csgo_imlecleri2.txt","csgo_imlecleri2"},
    {
"FalleN","sprites/csgo_imlecleri3.txt","csgo_imlecleri3"},
    {
"KennyS","sprites/csgo_imlecleri4.txt","csgo_imlecleri4"},
    {
"Taco","sprites/csgo_imlecleri5.txt","csgo_imlecleri5"},
    {
"Skadoodle","sprites/csgo_imlecleri6.txt","csgo_imlecleri6"},
    {
"KRIMZ","sprites/csgo_imlecleri7.txt","csgo_imlecleri7"},
    {
"Rip","sprites/csgo_imlecleri8.txt","csgo_imlecleri8"},
    {
"XANTARES","sprites/csgo_imlecleri9.txt","csgo_imlecleri9"},
    {
"woxic","sprites/csgo_imlecleri10.txt","csgo_imlecleri10"},
    {
"coldzera","sprites/csgo_imlecleri11.txt","csgo_imlecleri11"},
    {
"s1mple","sprites/csgo_imlecleri12.txt","csgo_imlecleri12"},

    {
"","sprites/csgo_imlecleri.spr",""},
    {
"","sprites/weapon_scope_awp.txt",""},
    {
"","sprites/csgo_durbunspr.spr",""},
    {
"","sprites/csgo_aug_nokta.txt",""}
}
new const 
awp_zoom[] = {"weapon_scope_awp"}
new const 
aug_nokta[] = {"csgo_aug_nokta"}
new 
g_bSomeBool
enum _
:MESSAGES {
    
g_iMsg_WeaponList,
    
g_iMsg_CurWeapon,
    
g_iMsg_ForceCam,
    
g_iMsg_SetFOV
}

new 
g_Messages_Name[MESSAGES][] = {
    
"WeaponList",
    
"CurWeapon",
    
"ForceCam",
    
"SetFOV"
}
new const 
MenuKomutlari[][] = { "say /csgo""say_team /csgo","say /cross""say_team /cross","say /crosshair""say_team /crosshair","say /imlec""say_team /imlec","say /mira""say_team /mira","say /mr""say_team /mr" };

new 
g_Messages[MESSAGES],g_msgHideWeaponiMsgCrosshair,imlecvault,giristecrosshair;
new 
modelismiaug[33][80],modelismisg[33][80]

public 
plugin_init(){
    
register_plugin("CS:GO Crosshair/Scope""2.4.1""F.T.H")
    for (new 
isizeof MenuKomutlarii++) register_clcmd(MenuKomutlari[i], "genelmenu");

    for(new 
isizeof(g_Messages); i++)
    {
        
g_Messages[i] = get_user_msgid(g_Messages_Name[i]);
        
register_message(g_Messages[i], "block");
    }
    
register_message(g_Messages[g_iMsg_SetFOV], "message_setfov"
    
#if AMXX_VERSION_NUM >= 183
        
new cvarayar create_cvar("varsayilan_imlec","-1"FCVAR_NONE"0-11")
        
bind_pcvar_num(cvarayargiristecrosshair)
    
#else
        
giristecrosshair get_pcvar_num(register_cvar("varsayilan_imlec""-1"))
    
#endif
    
g_msgHideWeapon get_user_msgid("HideWeapon");
    
iMsgCrosshair get_user_msgid("Crosshair");
    
register_event("CurWeapon""HookCurWeapon2""be""1=1")
    
set_task(135.0"csgobilgi"0__"b")
    
RegisterHam(Ham_Killed"player""fw_PlayerKilled")
    
register_event("HLTV""Event_New_Round""a""1=0""2=0");
    
register_forward(FM_CmdStart"FW_CmdStart")
    
imlecvault nvault_open("vatanimlecbilgisi")
    
register_dictionary("imlecbilgisi.txt")
    
RegisterHam(Ham_Item_Deploy"weapon_aug""assault_deploy_aug"1)
    
RegisterHam(Ham_Item_Deploy"weapon_sg552""assault_deploy_sg552"1)
    
RegisterHamHam_Item_PostFrame"weapon_aug""Atakla");
    
RegisterHamHam_Item_PostFrame"weapon_sg552""AtaklaSG");
    for(new 
0sizeof weapon_weaponi++)
        
RegisterHam(Ham_Weapon_Reloadweapon_weapon[i], "fw_Weapon_Reload_Post"1)
}

public 
Atakla(Ent)
{
    static 
idid get_pdata_cbase(Ent414)
    if(
ImlecKontrol[id][AssaultKontrol])
    {
        if(
g_Zoom[id] == 1)
            
ScopeTekrar(id)
    }    
}

public 
AtaklaSG(Ent)
{
    static 
idid get_pdata_cbase(Ent414)
    if(
ImlecKontrol[id][AssaultKontrol])
    {
        if(
g_Zoom[id] == 2)
            
ScopeTekrar(id)
    }    
}

public 
message_setfov(msg_idmsg_destid)
{
    if (!
is_user_alive(id))
        return;

    
zoomkontrol[id] = get_msg_arg_int(1)
    if(
get_msg_arg_int(1) == 90)
        
set_msg_arg_int(1get_msg_argtype(1), DEFAULT_FOV+ImlecKontrol[id][FovKontrol])
}

public 
fw_Weapon_Reload_Post(ent)
{
    static 
id;
    
id pev(entpev_owner);
    new 
zoom cs_get_user_zoom(id);
    
    if(
get_user_weapon(id) == CSW_AUG || get_user_weapon(id) == CSW_SG552)
        if(
zoom == 1)
            
UnScope(id);
        
    return 
HAM_HANDLED
}

public 
Event_New_Round()
{
    new 
idplayers[32], num;
    
get_players(playersnum"ac");
    for (new 
0numi++)
    {
        
id players[i];
        if(
get_user_weapon(id) == CSW_AUG || get_user_weapon(id) == CSW_SG552)
            
UnScope(id);
    }
}

public 
FW_CmdStart(iduc_handleseed)
{
    if(!
is_user_alive(id))
        return 
FMRES_IGNORED
        
    
if(is_user_bot(id))
        return 
FMRES_IGNORED

    
static NewButtonzoom;
    
NewButton get_uc(uc_handleUC_Buttons);
    
    if(
NewButton IN_ATTACK2)
    {
        if(
get_user_weapon(id) == CSW_AUG || get_user_weapon(id) == CSW_SG552)
        {
            if(
get_gametime() > g_ZoomTime[id])
            {
                
zoom cs_get_user_zoom(id);
                if(
g_Zoom[id] && zoom == 1)
                    
UnScope(id);
                else if (!
g_Zoom[id] && zoom == 4)
                {
                    
Scope(id);
                }
                
g_ZoomTime[id] = get_gametime();
            }
        }
        else
            
g_Zoom[id] = 0
    
}
    
    return 
FMRES_HANDLED
}

public 
assault_deploy_aug(Ent)
{
    static 
idid get_pdata_cbase(Ent414)
    
set_task(0.1,"silahmodelinicekaug",id)    
}

public 
silahmodelinicekaug(id)
{
    
pev(id,pev_viewmodel2modelismiaug[id],charsmax(modelismiaug[]))
    if(
equali(modelismiaug[id],AUG_SCOPE))
        
modelismiaug[id] = "models/v_aug.mdl"
}
public 
silahmodeliniceksg(id)
{
    
pev(id,pev_viewmodel2modelismisg[id],charsmax(modelismisg[]))
    if(
equali(modelismisg[id],SIG_SCOPE))
        
modelismisg[id] = "models/v_sg552.mdl"
}

public 
assault_deploy_sg552(Ent)
{
    static 
idid get_pdata_cbase(Ent414)
    
set_task(0.1,"silahmodeliniceksg",id)
}


public 
csgobilgi()
{
    
client_print_color(0,print_team_default,"%L",LANG_SERVER,"SAY_GEC")
}

public 
fw_PlayerKilled(victimattacker)
{
    
set_task(0.1"sifirla"victim)
}

public 
sifirla(id)
{
    
ClearPlayerBit(g_bSomeBool,id);
    
Msg_CurWeapon(id,0,0,0);
    
Hide_NormalCrosshair(id0);
    
show_crosshair(id0)
    new 
get_user_weapon(id)
    if((
== CSW_AUG && g_Zoom[id] == 1) || (== CSW_SG552 && g_Zoom[id] == 2))
        return

    if(
g_Zoom[id])
        
UnScope(id);
}

public 
genelmenu(id)
{
    if(!
is_user_connected(id))
        return
    
    new 
ekleme[128]
    
formatex(ekleme,charsmax(ekleme),"%L",id,"MENU_BASLIGI")
    new 
menu menu_create(ekleme,"genelmenu2")
    if(
ImlecKontrol[id][SeciliCrosshair] == -1)
    {
        
formatex(ekleme,127,"%L",id,"CROSS_VARSAYILAN")
    }
    else
        
formatex(ekleme,127,"%L",id,"CROSS_SECILI",genel_bilgiler[ImlecKontrol[id][SeciliCrosshair]][0][0])

    
menu_additem(menu,ekleme,"1",0)
    if(
ImlecKontrol[id][SniperKontrol])    
        
formatex(ekleme,127,"%L %L",id,"SNIPER_SCOPE",id,"CROSS_DURUM1")
    else
        
formatex(ekleme,127,"%L %L",id,"SNIPER_SCOPE",id,"CROSS_DURUM2")
    
menu_additem(menu,ekleme,"2",0)
    if(
ImlecKontrol[id][AssaultKontrol])
        
formatex(ekleme,127,"%L %L",id,"ASSAULT_SCOPE",id,"CROSS_DURUM1")
    else
        
formatex(ekleme,127,"%L %L",id,"ASSAULT_SCOPE",id,"CROSS_DURUM2")
    
menu_additem(menu,ekleme,"3",0)
    
formatex(ekleme,127,"%L",id,"FOV",ImlecKontrol[id][FovKontrol],MAX_FOV)

    
menu_additem(menu,ekleme,"4",0)

    
formatex(ekleme,127,"%L",id,"MENU_KAPAT")
    
menu_setprop(menuMPROP_EXITNAMEekleme);
    
formatex(ekleme,127,"%L",id,"MENU_GERI")
    
menu_setprop(menuMPROP_BACKNAMEekleme);
    
formatex(ekleme,127,"%L",id,"MENU_ILERI")
    
menu_setprop(menuMPROP_NEXTNAMEekleme);
    
menu_display(idmenu0);

}


public 
genelmenu2(id,menu,item)
{
    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:{
            
imlecsecim(id)
            return 
PLUGIN_HANDLED
        
}
        case 
2:{
            
ImlecKontrol[id][SniperKontrol] = ImlecKontrol[id][SniperKontrol] ? 1
        
}
        case 
3:{
            
ImlecKontrol[id][AssaultKontrol] = ImlecKontrol[id][AssaultKontrol] ? 1
            client_cmd
(id,"weapon_knife;wait;wait;wait;weapon_aug;weapon_sg552")
        }
        case 
4:{
            
ImlecKontrol[id][FovKontrol] += 5
            
if(ImlecKontrol[id][FovKontrol] > MAX_FOV || ImlecKontrol[id][FovKontrol] < 0)
                 
ImlecKontrol[id][FovKontrol] = 0
        
}
    }
    
genelmenu(id)
    
bilgilerikaydet(id)
    
HookCurWeapon2(id)
        
    return 
PLUGIN_HANDLED
}


public 
imlecsecim(id)
{
    if(!
is_user_connected(id))
        return
    
    new 
cevir[10],ekleme[128]
    
formatex(ekleme,charsmax(ekleme),"%L",id,"MENU_BASLIGI")
    new 
menu menu_create(ekleme,"imlecsecim2")
    
num_to_str(MAX_CROSSHAIR+1,cevir,9)
    
formatex(ekleme,charsmax(ekleme),"%L",id,"NORMAL_CROSS")
    
menu_additem(menu,ekleme,cevir,0)
    for (new 
iMAX_CROSSHAIRi++)
    {
        
num_to_str(i,cevir,9)
        
menu_additem(menu,genel_bilgiler[i][0][0],cevir,0)
    }

    
formatex(ekleme,127,"%L",id,"MENU_KAPAT")
    
menu_setprop(menuMPROP_EXITNAMEekleme);
    
formatex(ekleme,127,"%L",id,"MENU_GERI")
    
menu_setprop(menuMPROP_BACKNAMEekleme);
    
formatex(ekleme,127,"%L",id,"MENU_ILERI")
    
menu_setprop(menuMPROP_NEXTNAMEekleme);
    
menu_display(idmenu0);

}


public 
imlecsecim2(id,menu,item)
{
    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)
    if(
key MAX_CROSSHAIR)
    {
        
sifirla(id)
        
ImlecKontrol[id][SeciliCrosshair] = -1
        HookCurWeapon2
(id)
        
client_print_color(id,print_team_default,"%L",id,"CROSS_ESKI")
    }
    else
    {
        
ImlecKontrol[id][SeciliCrosshair] = key
        HookCurWeapon2
(id)
        
client_print_color(id,print_team_default,"%L",id,"CROSS_DEGISTI",genel_bilgiler[key][0][0])
        
client_print_color(id,print_team_default,"%L",id,"CROSS_BILGI")
    }
    
bilgilerikaydet(id)
        
    return 
PLUGIN_HANDLED
}


public 
client_putinserver(id)
{
    
set_task(1.0,"GirisYapti",id)
}

public 
GirisYapti(id)
{
    
client_cmd(id"crosshair 1")
    
client_cmd(id"cl_observercrosshair 1"//Kucuk sari crosshairi gizlemek icin
    
bilgiler(id)
}

public 
bilgiler(id)
{
    new 
toplam[64],bilgilertoplam[15],steamid[32],cross[5],assault[5],sniper[5],fov[5]
    
get_user_authididsteamidcharsmax(steamid))
    
formatex(toplam,63,"%s-STEAMID",steamid)
    
nvault_get(imlecvaulttoplambilgilertoplamcharsmax(bilgilertoplam)) 
    
parse(bilgilertoplam,cross,4,assault,4,sniper,4,fov,4)
    
ImlecKontrol[id][SeciliCrosshair] = str_to_num(cross)
    
ImlecKontrol[id][AssaultKontrol] = str_to_num(assault)
    
ImlecKontrol[id][SniperKontrol] = str_to_num(sniper)
    
ImlecKontrol[id][FovKontrol] = str_to_num(fov)
    if(
ImlecKontrol[id][FovKontrol] > MAX_FOV || ImlecKontrol[id][FovKontrol] < 0)
        
ImlecKontrol[id][FovKontrol] = 0

    
if(equali(bilgilertoplam,""))
    {
        if(
giristecrosshair < -|| giristecrosshair MAX_CROSSHAIR)
            
ImlecKontrol[id][SeciliCrosshair] = 0
        
else
            
ImlecKontrol[id][SeciliCrosshair] = giristecrosshair
        ImlecKontrol
[id][AssaultKontrol] = 1
        ImlecKontrol
[id][SniperKontrol] = 1
        ImlecKontrol
[id][FovKontrol] = 0
    
}
}

public 
bilgilerikaydet(id)
{
    new 
toplam[64],bilgilertoplam[15],steamid[32]
    
get_user_authididsteamidcharsmax(steamid))
    if(
ImlecKontrol[id][FovKontrol] > MAX_FOV || ImlecKontrol[id][FovKontrol] < 0)
        
ImlecKontrol[id][FovKontrol] = 0

    formatex
(bilgilertoplam,14,"%i %i %i %i",ImlecKontrol[id][SeciliCrosshair],ImlecKontrol[id][AssaultKontrol],ImlecKontrol[id][SniperKontrol],ImlecKontrol[id][FovKontrol])
    
formatex(toplam,63,"%s-STEAMID",steamid)
    
nvault_set(imlecvault,toplam,bilgilertoplam)
}


public 
HookCurWeapon2(id)
{
    if(!
is_user_connected(id))
        return 
PLUGIN_CONTINUE

    
if(ImlecKontrol[id][SeciliCrosshair] != -1)
        
Hide_NormalCrosshair(id1);

    new 
clipammo
    
new get_user_weapon(idclipammo)

    if(
== CSW_AWP || == CSW_SCOUT || == CSW_G3SG1 || == CSW_SG550)
    {
        
Hide_NormalCrosshair(id1)
        if(
g_Zoom[id])
        {
            
Msg_SetFOV(id,DEFAULT_FOV+ImlecKontrol[id][FovKontrol]);
            
g_Zoom[id] = 0
        
}
        else if(
zoomkontrol[id] >= 90)
            
Msg_SetFOV(id,DEFAULT_FOV+ImlecKontrol[id][FovKontrol])

        
ClearPlayerBit(g_bSomeBoolid);
        
Msg_CurWeapon(id,0,0,0);
        if(
ImlecKontrol[id][SniperKontrol])
            
Msg_WeaponList(id,awp_zoom,silah_listesi[w][1][0],silah_listesi[w][2][0],silah_listesi[w][3][0],silah_listesi[w][4][0],silah_listesi[w][5][0],0,CSW_SHIELD,silah_listesi[w][8][0]);
        else
            
Msg_WeaponList(id,"weapon_awp",silah_listesi[w][1][0],silah_listesi[w][2][0],silah_listesi[w][3][0],silah_listesi[w][4][0],silah_listesi[w][5][0],0,CSW_SHIELD,silah_listesi[w][8][0]);

        
ClearPlayerBit(g_bSomeBoolid);
        
Msg_CurWeapon(id,1,2,clip);

        return 
PLUGIN_CONTINUE
    
}
    else if(
ImlecKontrol[id][SeciliCrosshair] == -1)
    {
        
sifirla(id)
        if((
g_Zoom[id] == && == CSW_AUG) || (g_Zoom[id] == && == CSW_SG552))
        {
            
Msg_SetFOV(id,55)
        }
        else
        {
            if(
g_Zoom[id])
                
UnScope(id)

            
Msg_SetFOV(id,DEFAULT_FOV+ImlecKontrol[id][FovKontrol])
        }
        return 
PLUGIN_CONTINUE
    
}
    else if(
== CSW_AUG || == CSW_SG552)
    {
        if(
g_Zoom[id] && ImlecKontrol[id][AssaultKontrol] && ((g_Zoom[id] == && == CSW_AUG) || (g_Zoom[id] == && == CSW_SG552)))
            
Msg_WeaponList(id,aug_nokta,silah_listesi[w][1][0],silah_listesi[w][2][0],silah_listesi[w][3][0],silah_listesi[w][4][0],silah_listesi[w][5][0],0,CSW_SHIELD,silah_listesi[w][8][0]);
        else
            
Msg_WeaponList(id,genel_bilgiler[ImlecKontrol[id][SeciliCrosshair]][2][0],silah_listesi[w][1][0],silah_listesi[w][2][0],silah_listesi[w][3][0],silah_listesi[w][4][0],silah_listesi[w][5][0],0,CSW_SHIELD,silah_listesi[w][8][0]);

        
Msg_SetFOV(id,DEFAULT_FOV-1);
        
ClearPlayerBit(g_bSomeBoolid);
        
Msg_CurWeapon(id,1,2,clip);
        
SetPlayerBit(g_bSomeBool,id);
        if((
g_Zoom[id] == && == CSW_AUG) || (g_Zoom[id] == && == CSW_SG552))
        {
            
Msg_SetFOV(id,55)
            
/*if(ImlecKontrol[id][AssaultKontrol])
            {
                ScopeTekrar(id)
            }*/
        
}
        else
        {
            if(
g_Zoom[id])
                
UnScope(id)
            
            
Msg_SetFOV(id,DEFAULT_FOV+ImlecKontrol[id][FovKontrol])
        }

        return 
PLUGIN_HANDLED_MAIN
    
}

    if(
g_Zoom[id])
        
UnScope(id)

    
Msg_WeaponList(id,genel_bilgiler[ImlecKontrol[id][SeciliCrosshair]][2][0],silah_listesi[w][1][0],silah_listesi[w][2][0],silah_listesi[w][3][0],silah_listesi[w][4][0],silah_listesi[w][5][0],0,CSW_SHIELD,silah_listesi[w][8][0]);
    
Msg_SetFOV(id,DEFAULT_FOV-1);
    
ClearPlayerBit(g_bSomeBoolid);
    
Msg_CurWeapon(id,1,2,clip);
    
SetPlayerBit(g_bSomeBool,id);
    
Msg_SetFOV(id,DEFAULT_FOV+ImlecKontrol[id][FovKontrol]);
    return 
PLUGIN_CONTINUE
}


public 
Scope(id)
{
    new 
clipammo
    
new get_user_weapon(idclipammo)
    if(
== CSW_AUG)
        
g_Zoom[id] = 1;
    else if (
== CSW_SG552)
        
g_Zoom[id] = 2;

    if(!
ImlecKontrol[id][AssaultKontrol])
    {
        
HookCurWeapon2(id)
        return
    }

    if(
== CSW_AUG)
    {
        
entity_set_string(idEV_SZ_viewmodelAUG_SCOPE);
    }
    else if (
== CSW_SG552)
    {
        
entity_set_string(idEV_SZ_viewmodelSIG_SCOPE);
    }
    
HookCurWeapon2(id)
}

public 
ScopeTekrar(id)
{
    new 
clipammo
    
new get_user_weapon(idclipammo)

    if(
== CSW_AUG)
    {
        
entity_set_string(idEV_SZ_viewmodelAUG_SCOPE);
    }
    else if (
== CSW_SG552)
    {
        
entity_set_string(idEV_SZ_viewmodelSIG_SCOPE);
    }
}

stock UnScope(id)
{    
    
g_Zoom[id] = 0;
    if(!
ImlecKontrol[id][AssaultKontrol])
    {
        
HookCurWeapon2(id)
        return
    }

    new 
get_user_weapon(id)
    if(
== CSW_AUG)
        
entity_set_string(idEV_SZ_viewmodelmodelismiaug[id]);
    else if(
== CSW_SG552)
        
entity_set_string(idEV_SZ_viewmodelmodelismisg[id])

    
HookCurWeapon2(id)
        
}

stock show_crosshair(idflag)
{
    
message_begin(MSG_ONE_UNRELIABLEiMsgCrosshair_id);
    
write_byte(flag);
    
message_end();
}

stock Hide_NormalCrosshair(idflag)
{
    if(
flag == 1)
    {
        
message_begin(MSG_ONEg_msgHideWeapon_id);
        
write_byte(HUD_HIDE_CROSS);
        
message_end();
    }
    else
    {
        
message_begin(MSG_ONEg_msgHideWeapon_id);
        
write_byte(HUD_DRAW_CROSS);
        
message_end();
    }
}

public 
plugin_precache(){
    for(new 
isizeof(genel_bilgiler); i++)
        
precache_generic(genel_bilgiler[i][1][0]);

    
precache_model(AUG_SCOPE);
    
precache_model(SIG_SCOPE);
}



public 
block(iMsgID,iMsgType,iPlrID){
    if(
CheckPlayerBit(g_bSomeBool,iPlrID))
        return 
PLUGIN_HANDLED;

    return 
PLUGIN_CONTINUE;
}

stock Msg_WeaponList(id,const WeaponName[],PrimaryAmmoID,PrimaryAmmoMaxAmount,SecondaryAmmoID,SecondaryAmmoMaxAmount,
                        
SlotID,NumberInSlot,WeaponID,Flags){
    
message_begin(MSG_ONE,g_Messages[g_iMsg_WeaponList],_id);
    {
        
write_string(WeaponName);
        
write_byte(PrimaryAmmoID);
        
write_byte(PrimaryAmmoMaxAmount);
        
write_byte(SecondaryAmmoID);
        
write_byte(SecondaryAmmoMaxAmount);
        
write_byte(SlotID);
        
write_byte(NumberInSlot);
        
write_byte(WeaponID);
        
write_byte(Flags);
    }
    
message_end();
}

stock Msg_CurWeapon(id,IsActive,WeaponIDClipAmmo)
{
    
message_begin(MSG_ONE,g_Messages[g_iMsg_CurWeapon],_,id);
    {
        
write_byte(IsActive);
        
write_byte(WeaponID);
        
write_byte(ClipAmmo);
    }
    
message_end();
}

stock Msg_SetFOV(id,Degrees){
    
message_begin(MSG_ONE,g_Messages[g_iMsg_SetFOV], _,id);
    {
        
write_byte(Degrees);
    }
    
message_end();

Attached Files
File Type: sma Get Plugin or Get Source (CrosshairScope_25.sma - 67 views - 20.4 KB)
__________________
⠀⠀⠀⠀⠀⠀
⠀⠀kabest
joaokb is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 05-10-2021 , 13:31   Re: [HELP] Error when compiling plugin
Reply With Quote #2

You need amxx 1.9+ or change client_print_color to client_print(id, print_chat, "...

Edit: Looking at the code you just need colorchat.inc
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/

Last edited by iceeedr; 05-10-2021 at 13:32.
iceeedr is offline
Send a message via Skype™ to iceeedr
joaokb
Junior Member
Join Date: Apr 2021
Location: brazil
Old 05-10-2021 , 14:15   Re: [HELP] Error when compiling plugin
Reply With Quote #3

Quote:
Originally Posted by iceeedr View Post
You need amxx 1.9+ or change client_print_color to client_print(id, print_chat, "...

Edit: Looking at the code you just need colorchat.inc
thx for the help bro
__________________
⠀⠀⠀⠀⠀⠀
⠀⠀kabest
joaokb is offline
Reply


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


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