Old Script, No Longer Developed/Supported. Dead Links.

Nice filterscript Scarface. Some feedback...

Your method of writing to a file based on the players name will cause issues if their name contains special characters not permitted by the respecitive file system. You may want to modify player names so they are file system friendly.

The way you calculate kills relies on the fact that players score corresponds to kills. You should add a note regarding this, otherwise gamemodes that show money as score will show some rediculous kill stats.

Why do you need to define ratio? Just stick the kill ratio calculation into the format command.

Not sure why you declare string2[256]. Its another array you don't need. Just reuse string[256]. Same kind of deal with temp1[256], temp2[256] in sStats.

Also as a general note to everyone the use of this kind of filterscript should only be used if you already don't capture any player statistics. Otherwise you will have conflicts all over the place (money will be your biggest problem).

use udb_encode(playername) from dracoblues DUDB[INC], also to increase compatibility with other modes like freeroam add a stats- to the start of every player name, i suggest adding it into the udb_encode function, im currently working on something like this for my stats script, heres my edited udb_encode function
pawn Код:
public udb_encode(nickname[]) {
 new tmp[MAX_STRING];
 new str[MAX_STRING];
 tmp=strreplace("_"," 00",tmp);
 tmp=strreplace(";"," 01",tmp);
 tmp=strreplace("!"," 02",tmp);
 tmp=strreplace("/"," 03",tmp);
 tmp=strreplace("\\"," 04",tmp);
 tmp=strreplace("["," 05",tmp);
 tmp=strreplace("]"," 06",tmp);
 tmp=strreplace("?"," 07",tmp);
 tmp=strreplace("."," 08",tmp);
 tmp=strreplace("*"," 09",tmp);
 tmp=strreplace("<"," 10",tmp);
 tmp=strreplace(">"," 11",tmp);
 tmp=strreplace("{"," 12",tmp);
 tmp=strreplace("}"," 13",tmp);
 return str;


@ BetaMaster

I realise the system would have problems with playernames, and as a tempporary solution i was planning to use Draco's encode feature. However i just wanted to get the first version out to see if it was popular. I was originally planning to do it properly (by rewriting lines within one file) However i just did not have the time. Im in the VC-MP team now so time is cut a little short.

Now that I didnt think of (probebly cuz im a TDM dev mostly) I will add a kills tally to it in v1.1.

I defined ratio as originally as i played around with Get/Set Property a little bit.

It will not be Anti-Cheat friendly either. However I Plan to intergrate it into the next FcukIt++ include file as an option.

Kind Regards


Update v1.1

- PlayerName Saving Issues
- KillCounter
- Minor Performance Improvements
- Illiminated GameMode/FilterScript User Database conflictions (Fully compatable with other scripts that use DUDB)

Just tested it on both Linux and Windows and it works a charm (Standard & "Special" Characters)


I just downloaded your script and this is what i found.

returns incorrect stats for other players. I think when you do //stats id it returns the players stats but your own kills giving you an incorrect ratio.

on line 157 this is what i found

format(string, sizeof(string), "Cash: $%d Kills: %d Deaths: %d Ratio: %0.2f", GetPlayerMoney(idplayer), KillCount[playerid], DeathCount[idplayer], Float:KillCount[idplayer]/FloateathCount[idplayer]);

Also can you make it write a a text file so you dont lose stats when the server is reset



The problem is actually with this line...

pawn Код:
if(DeathCount[playerid] == 0 && kills >= 0)
playerid should be idplayer, even I missed it the first time I looked at the code.

Oops, my bad your right. I was looking at the v1.0 source.

There is a big problem with this version.

The stats are saved based on your ID but when you rejoin you have a new ID and a new set of stats that don’t belong to you.

lol what are you talking about? There saved in an array of strings to a file that is named to your nickname. When you connect it will check if your filename (stats-<EncodedNickName>). It saves to file...how can it not be permanant? They are not saved to your ID, if you pay closer attention to the code.

pawn Код:
    SendClientMessage(playerid, COLOR_YELLOW, "<SSU v1.1> Stats Restored!");
    //Restore Stats.....
I have tested it completely and it works fine.

However yes i must of typed playerid accidentally instead of idplayer. Easily fixed. UPDATED!

Now the reason why i made it so it doesnt update the Score board is regular players will have scores very high and i thought the majority would rather the GameScore be for each individual session. And of course for compatability for "MoneyGrub" modes that display money as score.

Also i expected that people would use Set/Get Property instead of using the stats commands i set up. I just set it up as a basic fall back if people didnt want to create there own.


I am currently haveing problems with this script.

I will repost after some more tests...


Add me on msn or talk to me in IRC. I dont see where you should be having problems. I have had several people test it and gave it the all ok. Including myself, several times.

I have errors ...

Look at the date of the last post... 2006. It was made for 0.1

Originally Posted by darkwatch
Look at the date of the last post... 2006. It was made for 0.1
hmm it was nice if it was for 0.2

Create stats new version please, i very need stats for my server.

When you go back in the server, it resets your stats

Originally Posted by [GG
When you go back in the server, it resets your stats
PLZ update to 0.2 ?

Who me?

Originally Posted by [GG
Who me?
obviously if he is quoting you, he is talking to you.

Update this to 0.2.2, is very useful

Forum Jump:

Users browsing this thread: