Raised This Month: $ Target: $400
 0% 

PTakeDam (The Specialists)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Des12
Senior Member
Join Date: Jan 2005
Old 03-17-2006 , 21:51   PTakeDam (The Specialists)
Reply With Quote #1

I am trying to detect when a player is hurt. This works, but I cannot determine how to get the user's ID. So here is my code:

Code:
register_event("PTakeDam","healthFunc","a"); // . . . //Id will be 0 public healthFunc(id) {         //The message size was 14, so I made this, probably a shot in the dark     new num[15];     num[0] = read_data(-1);     num[1] = read_data(0);     num[2] = read_data(1);     num[3] = read_data(2);     num[4] = read_data(3);     num[5] = read_data(4);     num[6] = read_data(5);     num[7] = read_data(6);     num[8] = read_data(7);     num[9] = read_data(8);     num[10] = read_data(9);     num[11] = read_data(10);     num[12] = read_data(11);     num[13] = read_data(12);     num[14] = read_data(13);            //Loop so if one of the read_data's is the victim or attacker, it prints to him     new num2,players[32]     get_players(players,num2,"c")     for(new i = 1; i < num2; i++) {         new playa = players[i];         if(is_user_admin(playa)) {             for(new q = 0; q < 15; q++) {                 new name[32];                 get_user_name(num[q],name,31);                                 //If they are not the server                 if(!contain(name,"justrp"))                     client_print(playa,print_chat,"num[%i]: %s^n",q,name);             }         }       }           return PLUGIN_HANDLED; }

Can anyone assist?
__________________
-Dest Romano

www.JustRP.com
A TSRP Server

Quote:
Originally Posted by Brad
Don't you go be bringing reality into this.
Des12 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 16:37.


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