SA-MP Forums Archive
[FilterScript] Perks System (v: [On Update]) [DINI, ZCMD] - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Perks System (v: [On Update]) [DINI, ZCMD] (/showthread.php?tid=654298)



Perks System (v: [On Update]) [DINI, ZCMD] - CaptainBoi - 25.05.2018

Introduction
Well i worked alot on this scrip, i have searched perk system but i didnot got any on sa:mp forum and here my new filterscript of perks system which includes some cool features which i will describe below..

Commands
*/perks (to see availabel perks)
*/setperkpoints (to set your perk points which you have to buy)
*/setperklevel (to set perk [admin command])

Perks
*Untouchable
*Juggernaut
*Recovering
*Shockwave

Uses
*Untouchable: Temporary Invurability
*Juggernaut: Super Heavy Armour
*Recovering: Regenerate Health
*Shockwave: Stun Players

Credits
Код:
/*******************************************************************
 *                                   Credits......                 *
 *																   *
 *																   *
 * >>>>>>>>>>> Don't remove credits..............<<<<<<<<<<<       *
 *																   *
 * >>>>>>>>>>>>Don't release it without my permission...<<<<<<<    *
 *																   *
 * >>>>CaptainBoi: Working on it all the time.. <<<                *
 *																   *
 * >>>>Morken: Helping me... <<<<								   *
 *																   *
 * Includes : <a_samp> | SA:MP  || <sscanf2> |  [well]idk ||<dini> | Dracoblue || <zcmd> | Zeex
 *																   *
 *>>>>>>>>>>>>> Comment Below How Is It.... <<<<<<<<<<<<           *
 *																   *
 ******************************************************************/
Codes
Pastebin

Bugs
*I didnot got any bug yet, if you found report it here.



Re: Perks System (v: [On Update]) [DINI, ZCMD] - CaptainBoi - 27.05.2018

150: views
0: comments

what happen to samp users lol

bump


Re: Perks System (v: [On Update]) [DINI, ZCMD] - jasperschellekens - 27.05.2018

Quote:
Originally Posted by CaptainBoi
Посмотреть сообщение
150: views
0: comments

what happen to samp users lol

bump
Well simple; Its not worthy to reply on


Re: Perks System (v: [On Update]) [DINI, ZCMD] - Gammix - 27.05.2018

Quote:
Originally Posted by jasperschellekens
Посмотреть сообщение
Well simple; Its not worthy to reply on
Savage!


Re: Perks System (v: [On Update]) [DINI, ZCMD] - CaptainBoi - 22.06.2018

i know


Re: Perks System (v: [On Update]) [DINI, ZCMD] - Lokii - 22.06.2018

Quote:
Originally Posted by CaptainBoi
Посмотреть сообщение
i know
nice bump


Re: Perks System (v: [On Update]) [DINI, ZCMD] - RogueDrifter - 22.06.2018

You want comments? stop bumping this shit and let people decide on their own.

It's a joke, first of all DINI? (I know right i'm the one to talk LOL) BUT I IMPROVED.

Overall, my point is DINI is SLOW, many other ways could've been used other than that and come on i mean 2018 and dini in a whole system isn't just decent, the system itself looks like one of those custom-made ones and hardly fits anywhere if it even works.

This:
PHP код:
new perkpoints[MAX_PLAYERS];
new 
perks[MAX_PLAYERS][10][5];
new 
perkcd[MAX_PLAYERS][10];
new 
perkregentimer[MAX_PLAYERS];
new 
Float:pmaxhealth[MAX_PLAYERS];
new 
Float:pmaxarmour[MAX_PLAYERS];
new 
Float:phealth[MAX_PLAYERS]; 
Why not group all of that into an enum to make the code look more decent if you're going to use so many player variables?

And the names don't make sense one bit.

Код:
#define accounts "accounts"
Creativity at it's finest lmao.


The code also isn't fully indented and you're leaving unused functions around which is very lazy and annoying.

The whole use of this:
Код:
 dini_Int(FileDirectory(accounts, playername(playerid)), "maxhealth");
Made my eyes bleed a bit, why not create a global variable for the file, open the file then use the variables for gods sake this is destroying the readability even more.

Actually i'm starting to think this is a compilation of shit copy-pasta went wrong, the use of
Код:
phealth[playerid]
...the variable doesn't make any sense at all, scroll through your own code you'll shit yourself and give yourself a few kicks maybe if you even wrote it.

So you created a function to grab a player's name, then you do this:
Код:
                 new pname[MAX_PLAYER_NAME];
                 GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
*facepalm*


And this thing:
PHP код:
                 SendClientMessage(playeridCOLOR_ORANGE"You Are Now Immune To Almost Everything in this world");
                 
SetPlayerHealth(playerid99999); 
Sorry son you're not immune to everything in the world, actually you're not immune to anything lol that's not how 'god mode' works at all.

And these arrays in the variables:
Код:
new perkcd[MAX_PLAYERS][10];
new perks[MAX_PLAYERS][10][5];
Don't make any sense either, you didn't even use them all and i'm not sure why it was needed in the first place.

This at OnDialogResponse:

Код:
       return 0;
    }
    return 1;
}
You're supposed to return 0 at the end of OnDialogResponse to pass it on to the next script and not limit it to this certain one.

Congrats on your spaghetti code keep bumping it more maybe it'll get better.
I didn't really want to get all pissy but I don't understand why bump a release if you're not announcing an update? Doesn't make any sense.

*Looks at Pottus* Not decent enough to be a release, 1-star from me. ^-^


Re: Perks System (v: [On Update]) [DINI, ZCMD] - CaptainBoi - 24.06.2018

i a also improved to mysql but this was my 1st release as dini and on that time i id not knew mysql much but now i m good at mysql so i dont need to bump over here becuz now my releases will be with Mysql or sqlite


Re: Perks System (v: [On Update]) [DINI, ZCMD] - Calgon - 24.06.2018

Quote:
Originally Posted by CaptainBoi
Посмотреть сообщение
i a also improved to mysql but this was my 1st release as dini and on that time i id not knew mysql much but now i m good at mysql so i dont need to bump over here becuz now my releases will be with Mysql or sqlite
w h a t


Re: Perks System (v: [On Update]) [DINI, ZCMD] - CodeStyle175 - 24.06.2018

whats the point of releasing such scripts in 2018 are you trying to show that you learned to code something or what are you even trying?
* don't use dini.
* you create function for player name and then you dont even use it.
* string sizes are too big wasting resources.
* use more arrays.