SA-MP Forums Archive
How To Read INI - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How To Read INI (/showthread.php?tid=612567)



How To Read INI - javedali1211 - 19.07.2016

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


Re: How To Read INI +REP - Stinged - 19.07.2016

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



Re: How To Read INI +REP - OneDay - 19.07.2016

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


Re: How To Read INI +REP - javedali1211 - 19.07.2016

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?


Re: How To Read INI +REP - UltraScripter - 19.07.2016

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); 



Re: How To Read INI +REP - GuyB790 - 19.07.2016

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


Re: How To Read INI +REP - OneDay - 19.07.2016

Just change GetName(playerid) for params


Re: How To Read INI +REP - javedali1211 - 19.07.2016

can anyone make it for me with whole CMD:


Re: How To Read INI +REP - javedali1211 - 20.07.2016

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


Re: How To Read INI - javedali1211 - 20.07.2016

dump