Player classes - grove,ballas...
#1

At first, this:
pawn Код:
new gTeam[MAX_PLAYERS];
then second,
pawn Код:
SetPlayerToTeamColor(playerid)
{
    if (gTeam[playerid] == TEAM_GROVE)
    {
        SetPlayerColor(playerid, TEAM_GROVE_COLOR);
    }
    else if (gTeam[playerid] == TEAM_BALLA)
    {
        SetPlayerColor(playerid, TEAM_BALLA_COLOR);
    }
}
Right?
And third:
pawn Код:
#define TEAM_GROVE 1
#define TEAM_BALLA 2
#define TEAM_GROVE_COLOR 0x00FF00AA // Bright Green (in RGBA format)
#define TEAM_BALLA_COLOR 0xFF00FFAA // Bright Purple
And then what?Thanks.
Reply
#2

https://sampwiki.blast.hk/wiki/PAWN_tuto...eam_deathmatch
Reply
#3

Haha, that's what I was reading, but I don't understand this:
pawn Код:
AddPlayerClass
How to make with skins and weapons + spawn too?
Reply
#4

https://sampwiki.blast.hk/wiki/AddPlayerClass

You can set the spawn position and the weapons too. Just read the parameters so you'll be able to pass the parameters correctly.
Reply
#5

Yes, I understand that, but where can I add "addplayerclass" for example: id 271 for the grove team I mean like when its skin selection it says like on Gametextforplayer ~g~Grove, and then he spawns in grove street?
Reply
#6

Help me, please, thanks.: )
Reply
#7

By adding the coordinates of Grove Street into the AddPlayerClass for skid 271 will set the player in Grove Street.

The tutorial you read pretty much shows that in SetPlayerTeamFromClass.
pawn Код:
SetPlayerTeamFromClass(playerid, classid)
{
    if (classid == 0)
    {
        gTeam[playerid] = TEAM_GROVE;
        GameTextForPlayer(playerid, "~g~GROVE", 2000, 4);
    }
    else
    {
        gTeam[playerid] = TEAM_BALLA;
        GameTextForPlayer(playerid, "~p~BALLAS", 2000, 4);
    }
}
Although, you'll need to change the classid according to the skins you use.
Reply
#8

Where can I change the number for the skins ids?
Reply
#9

I'll give you example for this
OnPlayerSpawn
pawn Код:
if (gTeam[playerid] == TEAM_GROVE)
    {
        SetPlayerSkin(playerid,270);
        GameTextForPlayer(playerid, "~g~You have taked your gang skin", 2000, 4);
    }
Reply
#10

AddPlayerClass(Skin, X, Y, Z, angle, weapon1, ammo, weapon2, ammo, weapon3, ammo);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)