Raised This Month: $ Target: $400
 0% 

AWP RESTRICT


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Zugelman
Junior Member
Join Date: May 2009
Old 06-01-2009 , 06:00   AWP RESTRICT
Reply With Quote #1

All greetings, I in this nub, therefore wish to learn the following:

In what format to contain scripts for sourcemod.
I need to make the following:
Restriction of rifles on all map except awp_map
Here my script: (it does not work)



//Format txt----> awp.txt
block load
{
es_xmsg #multi #green[AWP]#default: AWP enabled. Changes start next round. By:#green Infamous#default.
}

block unload
{
es_xmsg #multi #green[AWP]#default: AWP disabled. AWPS are now fully unrestricted.
ma_unrestrict awp
}

event round_start
{
es_xset awp_playercount 0
es_getplayercount awp_playercount
if (server_var(awp_playercount) => 1) do
{
if (server_var(awp_playercount) =< 64) do
{
ma_restrict awp 1
}
}
}

new String:mapname[256]
public OnMapStart()
{
GetCurrentMap(mapname, sizeof(mapname));

if mapname = "awp_india_v2"
{
ma_restrict awp 8
}
}
Zugelman is offline
exvel
SourceMod Donor
Join Date: Jun 2006
Location: Russia
Old 06-01-2009 , 07:27   Re: AWP RESTRICT
Reply With Quote #2

Something like this maybe:
PHP Code:
public OnMapStart() 
{
    
decl String:zsMapName[64];
    
GetCurrentMap(zsMapNamesizeof(zsMapName));
    
    if (
StrContains(zsMapName"awp_"false) == -1)
    {
        
ServerCommand("ma_restrict awp");
    }
    else
    {
        
ServerCommand("ma_unrestrict awp");
    }

__________________
For admins: My plugins

For developers: Colors library

Last edited by exvel; 06-01-2009 at 07:49.
exvel is offline
Send a message via ICQ to exvel
exvel
SourceMod Donor
Join Date: Jun 2006
Location: Russia
Old 06-01-2009 , 07:31   Re: AWP RESTRICT
Reply With Quote #3

I wrote this example only for awp restriction but you can simply change text inside of ServerCommand() to work it with rifles or something else.
__________________
For admins: My plugins

For developers: Colors library

Last edited by exvel; 06-01-2009 at 07:34.
exvel is offline
Send a message via ICQ to exvel
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:50.


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