Teams
#9

Does it mean that I should not use 'SetPlayerTeam' for each team?

This is what I have in my script, is it wrong?:

PHP Code:
//Command
ShowPlayerDialog(playeridDialog_PTPDIALOG_STYLE_LIST"PTP - TEAMS""President\nPolice\nTerrorist""Select""Close");
//OnDialogResponse
case Dialog_PTP:
{
    if(
response)
    {
        switch(
listitem)
        {
            case 
0:
            {
                
SetPlayerTeam(playeridTeam_President); // team 0
            
                
new index random(sizeof(Ptp_Pos[])), team GetPlayerTeam(playerid);
                
SetPlayerPos(playeridPtp_Pos[team][index][0], Ptp_Pos[team][index][1], Ptp_Pos[team][index][2]);
                
SetPlayerFacingAngle(playeridPtp_Pos[team][index][3]);
                
                
//other codes
            
}
            case 
1:
            {
                
SetPlayerTeam(playeridTeam_Police); // team 1
                
                
new index random(sizeof(Ptp_Pos[])), team GetPlayerTeam(playerid);
                
SetPlayerPos(playeridPtp_Pos[team][index][0], Ptp_Pos[team][index][1], Ptp_Pos[team][index][2]);
                
SetPlayerFacingAngle(playeridPtp_Pos[team][index][3]);
                
                
//other codes
            
}
            case 
2:
            {
                
SetPlayerTeam(playeridTeam_Terrorist); // team 2
                
                
new index random(sizeof(Ptp_Pos[])), team GetPlayerTeam(playerid);
                
SetPlayerPos(playeridPtp_Pos[team][index][0], Ptp_Pos[team][index][1], Ptp_Pos[team][index][2]);
                
SetPlayerFacingAngle(playeridPtp_Pos[team][index][3]);
                
                
//other codes
            
}
        }
    }
    return 
1;

Reply


Messages In This Thread
Teams - by SapMan - 18.12.2018, 20:49
Re: Teams - by SapMan - 18.12.2018, 23:00
Re: Teams - by Threshold - 19.12.2018, 03:10
Re: Teams - by SapMan - 19.12.2018, 14:55
Re: Teams - by Osamakurdi - 19.12.2018, 15:24
Re: Teams - by Nero_3D - 19.12.2018, 17:49
Re: Teams - by SapMan - 19.12.2018, 22:18
Re: Teams - by Threshold - 20.12.2018, 02:16
Re: Teams - by SapMan - 20.12.2018, 17:43
Re: Teams - by Nero_3D - 20.12.2018, 18:03
Re: Teams - by SapMan - 20.12.2018, 20:16
Re: Teams - by Nero_3D - 20.12.2018, 23:05

Forum Jump:


Users browsing this thread: 3 Guest(s)