Raised This Month: $ Target: $400
 0% 

Last Seen Player


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Lord_Destros
Veteran Member
Join Date: Jul 2004
Location: With stupid.
Old 02-05-2007 , 22:22   Re: Last Seen Player
Reply With Quote #4

Your register_plugin was done wrong .

Add quotes around your parameters or replace them with PLUGIN, VERSION, and AUTHOR.

Code:
#include <amxmodx>
#include <engine>

new lastseen[33]

public plugin_init()
{
	register_plugin("Chat Commands", "0.1", "Phantom Warrior")
    
	register_clcmd("say /lastseen", "SeenPlayer")

	register_event("ResetHUD","resetHUD","b")
}

public client_PreThink(id)
{
	new target,body
	get_user_aiming(id,target,body,100)
	if (target != 0)
		lastseen[id] = target
}

public SeenPlayer(id)
{
	new name[33]
	get_user_name(lastseen[id],name,32)
	if (lastseen[id] != 0)
		client_print(id,print_chat,"You last saw %s who currently has %d health.",name,get_user_health(lastseen[id]))
	else
		client_print(id,print_chat,"You have not seen anyone since your last the last time you spawned.")
}

public client_disconnect(id)
{
	lastseen[id] = 0
}

public resetHUD(id)
{
	lastseen[id] = 0
}
You don't need to add me in the credits.

EDIT: Errrm, left something out when I originally posted.
__________________
Quote:
Originally Posted by Twilight Suzuka
Don't worry m'lord. The turtles day will come.

Last edited by Lord_Destros; 02-05-2007 at 22:42.
Lord_Destros is offline
Send a message via AIM to Lord_Destros
 



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 00:39.


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