Keletos pluginu.

Šiame forume vartotojai gali prašyti jiems reikiamo plugino.
Forum rules
Šiame forume galite siūlyti idėjas ar prašyti jums reikalingų pluginų. Jei kas nors pradės jį kurti, tai pasirašys Jūsų sukurtoje temoje. Niekada nepykite, jei niekas neatsako į Jūsų prašymą. Gal tai tiesiog per sudėtinga, arba reikalauja per daug darbo.
Post Reply
PSH
Jau po truputį tampa savu
Posts: 153
Joined: 2012 Aug 27 17:05
Skype: pashokas13

Keletos pluginu.

Post by PSH »

Taigi reiketu /voteban gero veikiancio plugino.
Reikia kad tarkim de_dust2x2 mapuose perka awp, kad uzdraustu butent sitame zemelapi imt awp visiems zaidejams...

User avatar
Giltinas
Jau po truputį tampa savu
Posts: 149
Joined: 2012 Jan 03 21:38
Skype: edgaras9512
Location: Šilutė

Re: Keletos pluginu.

Post by Giltinas »

1. http://forums.alliedmods.net/showthread.php?p=865960
2.

Code: Select all

if(weapon == CSW_AWP){       if(equali(mapname, "awp_"))    {        return PLUGIN_HANDLED    }        else if(equali(mapname, "de_dust2_2x2") || equali(mapname, "de_dust2_3x3"))    {        client_cmd(id, "drop")        print_chatc(id, "%s Siame zemelapyje !tAWP!n naudoti yra draudziama!", PREFIX)    }}
Image

PSH
Jau po truputį tampa savu
Posts: 153
Joined: 2012 Aug 27 17:05
Skype: pashokas13

Re: Keletos pluginu.

Post by PSH »

errorus meta del 2 plugino

DYaGesS
Flooderis arba specialistas
Posts: 875
Joined: 2013 Jan 16 01:01
Skype: usercs.com
Contact:

Re: Keletos pluginu.

Post by DYaGesS »

jei tik sita koda idejai, tai aisku, kad errora mes..
Padėjau? +rep

User avatar
Giltinas
Jau po truputį tampa savu
Posts: 149
Joined: 2012 Jan 03 21:38
Skype: edgaras9512
Location: Šilutė

Re: Keletos pluginu.

Post by Giltinas »

Code: Select all

#include <amxmodx>#include <amxmisc> #define PLUGIN "Awp Drop"#define VERSION "1.0"#define AUTHOR "Giltinas" new g_msgSayText public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)        register_event("CurWeapon", "EventCurWeapon", "be", "1=1")        g_msgSayText = get_user_msgid("SayText")    }  public EventCurWeapon(id){    new weapon = read_data(2)        new mapname[32]    get_mapname(mapname, 31)        if(weapon == CSW_AWP)    {          if(equali(mapname, "awp_"))        {            return PLUGIN_HANDLED        }                else if(equali(mapname, "de_dust2_2x2") || equali(mapname, "de_dust2_3x3"))        {            client_cmd(id, "drop")            print_chatc(id, "%s Siame zemelapyje AWP naudoti yra draudziama!")        }    }    return PLUGIN_HANDLED} stock print_chatc(const id, const input[], any:...){    new count = 1, players[32]    static msg[191]    vformat(msg, 190, input, 3)        replace_all(msg, 190, "!g", "^4") // Green Color    replace_all(msg, 190, "!n", "^1") // Default Color    replace_all(msg, 190, "!t", "^3") // 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[i]))        {            message_begin(MSG_ONE_UNRELIABLE, g_msgSayText, _, players[i])            write_byte(players[i])            write_string(msg)            message_end()            }    }} 
Image

newb
Pluginų patvirtintojas
Posts: 1047
Joined: 2010 Sep 23 21:43
Location: Wonderland
Contact:

Re: Keletos pluginu.

Post by newb »

Per CurWeapon eventa tikrint mapa :nono:

User avatar
beast
AMX Mod X ekspertai
Posts: 509
Joined: 2011 Jan 08 18:44
Skype: thefurious4
Contact:

Re: Keletos pluginu.

Post by beast »

PSH wrote:Reikia kad tarkim de_dust2x2 mapuose perka awp, kad uzdraustu butent sitame zemelapi imt awp visiems zaidejams...
http://forums.alliedmods.net/showthread.php?t=6516 :S:
What if I want to restrict a weapon on a certian map?

Using the restmenu.amxx plugin that comes with AMX MOD X 1.0 COUNTER-STRIKE ADDON package you can also restrict weapons based on map. Lets say I dont want people to purchase AK47 on fy_iceworld.

fy_iceworld.cfg:
amx_restrict on ak47

For a complete list of weapons on how to use the restrict command please look at the end of this post.
Last edited by beast on 2013 Jan 21 11:21, edited 1 time in total.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests