[Modificare Plugin] VIP

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
Ykaru
Membru, skill 0
Membru, skill 0
Posts: 27
Joined: 29 Jul 2019, 00:33
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Has thanked: 1 time

01 Aug 2019, 01:30

Salut, ar putea cineva sa-mi modifice acest plugin pentru ca tot primesc aceasta eroare :
L 08/01/2019 - 02:17:34: [AMXX] Displaying debug trace (plugin "bb_vip.amxx", version "1.0")
L 08/01/2019 - 02:17:34: [AMXX] Run time error 10: native error (native "set_user_maxspeed")
L 08/01/2019 - 02:17:34: [AMXX] [0] 0n64vrk6.sma.p::FwdHamSpawn_Post (line 45)
| Afiseaza codul
#pragma semicolon 1

#include <amxmodx>

#include <cstrike>

#include <engine>

#include <fun>

#include <hamsandwich>



#define ADMIN_JBVIP ADMIN_RESERVATION



// Define the Plugin Version

new const VERSION[] = { "1.0" };



// PREFIX

new const PREFIX[] = { "!g[ BBx.PlayArena.Ro ]!n" };



new VipUsed[33];

new HasSpeed[33];



new Float:fast_speed = 400.0;

new Float:normal_speed = 250.0;



public plugin_init()

{

	register_plugin("BaseBuilder: VIP Menu", VERSION, "");



	RegisterHam(Ham_Spawn, "player", "FwdHamSpawn_Post", 1);

	RegisterHam(Ham_Item_PreFrame, "player", "FwdPreFrame_Post", 1);

	

	register_clcmd("say vmenu", "cmdVmenu");

	register_clcmd("say /vmenu", "cmdVmenu");

	register_clcmd("say_team vmenu", "cmdVmenu");

	register_clcmd("say_team /vmenu", "cmdVmenu");

}



public FwdPreFrame_Post(id)

{

	if(is_user_alive(id) && HasSpeed[id])

		set_user_maxspeed(id, fast_speed);

}



public FwdHamSpawn_Post(id)

{

	HasSpeed[id] = false;

	VipUsed[id] = false;

	set_user_maxspeed(id, normal_speed);

	set_user_rendering( id, _, 0, 0, 0, _, 0 );  

}



public cmdVmenu(id)

{

	if(!(get_user_flags(id) & ADMIN_JBVIP))

	{

		client_printc(id, "%s Meniul e doar pentru !gVIP!n, vrei !VIP!n?, scrie !g/vip !npentru a cumpara!", PREFIX);

		

		return PLUGIN_HANDLED;

	}

	

	if(VipUsed[id])

	{

		client_printc(id, "%s Ai folosit !tmeniul !gVIP !nasteapta pana runda viitoare!", PREFIX);

		

		return PLUGIN_HANDLED;

	}

	

	switch(cs_get_user_team(id))

	{

		case CS_TEAM_T:

			VipTMenu(id);

		

		case CS_TEAM_CT:

			VipCTMenu(id);

	}

	

	return PLUGIN_HANDLED;

}



public VipCTMenu(id)

{

	new menu = menu_create("\yVIP Menu \r(CT):^n", "VipCTMenu_handler");



	menu_additem(menu, "\w150 Hp + 100 AP", "1", 0);

	menu_additem(menu, "\wM249 + Deagle", "2", 0);

	menu_additem(menu, "\wSpeed", "3", 0);

	menu_additem(menu, "\wRevive", "4", 0);

	menu_additem(menu, "\wG3SG1", "5", 0);

        menu_additem(menu, "\wHE + Flash + Smoke", "6", 0);

	

	menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);

	menu_display(id, menu, 0);

}



public VipCTMenu_handler(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:

		{

			set_user_health(id, get_user_health(id) + 150);

			set_user_armor(id, get_user_armor(id) + 100);

			VipUsed[id] = true;

			

			client_printc(id, "%s Ai primit !g150 Hp!n + !g100 AP!n", PREFIX);

		}

		case 2:

		{

            give_item(id, "weapon_m249"); 

            give_item(id, "weapon_deagle"); 

            cs_set_user_bpammo(id, CSW_M249, 200); 

            cs_set_user_bpammo(id, CSW_DEAGLE, 100); 

			

			VipUsed[id] = true;

			

			client_printc(id, "%s Ai primit !gM249!n + !gDeagle!n", PREFIX);

		}

		case 3:

		{

			VipUsed[id] = true;

			HasSpeed[id] = true;

			

			set_user_maxspeed(id, fast_speed);

			

			client_printc(id, "%s Ai primit !gSpeed!n", PREFIX);

                } 

                case 4: 

                { 

               

            ExecuteHamB(Ham_CS_RoundRespawn, id); 

  

            VipUsed[id] = true; 



            client_printc(id, "%s Ai primit !gRevive", PREFIX); 

                } 

                case 5: 

                { 

            give_item(id, "weapon_g3sg1"); 

            cs_set_user_bpammo(id, CSW_G3SG1, 200); 



            VipUsed[id] = true; 



            client_printc(id, "%s Ai primit !gG3sg1", PREFIX); 

                }

                case 6: 

                { 

            give_item(id, "weapon_flashbang"); 

            give_item(id, "weapon_hegrenade");

            give_item(id, "weapon_smokegrenade");



            VipUsed[id] = true; 



            client_printc(id, "%s Ai primit !gHE+Flash+Smoke", PREFIX); 

		}

	}



	menu_destroy(menu);

	return PLUGIN_HANDLED;

}



public VipTMenu(id)

{

	new menu = menu_create("\yVIP Menu \r(TR):^n", "VipTMenu_handler");



	menu_additem(menu, "\w5000 Hp + 5000 AP", "1", 0);

	menu_additem(menu, "\wSpeed", "2", 0);

	

	menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);

	menu_display(id, menu, 0);

}



public VipTMenu_handler(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:

		{

		      set_user_health(id, get_user_health(id) + 5000); 

                                         set_user_armor(id, get_user_armor(id) + 5000); 

                                         VipUsed[id] = true; 



			

			client_printc(id, "%s Ai primit !g5000 HP + !g5000 AP!n", PREFIX);

			

			VipUsed[id] = true;

		}

		case 2:

		{

			VipUsed[id] = true;

			HasSpeed[id] = true;

			

			set_user_maxspeed(id, fast_speed);

			

			client_printc(id, "%s Ai primit !gSpeed!n", PREFIX);

		}

		

		case 3:

		{

			set_user_health(id, get_user_health(id) + 50);

			set_user_armor(id, get_user_armor(id) + 150);

			VipUsed[id] = true;

			

			client_printc(id, "%s Tu recebeste !g50 Hp!n + !g150 Colete!n", PREFIX);

		}

	}



	menu_destroy(menu);

	return PLUGIN_HANDLED;

}



// Colour Chat

stock client_printc(const id, const input[], any:...)

{

    new count = 1, players[32];

    static msg[191];

    vformat(msg, 190, input, 3);

    

    replace_all(msg, 190, "!g", "^x04"); // Green Color

    replace_all(msg, 190, "!n", "^x01"); // Default Color

    replace_all(msg, 190, "!t", "^x03"); // Team Color

    

    if (id) players[0] = id; else get_players(players, count, "ch");

    {

        for (new i = 0; i < count; i++)

        {

            if (is_user_connected(players))

            {

                message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);

                write_byte(players);

                write_string(msg);

                message_end();

            }

        }

    }

}
Post Reply

Return to “Modificari pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests