Raised This Month: $ Target: $400
 0% 

New Scripter: Help Needed with simple code


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
eXist
Member
Join Date: Apr 2005
Old 07-16-2006 , 22:37   New Scripter: Help Needed with simple code
Reply With Quote #1

Well, I've tried editing my code multiple times to try to make it functional, but it still seems not to work in game.

What I want to happen is, when a player dies, force him to join spectator in DoD.

Here's my code:
Code:
// Includes
#include <amxmodx>
#include <fun>

// Plugin Start Woot!
public plugin_init() {
	register_plugin ("Send2Spec","1.0","Avatar <eXist`>")
	register_cvar ("amxx_sendtospec","1")
	register_event ("JoinSpectator","makespec","d")
}

// Change player to spectator after Death
public makespec(id) {
	if (!is_user_alive(id) && get_cvar_num( "amxx_sendtospec" ) == 1) {
		console_cmd (id,"jointeam 3")
		return PLUGIN_CONTINUE
	}
	return PLUGIN_HANDLED
}
eXist 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 07:58.


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