Team invite +REP
#1

How do I do it so that when they select the team members they say that you need an invitation
It would /invite [playerid] [members] this is my leader variable is only defined in an enum

PlayerInfo[playerid][cLider] != 1) //one is Members


PHP код:
//OnPlayerRequestClass
    
ShowPlayerDialog(playeridDIALOG_TEAMSDIALOG_STYLE_LIST"Seleccione un equнpo""{77B45A}Of Dragons\n{59BCD6}Templarios\n{FF5FAB}Members Only""Seleccionar","");
//OnPlayerSpawn
    
if(GetPlayerTeam(playerid) == DRAGONS)
    {
        
SetPlayerPos(playerid318.86391121.69781083.8828);
        
SetPlayerFacingAngle(playerid180.1659);
        
SetPlayerInterior(playerid5);
    }
    
    else if(
GetPlayerTeam(playerid) == TEMPLARIO)
    {
        
SetPlayerPos(playerid2264.5317, -1209.79461049.0234);
        
SetPlayerFacingAngle(playerid253.0367);
        
SetPlayerInterior(playerid10);
    }
    
    else if(
GetPlayerTeam(playerid) == MEMBERS)
    {
        
SetPlayerPos(playerid2324.6138, -1143.42071050.4922);
        
SetPlayerFacingAngle(playerid178.6559);
        
SetPlayerInterior(playerid12);
    }
//OnDialogResponse
                 
if(listitem == 0//Dragons
                 
{
                         
SetPlayerTeam(playeridDRAGONS);
                         
SetPlayerColor(playeridCOLOR_DRAGONS);
                         
SpawnPlayer(playerid);
                 }
                 if(
listitem == 1//Templarios
                 
{
                         
SetPlayerTeam(playeridTEMPLARIO);
                          
SetPlayerColor(playeridCOLOR_TEMPLARIOS);
                         
SpawnPlayer(playerid);
                 }
                 if(
listitem == 2//Members
                 
{
                         
SetPlayerTeam(playeridMEMBERS);
                          
SetPlayerColor(playeridCOLOR_MEMBERS);
                         
SpawnPlayer(playerid);
                 } 
Reply
#2

Why you don't use switch(listitem)?
Reply
#3

Quote:
Originally Posted by scripter112
Посмотреть сообщение
Why you don't use switch(listitem)?
What does it work for? how I have it goes well
Reply
#4

https://sampwiki.blast.hk/wiki/OnDialogResponse
Reply
#5

How I have it is going well, I just want that to enter the team members need an invitation
Reply
#6

UP help please
Reply
#7

Quote:
Originally Posted by Spawe
Посмотреть сообщение
UP help please
Don't you have /invite command? I still don't know what you want, isn't just use /invite?
Reply
#8

to enter this team need an invitation, I do not have the command



PHP код:
                 if(listitem == 2//Members 
                 

                         
SetPlayerTeam(playeridMEMBERS); 
                          
SetPlayerColor(playeridCOLOR_MEMBERS); 
                         
SpawnPlayer(playerid); 
                 } 
Reply
#9

-> OnDialogResponse

pawn Код:
if(listitem == 2) // Members
{
    if(!PlayerInfo[playerid][cInvite]) return ShowPlayerDialog(playerid, DIALOG_TEAMS, DIALOG_STYLE_LIST, "Seleccione un equнpo", "{77B45A}Of Dragons\n{59BCD6}Templarios\n{FF5FAB}Members Only", "Seleccionar","");
    SetPlayerTeam(playerid, MEMBERS);
    SetPlayerColor(playerid, COLOR_MEMBERS);
    SpawnPlayer(playerid);
    return 1;
}
You must add cmd: /invite [id] and set PlayerInfo[id][cInvite] = PlayerInfo[playerid][cLider]

Don't foget add to enum cInvite and check cLider of playerid.
Reply
#10

How would the invitation command be? you could make an exception for me, i do not have much knowledge
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)