Page 1 of 1

Keletos pluginu.

Posted: 2013 Jan 20 16:50
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...

Re: Keletos pluginu.

Posted: 2013 Jan 20 17:41
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)    }}

Re: Keletos pluginu.

Posted: 2013 Jan 20 22:15
by PSH
errorus meta del 2 plugino

Re: Keletos pluginu.

Posted: 2013 Jan 20 23:17
by DYaGesS
jei tik sita koda idejai, tai aisku, kad errora mes..

Re: Keletos pluginu.

Posted: 2013 Jan 21 10:53
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()            }    }} 

Re: Keletos pluginu.

Posted: 2013 Jan 21 11:11
by newb
Per CurWeapon eventa tikrint mapa :nono:

Re: Keletos pluginu.

Posted: 2013 Jan 21 11:20
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.