AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   awp_control from amx. (https://forums.alliedmods.net/showthread.php?t=26672)

graczu 04-07-2006 05:57

awp_control from amx.
 
hm its compiling with out no error's but not working, anyone know how to fix:

Code:

/* AMX Mod script.
*
* (c) Copyright        2002-2003, f117bomb
* This file is provided        as is (no warranties).
*/ 

/*
* This plugin will slay spawn shooters if they spawn shoot on awpmap
* It displays in red text when you are not allowed to shoot.
*/

#include <amxmodx>

new bool:kills_allowed = true
new bool:awpmap

public kills_allowed_timer() {
        kills_allowed = true
}

public Round_Time()
{
        new Float:roundtime = get_cvar_float("mp_roundtime") * 60.0
        new rtime = read_data(1)
       
        if ( roundtime == rtime )  { //Round Start after freezetime
                new Float:noshoot = get_cvar_float("amx_awpmap_noshoot")
                new mapname[33]
                get_mapname(mapname,32)
                set_hudmessage(140, 0, 0, -1.0, 0.50, 0, 0.01, 5.0, 0.01,0.01,19)
                show_hudmessage(0,"NIE STRZELAJ AZ NIE ZNIKNE")
                kills_allowed = false
                set_task(noshoot,"kills_allowed_timer")
               
        }       
        return PLUGIN_CONTINUE
}

public damage_msg(vIndex)
{
        new aIndex = get_user_attacker(vIndex)
       
        if (!aIndex )
                return PLUGIN_CONTINUE
       
        if(!kills_allowed && is_user_alive(aIndex))
        {       
                new aName[32]
                get_user_name(aIndex,aName,31)
                user_kill(aIndex,0)
                client_print(0,3,"[AMX] %s zabity za strzal przed czasem.",aName)
        }

        return PLUGIN_CONTINUE
}

public plugin_init() {
       
        register_plugin("Awp Map Control","0.1.5","f117bomb")
        register_cvar("amx_awpmap_noshoot","5.0") 
       
        new mapname[33]
        get_mapname(mapname,32)
        awpmap = equali(mapname,"awp_map") ? true : false

        if(awpmap)  { 
                register_event("RoundTime", "Round_Time", "bc")
                register_event("Damage", "damage_msg", "b", "2!0", "3=0", "4!0")
        }
        return PLUGIN_CONTINUE
}


Sandurr 04-07-2006 06:48

Code:
equali(mapname,"awp_map")

you sure the map you test this plugin on is called "awp_map" ?

graczu 04-07-2006 07:05

yes im sure

awp_map.bsp << file
game name: awp_map

mut2nt 10-28-2006 15:44

Re: awp_control from amx.
 
:nono:I have a good version of that plugin....and it works only on AWP_MAP not on awp_map2...or awp_india...

Sp4rt4n 10-28-2006 19:18

Re: awp_control from amx.
 
Woo! A 6 month old topic!

This person probably doesnt care about it anymore.


All times are GMT -4. The time now is 16:35.

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