SA-MP Forums Archive
Player classes - grove,ballas... - 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: Player classes - grove,ballas... (/showthread.php?tid=471974)



Player classes - grove,ballas... - Aleksabre - 26.10.2013

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.


Re: Player classes - grove,ballas... - Konstantinos - 26.10.2013

https://sampwiki.blast.hk/wiki/PAWN_tuto...eam_deathmatch


Re: Player classes - grove,ballas... - Aleksabre - 26.10.2013

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


Re: Player classes - grove,ballas... - Konstantinos - 26.10.2013

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.


Re: Player classes - grove,ballas... - Aleksabre - 26.10.2013

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?


Re: Player classes - grove,ballas... - Aleksabre - 26.10.2013

Help me, please, thanks.: )


Re: Player classes - grove,ballas... - Konstantinos - 26.10.2013

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.


Re: Player classes - grove,ballas... - Aleksabre - 26.10.2013

Where can I change the number for the skins ids?


Re: Player classes - grove,ballas... - SilentSoul - 26.10.2013

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);
    }



Re: Player classes - grove,ballas... - davve95 - 26.10.2013

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