/quitfaction command
#2

Try this one..
pawn Код:
if(strcmp(cmd, "/quitfaction", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, " /quitfaction ");
                return 1;
            }
       if(PlayerInfo[playerid][pMember] >= 1)
       {


                           
                            format(string, sizeof(string), "You have left your faction.");
                            SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                           gTeam[playerid] = 3;
                            SetPlayerHealth(playerid, 0);
                            PlayerInfo[playerid][pTeam] = 3;
                            PlayerInfo[playerid][pLeader] = 0;
                            PlayerInfo[playerid][pMember] = 0;
                            PlayerInfo[playerid][pRank] = 0;
                            PlayerInfo[playerid][pChar] = 0;
                            new rand = random(sizeof(CIV));
                            SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
                            PlayerInfo[playerid][pModel] = CIV[rand];
                            MedicBill[playerid] = 0;
                            SpawnPlayer(playerid);
                        }

                }//not connected
           

        }
        return 1;
    }
Reply


Messages In This Thread
/quitfaction command - by pierhs - 07.05.2009, 16:10
Re: /quitfaction command - by killerx100 - 07.05.2009, 16:28
Re: /quitfaction command - by Alion133 - 09.05.2009, 03:10
Re: /quitfaction command - by Dark_Kostas - 09.05.2009, 06:58
Re: /quitfaction command - by arachimi - 09.05.2009, 08:44
Re: /quitfaction command - by ralf12 - 03.08.2009, 05:51
Re: /quitfaction command - by pierhs - 04.08.2009, 06:21

Forum Jump:


Users browsing this thread: 1 Guest(s)