Dynamic Update System -
Usmanmemon - 14.12.2017
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.
Re: Dynamic Update System -
rfr - 14.12.2017
useful, thanks
Re: Dynamic Update System -
Usmanmemon - 14.12.2017
Quote:
Originally Posted by rfr
useful, thanks
|
Your Welcome Sir, btw it's my second Filterscript
Re: Dynamic Update System -
jasperschellekens - 14.12.2017
Nice
Edit: Script doesn't even work.
You can only see Update ID 1
Re: Dynamic Update System -
Usmanmemon - 16.12.2017
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!
Re: Dynamic Update System -
RogueDrifter - 16.12.2017
not bad this'll come in handy, gj.
Re: Dynamic Update System -
darkhunter332 - 16.12.2017
Nice work, very helpful for developers and updates!
Re: Dynamic Update System -
RoyalGamer - 17.12.2017
/delupdate 1,2 not working btw when i do /delupdate 3 its working and its only removing by number 3
Re: Dynamic Update System -
Usmanmemon - 20.12.2017
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.
Re: Dynamic Update System -
Usmanmemon - 20.12.2017
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 😊
Re: Dynamic Update System -
Kaperstone - 20.12.2017
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
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.
The dates are around 10 char, surely not 256 char
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?
Re: Dynamic Update System -
rfr - 20.12.2017
For strcat example:
PHP код:
new string[144+1];
strcat(string,"\ni have not even read your code yet");
ShowPlayerDialog(playerid, DIALOG_UPDATES, DIALOG_STYLE_, "Server Updates", string, "Close", "");
Re: Dynamic Update System -
Kaperstone - 20.12.2017
Quote:
Originally Posted by rfr
For strcat example:
PHP код:
new string[144];
strcat(string,"\ni have not even read your code yet");
ShowPlayerDialog(playerid, DIALOG_UPDATES, DIALOG_STYLE_, "Server Updates", string, "Close", "");
|
Although the max. info length is 4096, don't forget about EOS / '\0' (End Of String)
144 + 1
Re: Dynamic Update System -
rfr - 20.12.2017
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.
Re: Dynamic Update System -
DonaldDuck - 21.12.2017
Nice work, keep it up.
Re: Dynamic Update System -
Usmanmemon - 21.12.2017
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
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.
The dates are around 10 char, surely not 256 char
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.
Re: Dynamic Update System -
Usmanmemon - 21.12.2017
Quote:
Originally Posted by DonaldDuck
Nice work, keep it up.
|
Thanks Bro
Re: Dynamic Update System -
Barnwell - 23.12.2017
Good job
Re: Dynamic Update System -
xMoBi - 23.12.2017
u call this dynamic, i call this shit. i would write my own system for something like that and use anything else than ini.
Re: Dynamic Update System -
Usmanmemon - 23.12.2017
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'