SA-MP Forums Archive
join gang command problems - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: join gang command problems (/showthread.php?tid=247102)



join gang command problems - Tom1412 - 07.04.2011

hey,

how to do so it sets the player into Faction 21 which is grove street
annd that we tryinn to do so they can do /joingang and it should set them to faction 21?

The command

pawn Код:
if(strcmp(cmd, "/joingang", true) == 0)
    {
       if(IsPlayerConnected(playerid))
       {
          if(!IsPlayerInRangeOfPoint(playerid, 7.0, 2522.0837,-1678.5382,15.4970)) return SendClientMessage(playerid,-1,"You need to be in Grove St to use this!");
          GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
          SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have joined Grove Street family.");
          SetPlayerSkin(playerid, 105);
          SafeGivePlayerWeapon(playerid, 22, 120);
          SafeGivePlayerWeapon(playerid, 5, 1);
          gTeam[playerid] = 21;
          PlayerInfo[playerid][pRank] = 1;
          PlayerInfo[playerid][pMember] = 21;
          PlayerInfo[playerid][pTeam] = 12;
          return 1;
       }
    }