Raised This Month: $ Target: $400
 0% 

[HELP] alive vs. dead (is_user_alive)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
leonardo_
Member
Join Date: Nov 2012
Location: Moscow, right now in Vic
Old 02-08-2013 , 17:44   [HELP] alive vs. dead (is_user_alive)
Reply With Quote #1

I am not a good programmer, so please don't judge me

Ok I wrote that code and I wanted to make it like: when player writes /check in chat:

that line starts working: (if player alive)
PHP Code:
client_print(userprint_chat"[AMXX] you'r alive!"); 
that line starts working: (if player dead)
PHP Code:
client_print(user,print_chat,"[AMXX] You'r dead!"); 

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

 
public plugin_init(){ 
    
register_plugin("Checker""0.1""Alex")
    
register_event("say /check""CheckerAlive""a")
}

public 
CheckerAlive(id:user) {
    if (
is_user_alive(user))
    {
        
client_print(user,print_chat,"[AMXX] You'r alive!");
        
//return;
    
}
    else if(!
is_user_alive(user))
    {
        
client_print(user,print_chat,"[AMXX] You'r dead!");
}

What am I doing wrong?

Last edited by leonardo_; 02-08-2013 at 17:45.
leonardo_ is offline
Send a message via ICQ to leonardo_ Send a message via Skype™ to leonardo_
 


Thread Tools
Display Modes

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 20:32.


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