Teams problem. -
Welsh - 04.11.2010
Hi, I've got this teams FS from a website and I've made it too what I need.
The problem with it is when I go into my server too make sure the name colors are right Team Police and Team Trucker both have the default SAMP orange, I don't think it's putting them into their teams.
TEAM_TRUCKER = Yellow
TEAM_POLICE = Blue
Thanks for your help, please give me a solution.
Код:
#include <a_samp>
#define TEAM_TRUCKER 1
#define TEAM_POLICE 2
#define TEAM_TRUCKER_COLOUR 0xFFFF00AA // Yellow
#define TEAM_POLICE_COLOUR 0x0000BBAA // Blue
new gTeam[MAX_PLAYERS];
main()
{
print("\n----------------------------------");
print(" Teams");
print("----------------------------------\n");
}
public OnGameModeInit()
{
AddPlayerClass(16,-1542.9456,-2742.9224,48.5385,70.0556,0,0,0,0,0,0); // TEAM_TRUCKER 1
AddPlayerClass(283,-2167.1899,-2382.9033,30.6172,142.7763,0,0,0,0,0,0); // TEAM_POLICE 2
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerTeamFromClass(playerid, classid);
return 1;
}
public OnPlayerSpawn(playerid)
{
SetPlayerToTeamColour(playerid);
return 1;
}
SetPlayerTeamFromClass(playerid, classid)
{
if(classid == 0)
{
gTeam[playerid] = TEAM_TRUCKER;
}
else if(classid == 0)
{
gTeam[playerid] = TEAM_POLICE;
}
}
SetPlayerToTeamColour(playerid)
{
if(gTeam[playerid] == TEAM_TRUCKER)
{
SetPlayerColor(playerid,TEAM_TRUCKER_COLOUR);
}
else if(gTeam[playerid] == TEAM_POLICE)
{
SetPlayerColor(playerid,TEAM_POLICE_COLOUR);
}
}
Re: Teams problem. -
cessil - 04.11.2010
don't use OnGameModeInit() if its a FS
Re: Teams problem. -
Welsh - 04.11.2010
That will fix it?
Re: Teams problem. -
SampStunta - 04.11.2010
Take away OnGameModeInIt()
Transfer into OnFilterScriptInIt()
But this looks more like a Gamemode.
Why did you say it was a Filterscript?
Re: Teams problem. -
Welsh - 04.11.2010
It is a FS. :S
Re: Teams problem. -
OldDirtyBastard - 04.11.2010
change from:
pawn Код:
public OnGameModeInit()
{
AddPlayerClass(16,-1542.9456,-2742.9224,48.5385,70.0556,0,0,0,0,0,0); // TEAM_TRUCKER 1
AddPlayerClass(283,-2167.1899,-2382.9033,30.6172,142.7763,0,0,0,0,0,0); // TEAM_POLICE 2
return 1;
}
to
pawn Код:
public OnFilterScriptInIt()
{
AddPlayerClass(16,-1542.9456,-2742.9224,48.5385,70.0556,0,0,0,0,0,0); // TEAM_TRUCKER 1
AddPlayerClass(283,-2167.1899,-2382.9033,30.6172,142.7763,0,0,0,0,0,0); // TEAM_POLICE 2
return 1;
}
sorry for the previous quote, i hited post lol...
Re: Teams problem. -
Seven. - 04.11.2010
fixed this for you
pawn Код:
SetPlayerTeamFromClass(playerid, classid)
{
if(classid == 0)
{
gTeam[playerid] = TEAM_TRUCKER;
}
else if(classid == 1)
{
gTeam[playerid] = TEAM_POLICE;
}
}
Re: Teams problem. -
Welsh - 04.11.2010
I have a question, how does this script actuall determin what skin is for TEAM_TRUCKER or TEAM_POLICE?
Re: Teams problem. -
DVDK - 04.11.2010
Quote:
Originally Posted by cessil
don't use OnGameModeInit() if its a FS
|
Don't talk trash, this isn't causing any problems at all.
Re: Teams problem. -
Tessar - 07.11.2010
[[[[REMOVED]]]]