SetPlayerTeamFromClass(playerid, classid); from dialog with dialog
#1

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.
Reply
#2

Yes (8char)
Reply
#3

Quote:
Originally Posted by Retardedwolf
View Post
Yes (8char)
Could you please show me an example, when i put that in the OnDialogRespone i get errors.
Reply
#4

Quote:
Originally Posted by Hayden_Bruin
View Post
Could you please show me an example, when i put that in the OnDialogRespone i get errors.
What errors?
Reply
#5

posted everything related.
pawn Code:
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;
}
Reply
#6

Maybe because OnDialogRespone doesn't have a classid parameter?
Reply
#7

it's fixed had to use Listitem, instead of classid
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)