SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 21/11/2016, 01:15 PM   #1
BrianFaria
Huge Clucker
 
BrianFaria's Avatar
 
Join Date: Oct 2015
Location: Argentina.
Posts: 432
Reputation: 81
Default Advanced system minigames

Hi, well, I came to bring a system of minigames that I did, it cost me a lot of work, it is very advanced the system, it has varieties of minigames.
Zombies
- Minigun
- Zone ww / rw
- Rocket DM
- And much more.
It has varieties of maps in Counter strike.
I hope you like and respect credits.


Images:







Download

Mediafire: http://www.mediafire.com/file/byr2dj...+minigames.pwn
Pastebin: http://pastebin.com/raw/krAfUaBN

INCLUDES:
ProgressBar: http://www.mediafire.com/file/lww6ux...rogressBar.inc
xFireworks: http://www.mediafire.com/file/vjbc2w...xFireworks.inc
__________________
[S]peed_.

Last edited by BrianFaria; 21/11/2016 at 02:32 PM.
BrianFaria is offline   Reply With Quote
Old 21/11/2016, 02:04 PM   #2
RyderX
Banned
 
Join Date: Oct 2016
Location: Lebanon,Beirut Rank: SA-MP Scripter
Posts: 595
Reputation: 53
Default Re: Advanced system minigames

Good job thanks i'll use it for my server
RyderX is offline   Reply With Quote
Old 21/11/2016, 02:16 PM   #3
BrianFaria
Huge Clucker
 
BrianFaria's Avatar
 
Join Date: Oct 2015
Location: Argentina.
Posts: 432
Reputation: 81
Default Respuesta: Advanced system minigames

Thanks
__________________
[S]peed_.
BrianFaria is offline   Reply With Quote
Old 21/11/2016, 02:33 PM   #4
Eoussama
High-roller
 
Eoussama's Avatar
 
Join Date: Jul 2016
Location: Kingdom of Morocco // Tangier
Posts: 1,245
Reputation: 193
Default Re: Advanced system minigames

Noice, keep up
__________________

|===[Web taxi]===|
List of my work
Github
Pastebin

|===[Interesting topics]===|
Semantic Versioning


Eoussama is offline   Reply With Quote
Old 21/11/2016, 04:16 PM   #5
EdgarHN
Big Clucker
 
EdgarHN's Avatar
 
Join Date: Feb 2016
Location: Los angeles, CA.
Posts: 67
Reputation: 1
Default Re: Advanced system minigames

Good job
EdgarHN is offline   Reply With Quote
Old 21/11/2016, 10:07 PM   #6
BrianFaria
Huge Clucker
 
BrianFaria's Avatar
 
Join Date: Oct 2015
Location: Argentina.
Posts: 432
Reputation: 81
Default Re: Advanced system minigames

Thanks bro
__________________
[S]peed_.
BrianFaria is offline   Reply With Quote
Old 22/11/2016, 12:14 AM   #7
SyS
High-roller
 
SyS's Avatar
 
Join Date: Oct 2015
Posts: 1,971
Reputation: 447
Default Re: Advanced system minigames

Good job i like it but i also have some suggestions to this script.
You can use switch in many places instead of if and else statements as it is much more efficient and faster.
You can also use foreach instead of normal for loop to loop through connected players.
SyS is offline   Reply With Quote
Old 22/11/2016, 06:21 AM   #8
BrianFaria
Huge Clucker
 
BrianFaria's Avatar
 
Join Date: Oct 2015
Location: Argentina.
Posts: 432
Reputation: 81
Default Respuesta: Advanced system minigames

Thanks brother and thanks for your advice
__________________
[S]peed_.
BrianFaria is offline   Reply With Quote
Old 25/11/2016, 07:03 AM   #9
Swedky
Banned
 
Join Date: Jun 2013
Location: Argentina.
Posts: 2,079
Reputation: 827
Default Respuesta: Advanced system minigames

Just some suggstions:


1.
Code:
CMD:exit(playerid, params[])
{
	SpawnPlayer(playerid);
	ActualizarJuegos();
	EsHumano[playerid] = 0;
	EsZombie[playerid] = 0;
	Carnes[playerid] = 0;
	MediKits[playerid] = 0;
	Game[playerid][Zhomviez] = 0;
	Game[playerid][CSMap1] = 0;
	Game[playerid][CSMap2] = 0;
	Game[playerid][CSMap3] = 0;
	Game[playerid][CSMap4] = 0;
	Game[playerid][CSMap5] = 0;
	Game[playerid][CSMap6] = 0;
	Game[playerid][CSMap7] = 0;
	Game[playerid][CSMap8] = 0;
	Game[playerid][CSMap9] = 0;
	Game[playerid][CSMap10] = 0;
	Game[playerid][CSMap11] = 0;
	Game[playerid][MinigunDM] = 0;
	Game[playerid][Minigun2DM] = 0;
	Game[playerid][RocketDM] = 0;
	Game[playerid][RocketDM2] = 0;
	Game[playerid][ZonaWW] = 0;
	Game[playerid][ZonaRW] = 0;
	Game[playerid][Counter] = 0;
	return 1;
}

//...
CALLBACK: ActualizarJuegos()
{
	SetTimer("UsersCS", 1000, true);
	SetTimer("UsersCS11", 1000, true);
	SetTimer("UsersCS10", 1000, true);
	SetTimer("UsersCS9", 1000, true);
	SetTimer("UsersCS8", 1000, true);
	SetTimer("UsersCS7", 1000, true);
	SetTimer("UsersCS6", 1000, true);
	SetTimer("UsersCS5", 1000, true);
	SetTimer("UsersCS4", 1000, true);
	SetTimer("UsersCS3", 1000, true);
	SetTimer("UsersCS2", 1000, true);
	SetTimer("UsersCS1", 1000, true);
	SetTimer("UsersMinigun", 1000, true);
	SetTimer("UsersMinigun2", 1000, true);
	SetTimer("UsersRocket", 1000, true);
	SetTimer("UsersRocket2", 1000, true);
	SetTimer("UsersMDM", 1000, true);
	SetTimer("UsersZonaWW", 1000, true);
	SetTimer("UsersZonaRW", 1000, true);
	SetTimer("UsersZombieAttack", 1000, true);
	return 1;
}

That may over-load your server because it will be called often by players and will update these mini-games. You only need one timer, and use it for update all mini-games.

2. What Sreyas said.

3. What Sreyas said x2, or this:
Code:
stock UsersCS6()
{
    new Gaim12;
    for(new i, g = GetMaxPlayers(); i < g; i++)
    {
	//if(IsPlayerConnected(i)) You doesn't check if it's connected, cause "CSMap6" can verify that in some way.
        if(Game[i][CSMap6] == 1)  Gaim12++;
    }
    return Gaim12;
}


3. Don't use "CALLBACK:" for callbacks that are pre-defined by SA-MP includes. Use "public" instead.

4. You have many arrays size problems.


But don't get mad! You will improve this in a future
It's a nice system, so keep it up
Swedky is offline   Reply With Quote
Old 25/11/2016, 02:21 PM   #10
Jelly23
Guest
 
Posts: n/a
Default Re: Respuesta: Advanced system minigames

Quote:
Originally Posted by EnzoMetlc View Post
Just some suggstions:


1.
Code:
CMD:exit(playerid, params[])
{
	SpawnPlayer(playerid);
	ActualizarJuegos();
	EsHumano[playerid] = 0;
	EsZombie[playerid] = 0;
	Carnes[playerid] = 0;
	MediKits[playerid] = 0;
	Game[playerid][Zhomviez] = 0;
	Game[playerid][CSMap1] = 0;
	Game[playerid][CSMap2] = 0;
	Game[playerid][CSMap3] = 0;
	Game[playerid][CSMap4] = 0;
	Game[playerid][CSMap5] = 0;
	Game[playerid][CSMap6] = 0;
	Game[playerid][CSMap7] = 0;
	Game[playerid][CSMap8] = 0;
	Game[playerid][CSMap9] = 0;
	Game[playerid][CSMap10] = 0;
	Game[playerid][CSMap11] = 0;
	Game[playerid][MinigunDM] = 0;
	Game[playerid][Minigun2DM] = 0;
	Game[playerid][RocketDM] = 0;
	Game[playerid][RocketDM2] = 0;
	Game[playerid][ZonaWW] = 0;
	Game[playerid][ZonaRW] = 0;
	Game[playerid][Counter] = 0;
	return 1;
}

//...
CALLBACK: ActualizarJuegos()
{
	SetTimer("UsersCS", 1000, true);
	SetTimer("UsersCS11", 1000, true);
	SetTimer("UsersCS10", 1000, true);
	SetTimer("UsersCS9", 1000, true);
	SetTimer("UsersCS8", 1000, true);
	SetTimer("UsersCS7", 1000, true);
	SetTimer("UsersCS6", 1000, true);
	SetTimer("UsersCS5", 1000, true);
	SetTimer("UsersCS4", 1000, true);
	SetTimer("UsersCS3", 1000, true);
	SetTimer("UsersCS2", 1000, true);
	SetTimer("UsersCS1", 1000, true);
	SetTimer("UsersMinigun", 1000, true);
	SetTimer("UsersMinigun2", 1000, true);
	SetTimer("UsersRocket", 1000, true);
	SetTimer("UsersRocket2", 1000, true);
	SetTimer("UsersMDM", 1000, true);
	SetTimer("UsersZonaWW", 1000, true);
	SetTimer("UsersZonaRW", 1000, true);
	SetTimer("UsersZombieAttack", 1000, true);
	return 1;
}

That may over-load your server because it will be called often by players and will update these mini-games. You only need one timer, and use it for update all mini-games.

2. What Sreyas said.

3. What Sreyas said x2, or this:
Code:
stock UsersCS6()
{
    new Gaim12;
    for(new i, g = GetMaxPlayers(); i < g; i++)
    {
	//if(IsPlayerConnected(i)) You doesn't check if it's connected, cause "CSMap6" can verify that in some way.
        if(Game[i][CSMap6] == 1)  Gaim12++;
    }
    return Gaim12;
}


3. Don't use "CALLBACK:" for callbacks that are pre-defined by SA-MP includes. Use "public" instead.

4. You have many arrays size problems.


But don't get mad! You will improve this in a future
It's a nice system, so keep it up
Other than that, nice system.
  Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HELP ME (MINIGAMES SYSTEM) brianvans089 Scripting Help 1 10/07/2016 10:00 AM
Minigames System ? Toxik Scripting Help 3 05/07/2015 11:22 PM
[FilterScript] NRank System V1.0 | Advanced Rank System | 5+ Commands | Dialog System [Much More] Nirzor Filterscripts 9 18/04/2014 09:49 PM
[FilterScript] NAdmin [ V1.6 ] | 15 + Commands | Config System | Advanced Admin System Nirzor Filterscripts 16 05/09/2013 03:41 PM


All times are GMT. The time now is 07:49 PM.


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