[FilterScript] Dynamic Update System
#1

INTRO:
Basically it's an simple filterscript which allow you in game to add/remove/edit updates list.

COMMANDS:

/addupdates (rcon admin command!)
/delupdates (rcon admin command!)
/editupdate (rcon admin command!)
/updates
/maxupdates (rcon admin command!)


SCREEN SHOTS:









DOWNLOAD LINK:

PASTEBIN

BUGS FIXED:
Loop bug fixed.
No bugs founded if you found please inform me Thanks you.
Reply
#2

useful, thanks
Reply
#3

Quote:
Originally Posted by rfr
Посмотреть сообщение
useful, thanks
Your Welcome Sir, btw it's my second Filterscript
Reply
#4

Nice
Edit: Script doesn't even work.
You can only see Update ID 1
Reply
#5

Quote:
Originally Posted by jasperschellekens
Посмотреть сообщение
Nice
Edit: Script doesn't even work.
You can only see Update ID 1
Sir thanks to inform me, i fixed!

Reply
#6

not bad this'll come in handy, gj.
Reply
#7

Nice work, very helpful for developers and updates!
Reply
#8

/delupdate 1,2 not working btw when i do /delupdate 3 its working and its only removing by number 3
Reply
#9

Quote:
Originally Posted by RoyalGamer
Посмотреть сообщение
/delupdate 1,2 not working btw when i do /delupdate 3 its working and its only removing by number 3
Its working i have checked but if its not working for you so please provide me Screen shot.
Reply
#10

Quote:
Originally Posted by darkhunter332
Посмотреть сообщение
Nice work, very helpful for developers and updates!
Thank you bruh ❤️

Quote:
Originally Posted by RogueDrifter
Посмотреть сообщение
not bad this'll come in handy, gj.
Thank you too 😊
Reply
#11

If you already use sscanf, you can make
/update [add, edit, etc.] rather than /editupdate /addupdate


Why are you using PVars?
What if I use "UID" PVar in my gamemode, that'd mean that your filterscript would overwrite my PVars

Код:
new str[256];
Max. length of a message that you can send in a SendClientMessage is 144, so the array must be 145 with one for terminal.

Код:
format(tmp4, sizeof(tmp4), "Updates\tDate Of Update\n%s", tmp3);
Код:
format(s, sizeof(s), "update%d", x);
Why are you using format to append string? use strcat
Format would just be slower for such simple task.

Код:
h[256]
The dates are around 10 char, surely not 256 char
Код:
%d/%d/%d
2+2+4+3=11 max.
You have 245 wasted cells


Код:
for(new x=1 ; x<560 ; x++)
            {
                new s[256];
Its better to create the array outside the loop than to create an array for every loop, would just eat up processing time, moreover, if you'd create it outside, empty the string every loop with ``string[0] = EOS;``


I've noticed that you haven't stated max. length of string for an update line to be?
Reply
#12

For strcat example:

PHP код:
new string[144+1];
strcat(string,"\ni have not even read your code yet");
ShowPlayerDialog(playeridDIALOG_UPDATESDIALOG_STYLE_"Server Updates"string"Close"""); 
Reply
#13

Quote:
Originally Posted by rfr
Посмотреть сообщение
For strcat example:

PHP код:
new string[144];
strcat(string,"\ni have not even read your code yet");
ShowPlayerDialog(playeridDIALOG_UPDATESDIALOG_STYLE_"Server Updates"string"Close"""); 
Although the max. info length is 4096, don't forget about EOS / '\0' (End Of String)
144 + 1
Reply
#14

Quote:
Originally Posted by Kaperstone
Посмотреть сообщение
Although the max. info length is 4096, don't forget about EOS / '\0' (End Of String)
144 + 1
oh my bad. thank you.
Reply
#15

Nice work, keep it up.
Reply
#16

Quote:
Originally Posted by Kaperstone
Посмотреть сообщение
If you already use sscanf, you can make
/update [add, edit, etc.] rather than /editupdate /addupdate


Why are you using PVars?
What if I use "UID" PVar in my gamemode, that'd mean that your filterscript would overwrite my PVars

Код:
new str[256];
Max. length of a message that you can send in a SendClientMessage is 144, so the array must be 145 with one for terminal.

Код:
format(tmp4, sizeof(tmp4), "Updates\tDate Of Update\n%s", tmp3);
Код:
format(s, sizeof(s), "update%d", x);
Why are you using format to append string? use strcat
Format would just be slower for such simple task.

Код:
h[256]
The dates are around 10 char, surely not 256 char
Код:
%d/%d/%d
2+2+4+3=11 max.
You have 245 wasted cells


Код:
for(new x=1 ; x<560 ; x++)
            {
                new s[256];
Its better to create the array outside the loop than to create an array for every loop, would just eat up processing time, moreover, if you'd create it outside, empty the string every loop with ``string[0] = EOS;``


I've noticed that you haven't stated max. length of string for an update line to be?
Uhh if i say its my second fs then?
Thank you for telling my mistakes i will try to improve it.
Reply
#17

Quote:
Originally Posted by DonaldDuck
Посмотреть сообщение
Nice work, keep it up.
Thanks Bro
Reply
#18

Good job
Reply
#19

u call this dynamic, i call this shit. i would write my own system for something like that and use anything else than ini.
Reply
#20

Quote:
Originally Posted by Zoranzoki21
Посмотреть сообщение
No work. When I add update, it can not be seen.
Make sure to make an file in scriptfiles folder, name 'updates.ini'
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)