[DELETED]
#1

Old Script, No Longer Developed/Supported. Dead Links.
Reply
#2

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).
Reply
#3

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];
 set(tmp,nickname);
 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);
 format(str,sizeof(str),"stats-%s",tmp);
 return str;
}
Reply
#4

Cheers

@ 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.


USERS PLEASE NOTE:
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
Scarface

Reply
#5

Update v1.1

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

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

Regards
Scarface
Reply
#6

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
Quote:

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

Regards
Whatup

Reply
#7

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.
Reply
#8

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.
Reply
#9

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 Код:
if(fexist(encode(PlayerName(playerid))))
    {
    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.
Reply
#10

POST REMOVED.

I am currently haveing problems with this script.

I will repost after some more tests...

Reply
#11

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.
Reply
#12

I have errors ...
Reply
#13

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

Quote:
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
Reply
#15

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

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

Quote:
Originally Posted by [GG
THEGAME ]
When you go back in the server, it resets your stats
PLZ update to 0.2 ?
Reply
#18

Who me?
Reply
#19

Quote:
Originally Posted by [GG
THEGAME ]
Who me?
obviously if he is quoting you, he is talking to you.
Reply
#20

Update this to 0.2.2, is very useful
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)