SA-MP Forums Archive
Offline watching someone player - 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: Offline watching someone player (/showthread.php?tid=449244)



Offline watching someone player - Luca12 - 07.07.2013

How can I make a command when is someone player offline i type the command and them print my example. If you know what I mean and i using yini. Thanks

The level of player
The Admin Level
....


Re: Offline watching someone player - Deathstalker - 07.07.2013

You'd have to parse the file to load the info and set it to a variable. This parsing/loading depends on your GM. Now since the player isn't online you'd have to use his name instead and load the file which has the name of the player. The variable can be called anything and it will only be temporary as it will be overwritten once the command is called again. Simple and efficient system with the help of the name of the player, a stock function and parsing of files using Y_INI. Now since you didn't give any code you'll have to do it on your own. You hopefully have an idea of how to do it now though. Good luck.


Re: Offline watching someone player - Luca12 - 08.07.2013

this is how I try but doesn't work i try with INI_Load but nothing. Please help. Thanks



pawn Код:
CMD:provjeri(playerid, params[])
{
    if(PlayerInfo[playerid][Admin] >= 1337 || IsPlayerAdmin(playerid))
    {
        new banstatus[64],banstatusx,admlv,gslevel,lvligraca,imestr[128],poslednjaaktivnost,imezz[MAX_PLAYER_NAME];
        if(sscanf(params,"s[MAX_PLAYER_NAME]", imezz))
        {
            SCM(playerid,GRAD2,"{FFAF00}Koristite: {FFFFFF}/provjeri [Ime_Prezime]");
            SCM(playerid, GRAD2, "*Napomena: Ime je osjetljivo na mala i velika slova, i takodjer mora da sadrzava donju crtu.");
            return 1;
        }
        format(imestr,128,"Users/%s.ini", imezz);
        if(!fexist(imestr)) return SCM(playerid, GRAD2,"{F81414}G-Protect: {FFFFFF}Korisnicki racun nije pronaden!");
        banstatusx = INI_Load("Nick");
        lvligraca = INI_Load("Level");
        admlv = INI_Load("AdminLevel");
        gslevel = INI_Load("GSLevel");
        poslednjaaktivnost = INI_Load("ZadnjaAktivnost");
        if(banstatusx == 0) banstatus = "Igrac nije banan...";



Re: Offline watching someone player - Luca12 - 08.07.2013

I try everything and I using yini but I don't know correct how to load player stats example lvl of the player can you help me give just one example.


Re: Offline watching someone player - Luca12 - 08.07.2013

I was read that tutorial but I didn't understand. Please ****** just one example and that it. Thanks


Re: Offline watching someone player - Luca12 - 08.07.2013

Try me just give me example how to read someone offline player lvl.


Re: Offline watching someone player - Luca12 - 10.07.2013

bump

anyone