/invite command dialogue?
#1

Hy, /invite command,how does he write it into the dialogue?

PHP код:
    if(strcmp(cmd"/leader"true) == 0)
    {
        
ShowPlayerDialog(playeridDIALOG_LEADERKDIALOG_STYLE_LIST,"Leader","Invite\nUninvite\nRangs","Megnйz","Mйgse"); // 7cucckombу
    

PHP код:
if(strcmp(cmd"/invite"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
Msg(playerid"/invite [Jбtйkos Neve / ID]");
                return 
1;
            }
            new 
para1;
            
para1 ReturnUser(tmp);
            if (
PlayerInfo[playerid][pLeader] >= 1)
            {
                if(
IsPlayerConnected(para1))
                {
                    if(
para1 != INVALID_PLAYER_ID)
                    {
                        if (
PlayerInfo[para1][pMember] == 0)
                        {
                            if(
PlayerInfo[playerid][pLeader] < || PlayerInfo[playerid][pLeader] > sizeof(Szervezetneve)) return 1;
                            if(
FrakcioInfoPlayerInfo[playerid][pLeader] ][fTagokSzama] >= FrakcioInfoPlayerInfo[playerid][pLeader]][fLimit])
                            
//    return Msg(playerid, "A frakciу tele van!");
                            
FrakcioInfoPlayerInfo[playerid][pLeader] ][fTagokSzama]++;
                            new 
szt PlayerInfo[playerid][pLeader] - 1;
                            
ChosenSkin[para1] = szt;
                            
SetPlayerSkin(para1Skinek[szt][0]);
                            
GetPlayerName(para1giveplayersizeof(giveplayer));
                            
GetPlayerName(playeridsendernamesizeof(sendername));
                            
PlayerInfo[para1][pMember] = PlayerInfo[playerid][pLeader];
                            
PlayerInfo[para1][pRank] = 0;
                            
printf("AdminParancs: %s has invited %s to join %s."sendernamegiveplayerSzervezetneve[szt][0]);
                            
format(stringsizeof(string), "Csatlakoztбl ide: %s"Szervezetneve[szt][0]);
                            
SendClientMessage(para1COLOR_LIGHTBLUEstring);
                            
format(stringsizeof(string), "Meghнvtad %s-t hozzбtok (%s)"giveplayerSzervezetneve[szt][0]);
                            
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
                            
GetPlayerPos(playeridChangePos[para1][0],ChangePos[para1][1],ChangePos[para1][2]);
                            
ChangePos2[para1][0] = GetPlayerInterior(playerid);
                            
ChangePos2[para1][1] = GetPlayerVirtualWorld(playerid);
                            
SetPlayerInterior(para1,0);
                            new 
rand random(sizeof(gInviteSpawns));
                            
SetPlayerPos(para1gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]); // Warp the player
                            
SetPlayerFacingAngle(para1gInviteSpawns[rand][3]);
                            
SetPlayerCameraPos(para1,gInviteSpawns[rand][0] + 3gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
                            
SetPlayerCameraLookAt(para1,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
                            
TogglePlayerControllable(para10);
                            
SelectChar[para1] = 255;
                            
SelectCharID[para1] = PlayerInfo[para1][pMember];
                            
SelectCharPlace[para1] = 1;
                            
PlayerInfo[para1][pChar] = ChosenSkin[para1];
                            
SendClientMessage(para1COLOR_LIGHTRED"* A kцvetkező skinйrt ird be 'next'");
                            
SendClientMessage(para1COLOR_LIGHTRED"* Ha vйgeztйl нrd be, hogy 'done'.");
                            new 
queryx[128];
                            
format(queryx128"UPDATE %s SET Member='%d' WHERE ID='%d'"SQL_DB_PlayerPlayerInfo[playerid][pLeader], SQLID(para1));
                            
mysql_query(queryx);
                        }
                        else
                        {
                            
SendClientMessage(playeridCOLOR_GREY"  A jбtйkos mбr egy Szerverezet / Banda / Csalбd tagja!");
                            return 
1;
                        }
                    }
                }
//not connected
            
}
            else
            {
                
SendClientMessage(playeridCOLOR_GRAD1"   Ezt a parancsot nem hasznбlhatod(csak leader)!");
            }
        }
        return 
1;
    } 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)