SA-MP Forums Archive
help me with ganginvite - 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: help me with ganginvite (/showthread.php?tid=454689)



help me with ganginvite - hebron - 30.07.2013

I try to make a gangsystem
I created a gang on id's
now i want to make a ganginvite but if i doe /ganginvite [id] it always invite id 0

what i am doing wrong?

pawn Код:
if(strcmp(cmd, "/ganginvite", true) == 0)
    {
        new tmp[256],giveplayerid;
        giveplayerid = strval(tmp);

        if(gGang[playerid]==0)
        {
            SendClientMessage(playerid, 0x83BFBFFF, "You are not in a gang.");
            return 1;
        }
        new giveplayer[MAX_PLAYER_NAME];
        new sendername[MAX_PLAYER_NAME];
        new string[128];
        if(IsPlayerConnected(giveplayerid))
        {
        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
        GetPlayerName(playerid, sendername, sizeof(sendername));

        format(string, sizeof(string),"You invite %s in your gang.", giveplayer);
        SendClientMessage(playerid, 0x83BFBFFF, string);
        format(string, sizeof(string),"You get a gang invite from %s in his gang(id: %d)", sendername,gGang[playerid]);
        SendClientMessage(giveplayerid, 0x83BFBFFF, string);

        gangInvite[giveplayerid]=gGang[playerid];

        }
        return 1;
    }
Please help me!