28.11.2010, 04:17
As far as i know i'm not sure if this is possible, is there a way i could use SetPlayerTeamFromClass(playerid, classid); in a dialog?
Thanks in advance.
Thanks in advance.
C:\Documents and Settings\Hayden Bruin\Desktop\Pilot Heaven\gamemodes\pilotheaven.pwn(3952) : error 017: undefined symbol "classid"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
case 0:
{
SetPlayerPos(playerid, 2868.9717,-1964.1055,11.1094);
SetPlayerFacingAngle(playerid, 91.0);
SetPlayerToTeamColour(playerid);
(errorline) SetPlayerTeamFromClass(playerid, classid);
}
#define TEAM_PILOT 1
#define TEAM_ARMY 2
#define TEAM_RESCUE 3
#define TEAM_PILOT_COLOUR 0x0000BBAA
#define TEAM_ARMY_COLOUR 0xAA3333AA
#define TEAM_RESCUE_COLOUR 0x33CCFFAA
SetPlayerTeamFromClass(playerid, classid)
{
if(classid == 0)
{
gTeam[playerid] = TEAM_PILOT;
}
else if(classid == 1)
{
gTeam[playerid] = TEAM_ARMY;
}
else if(classid == 2)
{
gTeam[playerid] = TEAM_RESCUE;
}
}
SetPlayerToTeamColour(playerid)
{
if(gTeam[playerid] == TEAM_PILOT)
{
SetPlayerColor(playerid,TEAM_PILOT_COLOUR);
}
else if(gTeam[playerid] == TEAM_ARMY)
{
SetPlayerColor(playerid,TEAM_ARMY_COLOUR);
}
else if(gTeam[playerid] == TEAM_RESCUE)
{
SetPlayerColor(playerid,TEAM_RESCUE_COLOUR);
}
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerTeamFromClass(playerid, classid);
return 1;
}