Raised This Month: $ Target: $400
 0% 

Headshot Mode Script (set_user_hitzones problem)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Dakana
New Member
Join Date: Sep 2004
Old 09-06-2004 , 00:40   Headshot Mode Script (set_user_hitzones problem)
Reply With Quote #1

Ok, basically I want to write a plugin that will set a mode where only headshots count that works with CSDM and amx_respawn.

Here's what I have so far

Code:
#pragma tabsize 0
/* 
Headshot Mode
AMXX Plugin
By: Dakana
Free for public use

Description: This plugin, when enabled, makes it so damage will only be done when they hit the head hitzone.
Commands: "amx_hsmode 1" turns HS Mode on. "amx_hsmode 0" turns HS Mode off.
Commands can only be used by admins with ADMIN_KICK level.
*/

#include <amxmodx>
#include <amxmisc>
#include <fun>

public plugin_init()
{
		register_plugin("Headshot Mode", "1.00", "Dakana")
		register_concmd("amx_hsmode", "hsmode", ADMIN_KICK, "Sets 0/1")
}

public hsmode(id, level, cid)
{
		if(!cmd_access(id, level, cid, 0)) {
			console_print(id, "[HS Mode] You do not have access to this command.")
			
			} else {
			new i
			new players[33]
			new players2[33]
				for (i=0; i<33; i++)
				{
					for (new j=0; j<33; j++) 
					{
						set_user_hitzones(players[i], players2[j], 2)
					}
				}
			console_print(id, "[HS Mode] HS Mode ENABLED")
			client_print(0, print_chat, "[HS Mode] HS Mode ENABLED")
			}
	return PLUGIN_HANDLED
}
I'm running TP4, and apparently there is a syntax change in set_user_hitzones. I've tried (players[i], 0, 2) and (0, 0, 2). Neither turned on the headshot-only mode.


By the way, this is my first plugin, so please be patient if I don't understand a reply. I've some programming background, but not much

Thanks in advance!
Dakana is offline
Send a message via AIM to Dakana
 



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 17:28.


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