SA-MP Forums Archive
[FilterScript] Advanced system minigames - 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] Advanced system minigames (/showthread.php?tid=622375)



Advanced system minigames - BrianFaria - 21.11.2016

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


Re: Advanced system minigames - RyderX - 21.11.2016

Good job thanks i'll use it for my server


Respuesta: Advanced system minigames - BrianFaria - 21.11.2016

Thanks


Re: Advanced system minigames - Eoussama - 21.11.2016

Noice, keep up


Re: Advanced system minigames - EdgarHN - 21.11.2016

Good job


Re: Advanced system minigames - BrianFaria - 21.11.2016

Thanks bro


Re: Advanced system minigames - SyS - 22.11.2016

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.


Respuesta: Advanced system minigames - BrianFaria - 22.11.2016

Thanks brother and thanks for your advice


Respuesta: Advanced system minigames - Swedky - 25.11.2016

Just some suggstions:


1.
pawn 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:
pawn 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


Re: Respuesta: Advanced system minigames - Jelly23 - 25.11.2016

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


1.
pawn 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:
pawn 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.


Re: Respuesta: Advanced system minigames - BrianFaria - 26.11.2016

Quote:
Originally Posted by EnzoMetlc
Посмотреть сообщение
Just some suggstions:


1.
pawn Код:
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:
pawn Код:
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
I do not get angry, everything is learned. Thank you!


Re: Advanced system minigames - Alpay0098 - 01.12.2016

Well done.


Re: Advanced system minigames - BrianFaria - 01.12.2016

Thanks


Re: Advanced system minigames - SeeD - 12.05.2018

Muy bueno, principalmente el juego de zombies el cual usare en mi GM respetando créditos!