SA-MP Forums Archive
*** This topic title is not descriptive. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: *** This topic title is not descriptive. (/showthread.php?tid=390510)



*** This topic title is not descriptive. - cecko1235 - 06.11.2012

Hello, again! Now my problem is:
When i invite my friend in my gang Grove, it says you're invited in Ballas?

pawn Код:
if(strcmp(cmd, "/invite", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_WHITE, "Usage: /invite [playerid]");
                return 1;
            }
            giveplayerid = ReturnUser(tmp);
            if (PlayerInfo[playerid][pRank] == 6 && PlayerInfo[playerid][pMember] != TEAM_CIVILIAN)
            {
                if(PlayerInfo[giveplayerid][pMember] == TEAM_CIVILIAN)
                {
                    if(IsPlayerConnected(giveplayerid))
                    {
                        if(giveplayerid != INVALID_PLAYER_ID)
                        {
                            new form[128];
                            new faction = PlayerInfo[playerid][pMember];
                            FactionRequest[giveplayerid] = faction;
                            format(form,sizeof(form),"you'r invited to join in '%s'",TeamInfo[playerid][TeamName]);
                            SendClientMessage(giveplayerid,COLOR_LIGHTBLUE,form);
                            format(form,sizeof(form),"you invite %d to join. ",GetName(giveplayerid));
                            SendClientMessage(playerid,COLOR_LIGHTBLUE,form);
                            return 1;
                        }
                    }
                    else
                    {
                        SendClientMessage(playerid, COLOR_RED, " Invalid ID.");
                    }
                }
                else
                {
                    SendClientMessage(playerid, COLOR_RED, " he is in another gang.");
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_RED, "u not leader!");
            }
        }
        return 1;
    }



Re: problem again - cosbraa - 06.11.2012

TeamInfo[faction][TeamName]

?