View Single Post
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 08-09-2021 , 22:55   Re: Getting global data from non-id publics
Reply With Quote #8

Quote:
Originally Posted by Crackhead69 View Post
It has nothing specific in the example that i want, i am just curious.
Get_loguser_index() is what I use.

Grenade Suicide example.
Spoiler
Code:
stock get_loguser_index() { new loguser[80], name[32] read_logargv(0, loguser, 79) parse_loguser(loguser, name, 31) return get_user_index(name); }

Quote:
But is there any other more modern-like way of doing this?
Code:
stock get_loguser_index() {     new log_user[MAX_RESOURCE_PATH_LENGTH + MAX_IP_LENGTH], name[MAX_PLAYERS];     read_logargv(0, log_user, charsmax(log_user));     parse_loguser(log_user, name, charsmax(name));     return get_user_index(name); }


Later is identical just more prudent. Back to getting index within a function without it. They have to do something first and it be logged. Then the stock can extract the index for use.
__________________
DJEarthQuake is offline