SA-MP Forums Archive
Hi DM server help :) - 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: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Hi DM server help :) (/showthread.php?tid=320724)



Hi DM server help :) - oscar7610 - 24.02.2012

Hi im making a gang DM server but I need some help first.

Well Im thinking about making gang groups such as:

:Bloodz
:Grove
:Ballads
:Russian Mafia

Well you know what im trying to say.

Also I need to know how to make a log in screen (not a /login or /register) just on the login screen to show all the classes(bloodz,Grove etc..)

If you guys can teach me a little and help me out please I really appreciate this Thanks.


Re: Hi DM server help :) - Champ - 24.02.2012

check these gamemodes. these will help you

http://forum.sa-mp.com/showthread.ph...highlight=gang

http://forum.sa-mp.com/showthread.ph...highlight=gang

http://forum.sa-mp.com/showthread.ph...highlight=gang


Re: Hi DM server help :) - oscar7610 - 24.02.2012

thanks lad


Re : Hi DM server help :) - Steeve_Smith - 24.02.2012

As I said in another question:

Add gTeam[MAX_PLAYERS] in top of your script, this will store the player's team.

Now define your teams:

Example:

pawn Код:
#define RED_TEAM 0
#define GREEN_TEAM 1
Now OnPlayerRequestClass:

pawn Код:
switch(classid) // Switch to know which team the player is gonna choose
{
    case 0: // case 0: = The player is gonna choose the first AddPlayerClass AKA RED_TEAM
    {
        gTeam[playerid] = RED_TEAM; // Will set the player's team to RED_TEAM
        SetPlayerTeam(playerid, 1); // A player of the team 1 can't kill a player of the team 1
    }
    case 1: // case 1: = The player is gonna choose the second AddPlayerClass AKA GREEN_TEAM
    {
        gTeam[playerid] = GREEN_TEAM; // Will set the player's team to GREEN_TEAM
        SetPlayerTeam(playerid, 2); // A player of the team 2 can't kill a player of the team 2
    }
}
Don't forget to add your player classes.

Note: Personaly, I set the player's team (SetPlayerTeam) in the callback OnPlayerSpawn, using the condition:

pawn Код:
if(gTeam[playerid] == RED_TEAM)
{
    SetPlayerTeam(playerid, 1);
    SetPlayerColor(playerid, COLOR_RED);
}

// And so on...



Re: Hi DM server help :) - Mr.Fames - 24.02.2012

Also about the register system there's a good one using y_ini at the tutorials section