Justice Scripting Questions Topic
#2

pawn Код:
if(strcmp(cmd, "/gang", true) == 0)
    {
        GetPlayerName(playerid, sendername, sizeof(sendername));
        if(gTeam[playerid] == GANGTEAM)
        {
            SendClientMessage(playerid, COLOR_GRAD2, "You are not a gangmember.");
            return 1;
        }
        if (gTeam[playerid] == GANGTEAM)
        {
            if (PlayerToPoint(3, playerid,x,y,z)
            {
                gTeam[playerid] = GANGTEAM;
                SetPlayerToTeamColor(playerid);
                format(string, sizeof(string), "* %s Puts his guns back in the base.", sendername);
                SetPlayerWeapons(playerid);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                printf("%s", string);
                return 1;
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD2, "You are not at a gangbase.");
                return 1;
            }
        }
        if (gTeam[playerid] == GANGTEAM)
        {
            if (PlayerToPoint(3, playerid,x,y,z)
            {
                gTeam[playerid] = GANGTEAM;
                SetPlayerToTeamColor(playerid);
                {
                    format(string, sizeof(string), "* Gangleader %s Takes some guns out of the base", sendername);
                }
                else
                {
                    format(string, sizeof(string), "* Gangmember %s Takes some guns out of the base.", sendername);
                }
                SetPlayerWeapons(playerid);
            GivePlayerWeapon(playerid,28,999999);//uzi
                GivePlayerWeapon(playerid,26,999999);//sawnoff
                GivePlayerWeapon(playerid,24,999999);//deagle
                GivePlayerWeapon(playerid,31,999999);//m4
                GivePlayerWeapon(playerid,34,999999);//sniper
                GivePlayerWeapon(playerid,4,1);//knife
                SetPlayerHealth(playerid, 100.0);
                SetPlayerArmour(playerid, 100.0);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                printf("%s", string);
                return 1;
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD2, "You are not in the gangbase.");
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_GRAD2, "You are not part of any gang.");
            return 1;
        }
        return 1;
    }
Paste it under OnPlayerCommandText.

Change GANGTEAM to the team you want.
Reply


Messages In This Thread
Justice Scripting Questions Topic - by T.I. - 15.06.2009, 21:15
Re: Justice Scripting Questions Topic - by joeri55 - 15.06.2009, 22:03
Re: Justice Scripting Questions Topic - by T.I. - 16.06.2009, 08:00
Re: Justice Scripting Questions Topic - by Blacklite - 16.06.2009, 09:59
Re: Justice Scripting Questions Topic - by T.I. - 17.06.2009, 07:06

Forum Jump:


Users browsing this thread: 1 Guest(s)