How To Read INI
#1

how can i read a player stats when he is offline in server like i have to check a player data in server like /search [name]
when i type player name if player is registered it will show me his some data in server like his cash score and other things i will do myself i just need a lil help how can i read it in server and please explain me this
Reply
#2

What's your INI format?
Код:
String=Something
or
Код:
String = Something
Reply
#3

they are the same thing. Do you have a user system already and what it is?
Reply
#4

its the saving system

Код:
format(file, sizeof(file), USER_FILE, GetName(playerid));
    	new INI:ufile = INI_Open(file);
    	INI_WriteString(ufile, "pPass", PlayerInfo[playerid][pPass]);
    	INI_WriteInt(ufile, "aLevel",PlayerInfo[playerid][aLevel]);
how can i read any player Admin level PlayerInfo[playerid][aLevel]); it is the admin level so how can i read it in-game by using a command like /read name when i press any player name then it will show me his admin level?
Reply
#5

PHP код:
INI_ParseFile(UserPath(playerid), "playerdata_%s", .bExtra true, .extra playerid); 
PHP код:
new str[64];
format(strsizeof(str), "Admin level: %i"pInfo[playerid][pAdmin]);
SendClientMessage(playeridcolorstr); 
Reply
#6

Don't you mean INI_Int / INI_String ?
Read here: https://sampforum.blast.hk/showthread.php?tid=570957
Reply
#7

Just change GetName(playerid) for params
Reply
#8

can anyone make it for me with whole CMD:
Reply
#9

Quote:
Originally Posted by UltraScripter
Посмотреть сообщение
PHP код:
INI_ParseFile(UserPath(playerid), "playerdata_%s", .bExtra true, .extra playerid); 
PHP код:
new str[64];
format(strsizeof(str), "Admin level: %i"pInfo[playerid][pAdmin]);
SendClientMessage(playeridcolorstr); 
how can i show other player stats by using this function and can you explain me it with a command like /search [PlayerName] so that can read other player stats which i type in Command please anyone make it for me with a command
Reply
#10

dump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)