[Tutorial] Creating a Deathmatch Gamemode
#9

This tutorial is an epic fail:

1.
Quote:

now its time for textdraw for this part i cant explain.

2. At the start of your gamemode you putted this:
pawn Код:
#define TEAM_BALLAS 1 //Team ID for Ballas
#define TEAM_GROVE 2 //Team ID for Grove
#define TEAM_VAGOS 3 //Team ID for Vagos
But at SetPlayerTeamFromClass you added TEAM_AZTECAS that didn't exist before -.-

pawn Код:
SetPlayerTeamFromClass(playerid, classid)
{
    if (classid == TEAM_BALLAS)
    {
        gTeam[playerid] = TEAM_BALLAS;
    }
    else if (classid == TEAM_GROVE)
    {
        gTeam[playerid] = TEAM_GROVE;
    }
    else if (classid == TEAM_VAGOS)
    {
        gTeam[playerid] = TEAM_VAGOS;
    }
    else if (classid == TEAM_AZTECAS)
    {
        gTeam[playerid] = TEAM_AZTECAS;
    }
}
3. Look at your OnPlayerRequestClass
Case 0 is Identical to case 1

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
        case 0: //ID 102 - Ballas
        {
            SetPlayerTeam(playerid,TEAM_BALLAS);
            SetPlayerInterior(playerid, 0);
            SetPlayerPos(playerid, 1873.4159,-1742.0531,13.5369);
            SetPlayerFacingAngle(playerid, 178);
            SetPlayerCameraLookAt(playerid,1873.4159,-1742.0531,13.5369);
            SetPlayerCameraPos(playerid, 1873.1909,-1746.9408,13.5469);
            SetPlayerColor(playerid, COLOR_VIOLET);
            TextDrawHideForPlayer(playerid, GroveTittle);
            TextDrawHideForPlayer(playerid, GroveWeap1);
            TextDrawHideForPlayer(playerid, GroveWeap2);
            TextDrawHideForPlayer(playerid, GroveWeap3);
            TextDrawHideForPlayer(playerid, GroveWeap4);
            TextDrawShowForPlayer(playerid, BallasTittle);
            TextDrawShowForPlayer(playerid, BallasWeap1);
            TextDrawShowForPlayer(playerid, BallasWeap2);
            TextDrawShowForPlayer(playerid, BallasWeap3);
            TextDrawShowForPlayer(playerid, BallasWeap4);
        }
        case 1: //ID 103 - Ballas
        {
            SetPlayerTeam(playerid,TEAM_BALLAS);
            SetPlayerInterior(playerid, 0);
            SetPlayerPos(playerid, 1873.4159,-1742.0531,13.5369);
            SetPlayerFacingAngle(playerid, 178);
            SetPlayerCameraLookAt(playerid,1873.4159,-1742.0531,13.5369);
            SetPlayerCameraPos(playerid, 1873.1909,-1746.9408,13.5469);
            SetPlayerColor(playerid, COLOR_VIOLET);
            TextDrawHideForPlayer(playerid, GroveTittle);
            TextDrawHideForPlayer(playerid, GroveWeap1);
            TextDrawHideForPlayer(playerid, GroveWeap2);
            TextDrawHideForPlayer(playerid, GroveWeap3);
            TextDrawHideForPlayer(playerid, GroveWeap4);
            TextDrawShowForPlayer(playerid, BallasTittle);
            TextDrawShowForPlayer(playerid, BallasWeap1);
            TextDrawShowForPlayer(playerid, BallasWeap2);
            TextDrawShowForPlayer(playerid, BallasWeap3);
            TextDrawShowForPlayer(playerid, BallasWeap4);
        }
        //[...]

Another , you could have done this way:

Код:
case 0, 1, 2: //
        {
            SetPlayerTeam(playerid,TEAM_BALLAS);
            SetPlayerInterior(playerid, 0);
            SetPlayerPos(playerid, 1873.4159,-1742.0531,13.5369);
            SetPlayerFacingAngle(playerid, 178);
            SetPlayerCameraLookAt(playerid,1873.4159,-1742.0531,13.5369);
            SetPlayerCameraPos(playerid, 1873.1909,-1746.9408,13.5469);
            SetPlayerColor(playerid, COLOR_VIOLET);
            TextDrawHideForPlayer(playerid, GroveTittle);
            TextDrawHideForPlayer(playerid, GroveWeap1);
            TextDrawHideForPlayer(playerid, GroveWeap2);
            TextDrawHideForPlayer(playerid, GroveWeap3);
            TextDrawHideForPlayer(playerid, GroveWeap4);
            TextDrawShowForPlayer(playerid, BallasTittle);
            TextDrawShowForPlayer(playerid, BallasWeap1);
            TextDrawShowForPlayer(playerid, BallasWeap2);
            TextDrawShowForPlayer(playerid, BallasWeap3);
            TextDrawShowForPlayer(playerid, BallasWeap4);
        }
Reply


Messages In This Thread
Never Mind - by GAMER_PS2 - 01.11.2011, 00:10
Re: Creating a Deathmatch Gamemode - by Medardo4Life - 01.11.2011, 02:21
Re: Creating a Deathmatch Gamemode - by Kitten - 01.11.2011, 02:33
Re: Creating a Deathmatch Gamemode - by GAMER_PS2 - 01.11.2011, 02:35
Re: Creating a Deathmatch Gamemode - by Norn - 01.11.2011, 02:43
Re: Creating a Deathmatch Gamemode - by GAMER_PS2 - 01.11.2011, 02:44
Re: Creating a Deathmatch Gamemode - by Kitten - 01.11.2011, 02:47
Re: Creating a Deathmatch Gamemode - by Norn - 01.11.2011, 06:33
Re: Creating a Deathmatch Gamemode - by Sasino97 - 01.11.2011, 08:33
Re: Creating a Deathmatch Gamemode - by Infinity - 01.11.2011, 09:51

Forum Jump:


Users browsing this thread: 1 Guest(s)