SA-MP Forums Archive
Faction Invite - 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: Faction Invite (/showthread.php?tid=374840)



Faction Invite - zT KiNgKoNg - 04.09.2012

i need some help with a faction invite commands
as you can see there are 3 factions
pawn Code:
CMD:finvite(playerid, params[])
{
    if(PlayerInfo[playerid][pFactionleader] >= 1 || 2 || 3 )
    {
    }
}



Re: Faction Invite - Gangster-rocks - 04.09.2012

pawn Code:
CMD:invite(playerid,params[])
{
    new id,str[128],ftext[40],pName[32],vName[32];
    if(pInfo[playerid][Leader] >= 1)
    {
        if(sscanf(params,"u",id)) return SendClientMessage(playerid,-1,"Usege: /invite [id]");
        if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED1,"Player not fond!!");
        if(pInfo[id][Member] >= 1) return SendClientMessage(playerid,COLOR_RED1,"Player is a nother faction you can't invite him");
        if(pInfo[playerid][Leader] == 1)
        {
            ftext = "LSPD";
        }
        else if(pInfo[playerid][Leader] == 2)
        {
            ftext = "FBI";
        }
                // go on here and add faction that u want
        GetPlayerName(playerid,pName,sizeof(pName));
        GetPlayerName(id,vName,sizeof(vName));
        format(str,sizeof(str),"Leader %s Has invited you to %s",pName,ftext);
        SendClientMessage(id,COLOR_LIGHTBLUE,str);
        format(str,sizeof(str),"You have invited %s to %s",vName,ftext);
        SendClientMessage(playerid,COLOR_LIGHTBLUE,str);
        pInfo[id][Member] = pInfo[playerid][Leader];
        pInfo[id][Rank] = 1;
    }
    return 1;
}
This from my gm its need hell of work


Re: Faction Invite - shamortiy - 04.09.2012

pawn Code:
CMD:finvite(playerid, params[])
{
    if(PlayerInfo[playerid][pFactionleader] >= 1)
    {
    }
}