SA-MP Forums Archive
stats for this fs? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: stats for this fs? (/showthread.php?tid=174355)



stats for this fs? - Face9000 - 05.09.2010

Hi all,i use this FS for my server:

http://forum.sa-mp.com/showthread.ph...t=admin+system

It has register command but dont have /stats

How i can add?

Thanks


Re: stats for this fs? - Cameltoe - 05.09.2010

Im not sure how the player vars gets saved..

but heres an function i jost wrote away.. not sure if it works but should:

pawn Код:
public PlayerStats(playerid)
{
     new string[128];
     format(string, 128, "Kills: %d - Deaths: %d",PlayerInfo[playerid][Kills], PlayerInfo[playerid][Deaths]);
     SendClientMessage(playerid);
}



Re: stats for this fs? - WillyP - 05.09.2010

look at ladmin

This forum requires that you wait 120 seconds between posts. Please try again in 67 seconds.
fuc anti spam


Re: stats for this fs? - Face9000 - 05.09.2010

Quote:
Originally Posted by Cameltoe
Посмотреть сообщение
Im not sure how the player vars gets saved..

but heres an function i jost wrote away.. not sure if it works but should:

pawn Код:
public PlayerStats(playerid)
{
     new string[128];
     format(string, 128, "Kills: %d - Deaths: %d",PlayerInfo[playerid][Kills], PlayerInfo[playerid][Deaths]);
     SendClientMessage(playerid);
}
Where i need to paste this code?


Re: stats for this fs? - Cameltoe - 05.09.2010

Quote:
Originally Posted by Logitech90
Посмотреть сообщение
Where i need to paste this code?
Depends on what command system you use..

Heres an example of it with Strcmp:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/stats", true, 6)) // 6 is the length of /stats
    {
        return PlayerStats(playerid);
    }
    return 0;
}



Re: stats for this fs? - Face9000 - 05.09.2010

Not work


Re: stats for this fs? - Cameltoe - 05.09.2010

What isnt working then?


Re: stats for this fs? - Fj0rtizFredde - 05.09.2010

Cameltoe dont you forget something in your first code? (,string)


Re: stats for this fs? - Cameltoe - 05.09.2010

Quote:
Originally Posted by Fj0rtizFredde
Посмотреть сообщение
Cameltoe dont you forget something in your first code? (,string)
Re-Read it i'm not forgetting anything ^^