Need help (2)
#1

How i set teams color ?
COPS = Blue
CIV = White
...

and

How i can make teams ?
Like i take cops skin (in class selection) and i will be team (TEAM_COPS 1)
How ?
Reply
#2

Use gTeam[playerid]

pawn Код:
#define TEAM_GROVE 1
#define TEAM_BALLA 2

#define TEAM_GROVE_COLOR 0x33AA33AA
#define TEAM_BALLA_COLOR 0x800080AA

new gTeam[MAX_PLAYERS];

// Then put this somewhere in OnPlayerRequestClass

    SetPlayerTeamFromClass(playerid, classid);
    {
    if(classid == 0 || classid == 1 || classid == 2)
    {
        gTeam[playerid] = TEAM_GROVE;
    }
    if(classid == 3 || classid == 4 || classid == 5)
    {
        gTeam[playerid] = TEAM_BALLA;
    }
Reply
#3

Код:
	SetPlayerTeamFromClass(playerid, classid);
	{
	if(classid == 0 || classid == 101 || classid == 17)
	{
		gTeam[playerid] = TEAM_CIV;
	}
	if(classid == 280 || classid == 281 || classid == 281)
	{
		gTeam[playerid] = TEAM_COPS;
	}
Is that correct ? 280, 281, 0, 101, 17 is skins id.
Reply
#4

You missed a bracket("}")
Reply
#5

Quote:
Originally Posted by Matuu
Код:
	SetPlayerTeamFromClass(playerid, classid);
	{
	if(classid == 0 || classid == 101 || classid == 17)
	{
		gTeam[playerid] = TEAM_CIV;
	}
	if(classid == 280 || classid == 281 || classid == 281)
	{
		gTeam[playerid] = TEAM_COPS;
	}
Is that correct ? 280, 281, 0, 101, 17 is skins id.
No. classid isn't the same as skin ID:

EG:

AddPlayerClass(0,...); // Class id 1
AddPlayerClass(101,...); // 2
AddPlayerClass(17,...); // 3
AddPlayerClass(280,...); // 4
AddPlayerClass(281,...); // 5

Quote:
Originally Posted by иєσz
You missed a bracket("}")
Oops thanks for correcting me :P
Reply
#6

Quote:
Originally Posted by иєσz
You missed a bracket("}")
Yeah, is that correct or not ?
Reply
#7

AddPlayerClass(281,...); // CLASS ID 5
^
What i do type see ? is that X, Y, Z ? or ?

(Oops sorry for doublepost!)
Reply
#8

The AddPlayerClasses are the skins you added into your gamemode.

AddPlayerClass(105,2522.6033,-1686.5757,13.5559,129.4222,0,0,0,0,0,0); // Class 0
Reply
#9

Quote:
Originally Posted by Matuu
Quote:
Originally Posted by иєσz
You missed a bracket("}")
Yeah, is that correct or not ?
Well, no. I have some simple hint for you: Count the brackets you open, and see if the brackets you close is equal. You opened 3 brackets, but closed 2. That means you forgot one bracket.
Reply
#10

C:\Documents and Settings\Martin\Desktop\SA-MP server\gamemodes\ESTCNR.pwn(762) : error 017: undefined symbol "SetPlayerTeamFromClass"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)