[Plugin] CS:GO Crosshair (/tinta) V1

Pluginuri pentru modul AmxModX.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
User avatar
dragonCSX
Membru, skill +1
Membru, skill +1
Posts: 220
Joined: 04 Feb 2017, 17:36
Detinator Steam: Da
CS Status: Web Developer / Scripting AMXX.
Detinator server CS: da
SteamID: weedakadulceata
Fond eXtream: 0
Location: Ploiesti
Has thanked: 4 times
Been thanked: 3 times
Contact:

29 May 2020, 07:24

Descriere: Pluginul de /tinta , pe care-l gasiti pe servere de mod csgo , numai ca acesta are niste buguri minore.
Tin sa mentionez ca aceasta sursa contine fixul pentru cei cu Steam !

Descarcare:
crosshair.sma | Afiseaza codul
#include <amxmodx>
#include <engine>
#include <cstrike>
#include <fakemeta>
#include <hamsandwich>

new const SilahBilgi[27][3] = {
	{0,0,0},
	{12,1,4},
	{9,52,1},
	{5,32,5},
	{14,1,6},
	{6,100,7},
	{4,90,8},
	{13,1,9},
	{10,120,10},
	{7,100,11},
	{6,100,12},
	{4,90,14},
	{4,90,15},
	{6,100,16},
	{10,120,17},
	{10,120,19},
	{3,200,20},
	{5,32,21},
	{4,90,22},
	{10,120,23},
	{11,2,25},
	{8,35,26},
	{4,90,27},
	{2,90,28},
    {7,100,30},
    {0,0,29},
	{0,0,0}
}
new scope[33];
new const sprites[6][4][64] = {
    {"Cross Adi","Txt Yolu","Sprite Yolu","Txt Adi"},
    {"Tinta CS:GO","sprites/tinta1.txt","sprites/tinta1.spr","tinta1"},
    {"Tinta Fixa","sprites/tinta2.txt","sprites/tinta2.spr","tinta2"},
    {"Tinta flusha \y(\rFnatic\y)","sprites/tinta3.txt","sprites/tinta3.spr","tinta3"},
    {"Tinta TaZ \y(\rVirtus.Pro\y)","sprites/tinta4.txt","sprites/tinta4.spr","tinta4"},
    {"Tinta Trainer","sprites/tinta5.txt","sprites/tinta5.spr","tinta5"}
}

new weapon_weapon[][] =
{
	"weapon_aug",
	"weapon_sg552"
}

new cross[33];
public plugin_init()
{
    register_plugin("CS:GO Crosshair","1.1","KriTo");
    register_event("CurWeapon","Event_CurWeapon","be","1=1");
    register_clcmd("buyammo1","guncelle1");
    register_clcmd("buyammo2","guncelle1");
    register_clcmd("tinta1","FakeSwitch");
    register_clcmd("say /tinta","crossmenu");
    register_clcmd("say .tinta","crossmenu");

    for(new i = 0; i < sizeof weapon_weapon; i++)
		RegisterHam(Ham_Weapon_Reload, weapon_weapon, "fw_Weapon_Reload_Post", 1)
}

public fw_Weapon_Reload_Post(ent)
{
	static id;
	id = pev(ent, pev_owner);
	
	if(get_user_weapon(id) == CSW_AUG || get_user_weapon(id) == CSW_SG552)
		if(scope[id]==1)
			scope[id]=0;
		
	return HAM_HANDLED
}

/*public client_disconnected(id){
    cross[id] = 1;
}*/
public client_putinserver(id){
    client_cmd(id, "crosshair 1")
    cross[id] = 5;
}
public client_PreThink(id)
{
    new button = pev(id, pev_oldbuttons);
    new oldbutton = pev(id, pev_button);
    if(oldbutton & IN_ATTACK2)
    {
        if(button & IN_ATTACK2)
            return PLUGIN_CONTINUE;

        new weapon = get_user_weapon(id);
        if(weapon == CSW_AUG || weapon == CSW_SG552)
        {
            if(scope[id]==0)
                scope[id]=1;
            else
                scope[id]=0;
            Guncelle(id);
        } else if(weapon != CSW_AUG || weapon != CSW_SG552)
        {
            scope[id]=0;
        }
    }
    
    return PLUGIN_CONTINUE;
}
public crossmenu(id)
{
    new Menu = menu_create("\yCSGO.NUMESERVER.RO -> \w[\rCS:GO\w]^n\wAlegeti Tinta:","crossdevam");
    menu_additem(Menu,"Tinta Normala","1");
    for(new i=1;i<sizeof(sprites);i++)
    {
        new Item[128],text[12];
        formatex(Item,127,"%s",sprites[0]);
        num_to_str(i+1,text,11);
        menu_additem(Menu,Item,text);
    }
    menu_setprop(Menu, MPROP_EXIT, MEXIT_ALL);
    menu_display(id,Menu,0);
}
public crossdevam(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);
    cross[id] = key-1;
    if(cross[id] == 0)
    {
        message_begin(MSG_ONE, get_user_msgid("HideWeapon"),  .player=id);
        write_byte(1<<7);
        message_end();
    }
    Guncelle(id);
    client_cmd(id, "lastinv;wait;wait;wait;wait;wait;wait;lastinv")

    return PLUGIN_HANDLED;
}
public guncelle1(id)
{
    set_task(0.1,"Guncelle",id);
    return PLUGIN_CONTINUE;
}
public Guncelle(id)
{
    if(!is_user_alive(id) || cross[id] == 0)
        return PLUGIN_HANDLED;
    new weapon = get_user_weapon(id);
    if( weapon == CSW_AWP || weapon == CSW_SCOUT || weapon == CSW_SG550 || weapon == CSW_G3SG1 || weapon == CSW_KNIFE)
        return PLUGIN_CONTINUE

    if(weapon != CSW_SG552 && weapon != CSW_AUG)
        scope[id]=0

    new i;
    for(i=0;i<sizeof(SilahBilgi);i++)
    {
        new yeniweap = SilahBilgi[2];
        if(weapon == yeniweap)
        {
            break;
        } else if(i==sizeof(SilahBilgi)-1)
        {
            return PLUGIN_CONTINUE;
        }
    }
    message_begin(MSG_ONE, get_user_msgid("HideWeapon"),  .player=id);
    write_byte(1<<6);
    message_end();

    message_begin(MSG_ONE,get_user_msgid("WeaponList"),   .player=id);
    write_string(sprites[cross[id]][3]);
    write_byte(SilahBilgi[i-1][0]);
    write_byte(SilahBilgi[i-1][1]);
    write_byte(-1);
    write_byte(-1);
    write_byte(6);
    write_byte(0);
    write_byte(2);
    write_byte(0);
    message_end();

    message_begin(MSG_ONE,get_user_msgid("SetFOV"),        .player=id);
    if(scope[id] == 1)
        write_byte(55);
    else
        write_byte(89);
    message_end();

    new ammo,bpammo;
    get_user_ammo(id,weapon,ammo,bpammo);

    message_begin(MSG_ONE,get_user_msgid("CurWeapon"),    .player=id);
    write_byte(1);
    write_byte(2);
    write_byte(ammo);
    message_end();
    if(weapon != CSW_KNIFE) {
        message_begin(MSG_ONE,get_user_msgid("AmmoX"),      .player=id);
        write_byte(SilahBilgi[i-1][0]);
        write_byte(bpammo);
        message_end();
    }
    if(scope[id] == 0) {
        message_begin(MSG_ONE,get_user_msgid("SetFOV"),        .player=id);
        write_byte(90);
        message_end();
    }

    return PLUGIN_HANDLED;
}
public FakeSwitch(const client)engclient_cmd(client,"weapon_shield");
public plugin_precache()
{
    for(new i=1;i<sizeof(sprites);i++)
    {
        precache_generic(sprites[1]);
        precache_generic(sprites[2]);
    }
}

public Event_CurWeapon(id)
{
    if(!is_user_alive(id) || cross[id] == 0)
        return PLUGIN_HANDLED;
    new weapon = read_data(2);
    if( weapon == CSW_AWP || weapon == CSW_SCOUT || weapon == CSW_SG550 || weapon == CSW_G3SG1)
        return PLUGIN_CONTINUE
    new i;
    for(i=0;i<sizeof(SilahBilgi);i++)
    {
        new yeniweap = SilahBilgi[2];
        if(weapon == yeniweap)
        {
            break;
        }
    }

    if(weapon == CSW_KNIFE)
    {
        message_begin(MSG_ONE,get_user_msgid("WeaponList"),   .player=id);
        write_string(sprites[cross[id]][3]);
        write_byte(-1);
        write_byte(-1);
        write_byte(-1);
        write_byte(-1);
        write_byte(0);
        write_byte(11);
        write_byte(2);
        write_byte(0);
        message_end();

        message_begin(MSG_ONE,get_user_msgid("SetFOV"),        .player=id);
        write_byte(89);
        message_end();

        message_begin(MSG_ONE,get_user_msgid("CurWeapon"),    .player=id);
        write_byte(1);
        write_byte(2);
        write_byte(-1);
        message_end();

        message_begin(MSG_ONE,get_user_msgid("SetFOV"),        .player=id);
        write_byte(90);
        message_end();

        return PLUGIN_CONTINUE
    }

    message_begin(MSG_ONE, get_user_msgid("HideWeapon"),  .player=id);
    write_byte(1<<6);
    message_end();

    message_begin(MSG_ONE,get_user_msgid("WeaponList"),   .player=id);
    write_string(sprites[cross[id]][3]);
    write_byte(SilahBilgi[i-1][0]);
    write_byte(SilahBilgi[i-1][1]);
    write_byte(-1);
    write_byte(-1);
    write_byte(6);
    write_byte(0);
    write_byte(2);
    write_byte(0);
    message_end();

    if(weapon != CSW_SG552 && weapon != CSW_AUG)
        scope[id]=0

    message_begin(MSG_ONE,get_user_msgid("SetFOV"),        .player=id);
    if(scope[id] == 1)
        write_byte(55);
    else
        write_byte(89);
    message_end();

    new ammo,bpammo;
    get_user_ammo(id,weapon,ammo,bpammo);

    message_begin(MSG_ONE,get_user_msgid("CurWeapon"),    .player=id);
    write_byte(1);
    write_byte(2);
    write_byte(ammo);
    message_end();

    if(weapon != CSW_KNIFE) {
        message_begin(MSG_ONE,get_user_msgid("AmmoX"),      .player=id);
        write_byte(SilahBilgi[i-1][0]);
        write_byte(bpammo);
        message_end();
    }
    if(scope[id] == 0) {
        message_begin(MSG_ONE,get_user_msgid("SetFOV"),        .player=id);
        write_byte(90);
        message_end();
    }


    return PLUGIN_HANDLED;
}


Link-ul de resurse
- plugintinta.rar

Nume: CS:GO Crosshair (/tinta) v1
Versiune: 1.1
Link oficial: CSDURAGI

Instalare:
1. Fisierul crosshair.sma il puneti in addons/amxmodx/scripting
2. Fisierul crosshair.amxx il puneti in addons/amxmodx/plugins
3. Intrați în addons/amxmodx/configs deschideți plugins.ini și treceți .

Code: Select all

crosshair.amxx
Cvar-uri (nu conține cvar-uri):


Comenzi administrative (nu are):

Comenzi publice (nu are.):

Module necesare (nu necesita):
- CStrike
- Fun


Imagini:
- https://i.postimg.cc/s22cpJKb/image.png
- https://i.postimg.cc/FRMVXXmQ/image.png
- https://i.postimg.cc/zDhkSvSD/image.png
- https://i.postimg.cc/6QSdCx8G/image.png
- https://i.postimg.cc/Y2Q1LVMh/image.png

phpBB [media]

Nu imi trecea alta piesa prin cap , am zis ca merge niste sorinel pustiu =))
User avatar
Doctor whO? <3
Membru, skill +2
Membru, skill +2
Posts: 861
Joined: 21 Jun 2013, 11:40
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Reputatie: Fost Membru Club eXtreamCS (doua luni)
Has thanked: 99 times
Been thanked: 15 times
Contact:

29 May 2020, 08:41

Oricum era free pe net de cine stie cat timp =)
Si altii il vindeau cu 5/10 euro.
User avatar
dragonCSX
Membru, skill +1
Membru, skill +1
Posts: 220
Joined: 04 Feb 2017, 17:36
Detinator Steam: Da
CS Status: Web Developer / Scripting AMXX.
Detinator server CS: da
SteamID: weedakadulceata
Fond eXtream: 0
Location: Ploiesti
Has thanked: 4 times
Been thanked: 3 times
Contact:

29 May 2020, 08:44

Doctor whO? <3 wrote:
29 May 2020, 08:41
Oricum era free pe net de cine stie cat timp =)
Si altii il vindeau cu 5/10 euro.
Am usurat munca unora dintre ei.
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2996
Joined: 24 Aug 2011, 11:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Has thanked: 39 times
Been thanked: 457 times
Contact:

29 May 2020, 13:43

ai cerut plg pe discord ca să l postezi? nu înțeleg
Faceți cerere bine detaliată aici și respectând modelul dacă vreți ajutor. Nu-mi mai dați add doar pentru a mă avea în lista de prieteni.
Am cont și activez doar aici! Aveți grijă la cei ce încearcă să mă copieze..Puteți lua legătura cu mine dacă aveți o problemă/nelămurire în acest caz!
În cazul în care utilizați ceva din addonsurile postate de mine aici, e bine să fiți la curent cu modificările aduse unor plugine, aici, iar dacă sunt ceva probleme sau aveți dvs. probleme nu ezitați să luați legătura cu mine.
HOST CS1.6 - în lucru
B R B
User avatar
dragonCSX
Membru, skill +1
Membru, skill +1
Posts: 220
Joined: 04 Feb 2017, 17:36
Detinator Steam: Da
CS Status: Web Developer / Scripting AMXX.
Detinator server CS: da
SteamID: weedakadulceata
Fond eXtream: 0
Location: Ploiesti
Has thanked: 4 times
Been thanked: 3 times
Contact:

29 May 2020, 14:10

L E V I N wrote:
29 May 2020, 13:43
ai cerut plg pe discord ca să l postezi? nu înțeleg
Nuuu :boundlessly_laughing: :boundlessly_laughing:
Linkul pe care l-am postat pe discord , a fost doar un fel de "ad" .
User avatar
Zipys
Membru, skill 0
Membru, skill 0
Posts: 10
Joined: 01 Jun 2020, 05:19
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Has thanked: 1 time

03 Jun 2020, 08:26

felicitari !
WeaK.
Membru, skill 0
Membru, skill 0
Posts: 19
Joined: 02 Apr 2017, 14:04
Detinator Steam: Nu
CS Status: csgo.lordstrike.ro
Detinator server CS: csgo.lordstrike.ro
Fond eXtream: 0
Contact:

14 Jun 2020, 22:44

cum se compileaza?:)) la amxmodx online compiler imi da error 035
:fist_pointing_right: csgo.lordstrike.ro :fist_pointing_left:
User avatar
Doctor whO? <3
Membru, skill +2
Membru, skill +2
Posts: 861
Joined: 21 Jun 2013, 11:40
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Reputatie: Fost Membru Club eXtreamCS (doua luni)
Has thanked: 99 times
Been thanked: 15 times
Contact:

14 Jun 2020, 23:08

WeaK. wrote:
14 Jun 2020, 22:44
cum se compileaza?:)) la amxmodx online compiler imi da error 035
Cu multa atentie si mai ales cu mana.
Il compilezi local si gata.
Post Reply

Return to “AmxModX”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests