Raised This Month: $ Target: $400
 0% 

get id's id


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
SoccerjamTR
Member
Join Date: May 2021
Old 10-27-2022 , 05:08   Re: get id's id
Reply With Quote #7

PHP Code:
#define RECORDS 2
enum {
    
KILL
    SELFKILL
}
new 
TopPlayer[3][RECORDS+1]
new 
TopPlayerName[RECORDS+1][33]
new 
Record[33][RECORDS+1]
TopPlayer[1][KILL] , TopPlayer[1][SELFKILL]

Event_Record(idrecordtypeamtexp) {
    if(
amt == -1)
        
Record[id][recordtype]++
    else
        
Record[id][recordtype] = amt

    
new playerRecord Record[id][recordtype]
    if(
playerRecord TopPlayer[1][recordtype])
    {
        
TopPlayer[0][recordtype] = id
        TopPlayer
[1][recordtype] = playerRecord
        
new name[MAX_NAME_LENGTH+1]
        
get_user_name(id,name,MAX_NAME_LENGTH)
        
format(TopPlayerName[recordtype],MAX_NAME_LENGTH,"%s",name)
    }



I didn't understand your code. My functions are example. I need index Topplayer[1][KILL] and this index's SELFKILL number because i want to make this:
newid = Topplayer[1][KILL](How to learn this player id)
Record[newid][SELFKILL]
I tried newid = find_player("a",TopPlayerName[KILL]) but sometimes it return 0

I use it like this message: Top KILLER'S(Rank 1-Player A 10 and Self-Kills: 5 )
PHP Code:
client_print(0,print_chat,"Rank1 Player %s - %d and Selfkills %d"id,Record[newid][KILL],Record[newid][SELFKILL]) 
SoccerjamTR 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 08:00.


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