Team invite
#1

I have this team in dialogresponse, I want that when selecting the assasins team I send it back to the dialogue unless someone invites it with the command / invite [playerid] [assassins]


Team dialog
PHP Code:
                 if(listitem == 3) //Assasins
                 
{
                         
SetPlayerTeam(playerid, ASSASINS);
                          
SetPlayerColor(playerid, COLOR_ASSASINS);
                         
SpawnPlayer(playerid);
                 } 
Reply
#2

Just add ShowPlayerDialog inside the statement.
Reply
#3

Yes friend but you can enter that team, I want that when selecting the Assassins team I tell you that you need an invitation and I send you to the dialogue to select another team

and when you put the command / invite [playerid] [assasins] I let you select that team I do not know how to do it

ShowPlayerDialog in public OnPlayerRequest

PHP Code:
ShowPlayerDialog(playerid, DIALOG_TEAMS, DIALOG_STYLE_LIST, "Seleccione un equнpo", "{77B45A}Of Dragons\n{59BCD6}Templarios\n{AF6AFF}Assasins 4volt", "Seleccionar",""); 
Reply
#4

Hello!

You can do it like this:
PHP Code:
if(listitem == 3) //Assasins
{
    
ShowPlayerDialog(playerid, DIALOG_TEAMS, DIALOG_STYLE_LIST, "Seleccione un equнpo", "{77B45A}Of Dragons\n{59BCD6}Templarios\n{AF6AFF}Assasins 4volt", "Seleccionar","");
    
SendClientMessage(playerid,-1,"WARNING: You have to get an invite for this team!");
    
//(cam) positions...
    
return 1;
} 
Quote:

//(cam) positions...

Maybe you have to fill in the positions and camera positions for the team selection.

PHP Code:
ocmd:invite(playerid,params[])
{
    new 
pID,team[10];
    if(
sscanf(params,"is[10]",pID,team))return SendClientMessage(playerid,-1,"WARNING: /invite [playerid] [Team (Assasins)]");
    if(!
strcmp(team,"assasins",true))
    {
        if(
GetPlayerTeam(playerid) != ASSASINS)return SendClientMessage(playerid,-1,"You don't have the permission to invite people!");
        
SetPlayerTeam(pID,ASSASINS);
        
SendClientMessage(pID,-1,"You was invited to join the team assasins!");
        return 
1;
    }
    return 
1;
} 
You can take this command. Maybe you have to correct your command processor and something else like sscanf and so on.

Best regards
Reply
#5

the //(cam) positions... Is it this?


PHP Code:
SetPlayerCameraPos(playerid, 2697.515869,-11.912069,104.235519);
SetPlayerCameraLookAt(playerid, 2518.345703,20.327928,55.445472); 
Reply
#6

Yeah, right!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)