SA-MP Forums

SA-MP Forums (https://forum.sa-mp.com/index.php)
-   Filterscripts (https://forum.sa-mp.com/forumdisplay.php?f=17)
-   -   [FilterScript] Gang System [Version : Beta] [Mysql r41+] (https://forum.sa-mp.com/showthread.php?t=667727)

SiaReyes 04/07/2019 06:43 PM

Oblivion Gang System [New Release]
 
Oblivion Gang System


Gang System by Oblivion
Version : 1
Scripter: Oblivion



Version 1 Features:
  • Zone War System
  • Owner Zone color will be green and Enemy Zone will be red and Free Zone will be white.
  • Fixed minor bugs which I spotted!
  • Added /zonewar, /removezone and Captured Zones list
  • GameText is being used instead of Textdraws
    (See Images for more)

Beta Version Features:
  • Login and Disconnect gang messages
  • Each kill will earn a gang score
  • Gang tag along with chat
  • Basic Gang Commands
    (See Images for more)

Images:
Version Beta:
https://imgur.com/a/UbIknCr

Version 1:
https://imgur.com/a/RaHOpqQ

Download: [HOT FIX | Thanks to Calisthenics]

Version Beta:
Click Here

Version 1:
Click Here
[NOTE]: Ideas for zone war are gathered from various sources.

Note:
  • No support given to this script until the next version release! Enjoy <3
  • if you found any bugs, please report it in the comment section. This script has lack of optimizations.
  • If there is any mistake or issues in code please reply in down in comments if possible also post the fix if you know!

Special Thanks:
Credits: a_samp // Credits to SA-MP Team
streamer // Credits to Incognito
mysql // Credits to BlueG
sscanf2 // Credits to maddinat0r
foreach // Credits to Kar
zcmd // Credits to Zeex
YSI // Credits to ******

KeyOfKey 04/07/2019 07:06 PM

Re: Gang System [Version : Beta] [Mysql r41+]
 
I'll not need this since i already scripted a gang system but please for the sake of other people, put a pastebin link because GitHub ruins all the source code with that ^M^ stupid marks.

1sbedx 04/07/2019 07:33 PM

Re: Gang System [Version : Beta] [Mysql r41+]
 
Quote:

Originally Posted by KeyOfKey (Post 4104917)
I'll not need this since i already scripted a gang system but please for the sake of other people, put a pastebin link because GitHub ruins all the source code with that ^M^ stupid marks.

Do not blame GitHub, blame those who do not know how to use it properly.

@SiaReyes

https://help.github.com/en/articles/...e-line-endings
Or in your editor, change the line endings to "Unix".

Calisthenics 04/07/2019 08:36 PM

Re: Gang System [Version : Beta] [Mysql r41+]
 
1) You do not escape strings.
2) You do not delete cache in all parts.
3) You do not use the length parameter in cache function (here and here)
4) You create an iterator `ObliPlayers` when y_iterate does that already (internally).
5) Logon message should be inside `LoadPlayerGangData`
6) You do not check gang name or gang tag length in /gcreate and /grename command.
7) This is not how you should copy strings:
pawn Code:
CreateGangName[playerid] = gname;
CreateGangTag[playerid] = gtag;

format(GangInfo[i][GangName], 40, "%s", CreateGangName[playerid]);
format(GangInfo[i][GangTag], 5, "%s", CreateGangTag[playerid]);
Use `strcpy` macro instead.
8 ) Do not create variables inside loops.
9) Use `COUNT(*)` to find out how many members exist in the gang instead of this.
10) Instead of all this:
pawn Code:
foreach(new i : ObliPlayers)
{
    new checkname[MAX_PLAYER_NAME];
    GetPlayerName(i, checkname, sizeof(checkname));
    if(strcmp(checkname, kname, true, strlen(kname)) == 0)
    {
        pInfo[i][pGangRank] = GANG_RANK_NONE;
        pInfo[i][pGangID] = -1;
    }
}
You can just do it this way:
pawn Code:
new search_id;
if (!sscanf(kname, "r", search_id) && search_id != INVALID_PLAYER_ID)
{
     pInfo[search_id][pGangRank] = GANG_RANK_NONE;
     pInfo[search_id][pGangID] = -1;
}

SiaReyes 05/07/2019 07:40 AM

Re: Gang System [Version : Beta] [Mysql r41+]
 
Quote:

Originally Posted by 1sbedx (Post 4104921)
Do not blame GitHub, blame those who do not know how to use it properly.

@SiaReyes

https://help.github.com/en/articles/...e-line-endings
Or in your editor, change the line endings to "Unix".

I'm new to github, once i got time, I'll learn and fix it!

Quote:

Originally Posted by Calisthenics (Post 4104932)
1- 10

Thanks for your help, fixed those!

AzaMx 05/07/2019 02:38 PM

Re: Gang System [Version : Beta] [Mysql r41+]
 
it's not too bad.

SiaReyes 05/07/2019 02:46 PM

Re: Gang System [Version : Beta] [Mysql r41+]
 
Quote:

Originally Posted by LARC (Post 4104995)
Good job! Nice script

Quote:

Originally Posted by AzaMx (Post 4105013)
it's not too bad.

Thanks

SiaReyes 09/07/2019 08:02 PM

Re: Gang System [Version : Beta] [Mysql r41+]
 
New Verison 1:

Version 1 Features:
  • Zone War System
  • Owner Zone color will be green and Enemy Zone will be red and Free Zone will be white.
  • Fixed minor bugs which I spotted!
  • Added /zonewar, /removezone and Captured Zones list
  • GameText is being used instead of Textdraws
    (See Images for more)

Images: https://imgur.com/a/RaHOpqQ

Download : Click Here

PemburuHantu 06/09/2019 11:19 PM

Re: Gang System [Version : Beta] [Mysql r41+]
 
Can you make the version in Y_INI ?

josh 10/09/2019 12:10 PM

Re: Gang System [Version : Beta] [Mysql r41+]
 
Good job! Nice script


All times are GMT. The time now is 11:29 AM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.