Raised This Month: $ Target: $400
 0% 

colored hud messages and pressing button will respawn


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
razieljohn619
Senior Member
Join Date: May 2011
Location: Philippines
Old 07-13-2011 , 23:23   colored hud messages and pressing button will respawn
Reply With Quote #1

hey guys i'm working on this plugin that when u die a hud message (and the hud message will have different colors, like this /wPress /yX /wto respawn..)

and if u will press X u will respawn( i think pressing X to respawn instantly works already but i'm not sure) ..can u guys also help if the respawning player after 5 sec. after death is wrong..

the wrong i know here is the hud message..can someone help me??

when i drag the .sma to the compiler is all errors are pointing at the part of the hud message..so can someone help me?please..

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <cstrike>


public plugin_init(){
    
register_plugin("Respawn""1.0""razieljohn619")
    
register_event("DeathMsg""death""a")
    
register_event("Spectator""event_spectator""a"
    
register_clcmd("respawn""respawns")
}


public 
death(){
    static 
id
    id 
read_data(2)
    if(
id<|| id>32)
        return
    if(!
is_user_connected(id) || is_user_alive(id))
        return
    
set_task(5.0"respawns"id)
}


public 
respawns(id){
    if(!
is_user_connected(id) || is_user_alive(id))
        return
    
dllfunc(DLLFunc_Spawnid)
}

public 
event_spectator() 

    
set_hudmessage(230 230 230, -1.00.8506.05.00.10.2, -1)
    
show_hudmessage("/wPress /yX /wto respawn "

//the "Press" message should be white,, "X" should be color yellow,, and "to respawn" is should be white..

NOTE: my server has respawn after 5 seconds after death, so if player can't wait., he'll just have to press X to respawn instantly..
__________________

razieljohn619 is offline
Send a message via Yahoo to razieljohn619
Kreation
Veteran Member
Join Date: Jan 2010
Location: Illinois
Old 07-13-2011 , 23:36   Re: colored hud messages and pressing button will respawn
Reply With Quote #2

The only way to achieve your 'x' key respawn is by slow-hacking.
__________________
Hi.
Kreation is offline
razieljohn619
Senior Member
Join Date: May 2011
Location: Philippines
Old 07-14-2011 , 08:00   Re: colored hud messages and pressing button will respawn
Reply With Quote #3

it's up to the player of what he binds for respawn key..and that's just an example..

EDIT: i want the hud message to be shown on spectator..and someone please help me..
__________________


Last edited by razieljohn619; 07-14-2011 at 08:35.
razieljohn619 is offline
Send a message via Yahoo to razieljohn619
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 00:47.


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