Raised This Month: $ Target: $400
 0% 

[help] knife round problem.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Artizy
Member
Join Date: Jun 2011
Location: Milan, Italy.
Old 05-05-2016 , 10:54   [help] knife round problem.
Reply With Quote #1

Only me i get 0 money and knife, others players get money and pistol when i execute the command. What is wrong with him?

This is the plugin.
Code:
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#include <fun>

new bool:knife

public plugin_init() 
{
	register_plugin
	(
		.plugin_name = "Knife Plugin",
		.version = "1.0",
		.author = "Artizy"
	)
	register_clcmd("say /knife","CmdSayKnife")
	
	RegisterHam(Ham_Spawn,"player","RoundRestart", 1)
}
public CmdSayKnife(id)
{
	if(get_user_flags(id) & ADMIN_KICK)
	{
		server_cmd("sv_restart 1")
		server_cmd("mp_freezetime 0")
		server_cmd("mp_startmoney 800")
		client_print(0,print_chat,"TEXT")
		knife = true
	}
}
public RoundRestart(id)
{
	if(knife)
	{
		if(is_user_alive(id))
		{
			strip_user_weapons(id)
			cs_set_user_money(id,0)
			give_item(id,"weapon_knife")
			knife = false
		}
	}
}
Artizy is offline
 



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 18:41.


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