Raised This Month: $ Target: $400
 0% 

[REQ]Need a USP Warmup plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
preetham
Member
Join Date: Sep 2012
Location: India
Old 01-02-2014 , 22:35   [REQ]Need a USP Warmup plugin
Reply With Quote #1

Y0 Guys!
I need a USP(and knife ofcourse) Warmup round plugin... which works like
simple knife warmup....I coded a plugin but my server is crashing when my plugin is active!
PLEASE CHECK MY CODE (or) MAKE ME A PLUGIN... ITS MY HUMBLE REQUEST TO U ALL
SORRY FOR MY B4D ENGLISH

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <fakemeta>
#include <hamsandwich>
#include <cstrike>

#define PLUGIN "USP-WarmUP Round"
#define VERSION "1.0"
#define AUTHOR "preetham"

new g_USPTIME;
new 
g_Ammo;
new 
g_Health;

new 
g_inWarmup[33]

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
RegisterHam(Ham_Spawn,"player","HookSpawn",1)
    
g_USPTIME=register_cvar("usp_time","2")
    
g_Ammo=register_cvar("usp_ammo","200")
    
g_Health=register_cvar("usp_hp","125")
    
// Add your code here...
}

public 
HookSpawn(id)
{
    new 
pcvarTime get_pcvar_num(g_USPTIME) * 60;
    new 
userTime get_user_time(id)
    new 
timeInMins pcvarTime 60
    
new userName[33]
    new 
ammo get_pcvar_num(g_Ammo)
    new 
hp get_pcvar_num(g_Health)
    
get_user_name(id,userName,32)
    
    if (
userTime pcvarTime)
    {
        
g_inWarmup[id] = true
        set_hudmessage
(02550, -1.0, -1.0)
        
show_hudmessage(id"Dear %s, this is a USP warmup for you^nThis will last for %i minutes^nPractise playing with USP :D^nRegards: _|100|_ Clan",userName,timeInMins)
        
strip_user_weapons(id)
        
give_item(id,"weapon_usp")
        
cs_set_user_bpammo(id,CSW_USP,ammo)
        
set_user_health(id,hp)
        
start:
        for (new 
0;; i++)
        {
            new 
pcvarTime i;
            if (
== 10)
            {
                
set_task(0.1,"five")
            }
            else
            {
                goto 
start;
            }
        }
    }
    else
    {
        
g_inWarmup[id] = false
    
}
}


public 
five()
{
    new 
players[32], num
    get_players
(playersnum)
    new 
i
    
new player
    players
[i] = player
    
for (i=0i<numi++)
    {
        if (
g_inWarmup[player])
        {
            
client_print(player,print_center,"Warmup round will end in: 5 secs")
            
set_task(1.0,"four")
        }
    }
}

public 
four()
{
    new 
players[32], num
    get_players
(playersnum)
    new 
i
    
new player
    players
[i] = player
    
for (i=0i<numi++)
    {
        if (
g_inWarmup[player])
        {
            
client_print(player,print_center,"Warmup round will end in: 4 secs")
            
set_task(1.0,"three")
        }
    }
}

public 
three()
{
    new 
players[32], num
    get_players
(playersnum)
    new 
i
    
new player
    players
[i] = player
    
for (i=0i<numi++)
    {
        if (
g_inWarmup[player])
        {
            
client_print(player,print_center,"Warmup round will end in: 3 secs")
            
set_task(1.0,"two")
        }
    }
}

public 
two()
{
    new 
players[32], num
    get_players
(playersnum)
    new 
i
    
new player
    players
[i] = player
    
for (i=0i<numi++)
    {
        if (
g_inWarmup[player])
        {
            
client_print(player,print_center,"Warmup round will end in: 2 secs")
            
set_task(1.0,"one")
        }
    }
}

public 
one()
{
    new 
players[32], num
    get_players
(playersnum)
    new 
i
    
new player
    players
[i] = player
    
for (i=0i<numi++)
    {
        if (
g_inWarmup[player])
        {
            
client_print(player,print_center,"Warmup round will end in: 1 secs")
            
set_task(1.0,"lve")
        }
    }
}

public 
lve()
{
    new 
players[32], num
    get_players
(playersnum)
    new 
i
    
new player
    players
[i] = player
    
for (i=0i<numi++)
    {
        if (!
g_inWarmup[player])
        {
            
set_hudmessage(165200255, -1.0, -1.0)
            
show_hudmessage(player"-=[ GL HF! Game Live! Have Fun! ]=-^nPlay HARD go PrO!")
        }
    }

Attached Files
File Type: sma Get Plugin or Get Source (uspwarmup.sma - 510 views - 3.1 KB)

Last edited by preetham; 01-02-2014 at 22:36.
preetham is offline
preetham
Member
Join Date: Sep 2012
Location: India
Old 01-07-2014 , 21:06   Re: [REQ]Need a USP Warmup plugin
Reply With Quote #2

no one?
preetham is offline
ironskillz1
AlliedModders Donor
Join Date: Jul 2012
Location: Sweden
Old 01-07-2014 , 22:03   Re: [REQ]Need a USP Warmup plugin
Reply With Quote #3

Its realy hardcoded i can unhardcode it tomorrow for you
__________________
I have many private and unique plugins for Jailbreak and Hide'N'Seek. PM me for more info.

Pm me.

Check out my roulette site.
ironskillz1 is offline
Send a message via Skype™ to ironskillz1
preetham
Member
Join Date: Sep 2012
Location: India
Old 01-07-2014 , 22:18   Re: [REQ]Need a USP Warmup plugin
Reply With Quote #4

Quote:
Originally Posted by ironskillz1 View Post
Its realy hardcoded i can unhardcode it tomorrow for you
THQ V.much ironskills
preetham is offline
ironskillz1
AlliedModders Donor
Join Date: Jul 2012
Location: Sweden
Old 01-08-2014 , 13:12   Re: [REQ]Need a USP Warmup plugin
Reply With Quote #5

Code:
#include <amxmodx>
#include <fun>
#include <hamsandwich>
#include <cstrike>

#define PLUGIN "USP-WarmUP Round"
#define VERSION "1.0"
#define AUTHOR "preetham"

new g_USPTIME;
new g_Ammo;
new g_Health;
new Timer = 5 

new g_inWarmup[33]

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	RegisterHam(Ham_Spawn,"player","HookSpawn",1)
	
	g_USPTIME=register_cvar("usp_time","2")
	g_Ammo=register_cvar("usp_ammo","200")
	g_Health=register_cvar("usp_hp","125")
}

public HookSpawn(id)
{
	new pcvarTime = get_pcvar_num(g_USPTIME) * 60;
	new userTime = get_user_time(id)
	new timeInMins = pcvarTime / 60
	new userName[33]
	new ammo = get_pcvar_num(g_Ammo)
	new hp = get_pcvar_num(g_Health)
	get_user_name(id,userName,32)
	
	if (userTime < pcvarTime)
	{
		g_inWarmup[id] = true
		set_hudmessage(0, 255, 0, -1.0, -1.0)
		show_hudmessage(id, "Dear %s, this is a USP warmup for you^nThis will last for %i minutes^nPractise playing with USP :D^nRegards: _|100|_ Clan",userName,timeInMins)
		strip_user_weapons(id)
		give_item(id,"weapon_usp")
		cs_set_user_bpammo(id,CSW_USP,ammo)
		set_user_health(id,hp)
		start:
		for (new i = 0;; i++)
		{
			new x = pcvarTime - i;
			if (x == 10)
			{
				Timer = 5 
				set_task( 1.0, "Countdown", _, _, _, "a", Timer + 1 ) 
			}
			else
			{
				goto start;
			}
		}
	}
	else
	{
		g_inWarmup[id] = false
	}
}

public Countdown()
{
	new players[32], num
	get_players(players, num)
	new i
	new player
	players[i] = player
	for (i=0; i<num; i++)
	{
		if (g_inWarmup[player])
		{
			if( Timer > 0 ) 
			{ 
				set_hudmessage ( 255, 255, 255, -1.0, 0.35, 0, 0.1, 1.0, 0.1, 0.1, 4 ) 
				show_hudmessage ( 0, "Warmup round will end in: %i secs", Timer ) 
				
				Timer-- 
			} 
			else 
			{ 	
				if (!g_inWarmup[player])
				{ 
					set_hudmessage(165, 200, 255, -1.0, -1.0)
					show_hudmessage(player, "-=[ GL HF! Game Live! Have Fun! ]=-^nPlay HARD go PrO!")
				}
			}
		}
	}
}
__________________
I have many private and unique plugins for Jailbreak and Hide'N'Seek. PM me for more info.

Pm me.

Check out my roulette site.
ironskillz1 is offline
Send a message via Skype™ to ironskillz1
Snitch
Veteran Member
Join Date: Sep 2013
Location: Kazakhstan
Old 01-08-2014 , 17:47   Re: [REQ]Need a USP Warmup plugin
Reply With Quote #6

but when that warmup start?
Snitch is offline
Send a message via Skype™ to Snitch
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 20:33.


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