Classid help
#1

i want 2 add more classid to the gteam like
Код:
 if classid == 0 -10
yuh know like ids 0-10 instead of having it as one can anyone tell how 2 to such?

SetPlayerTeamFromClass(playerid, classid)
{
if(classid == 0)
{
gTeam[playerid] = GROVE_STREET;
}
if(classid == 1)
{
gTeam[playerid] = POLICE;
}
}
Reply
#2

pawn Код:
new classid[MAX_PLAYERS] = 0;
Then on request spawn you need to add some way to pick them, the class id can be up to any number, you would use it like this:

pawn Код:
SetPlayerTeamFromClass(playerid, classid)
{
if(classid[playerid] == 0)
{
gTeam[playerid] = GROVE_STREET;
}
if(classid[playerid] == 1)
{
gTeam[playerid] = POLICE;
}
if(classid[playerid] == 2)
{
gTeam[playerid] = TEAM 3;
}
if(classid[playerid] == 3)
{
gTeam[playerid] = TEAM 4;
}
// Etc.
}
In your function "SetPlayerTeamFromClass" You'd need to edit the same accordingly.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)