#8

Quote:
Originally Posted by BodyBoardVEVO
Посмотреть сообщение
How From This I can make in 1 CMD
Try this
pawn Код:
CMD:rob(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid,1.0,1139.7198,-4.0644,1000.6719) && GetPlayerVirtualWorld(playerid) == 2)
    {
        if(GetTeam{playerid} != CLASS_CIV) return SendClientMessage(playerid, RED, "Only civilians can rob places.");
        if(IsRobbingVegas{playerid} == true) return SendClientMessage(playerid, RED, "Your already robbing the joint.");
        if(IsPlayerHoldingAGun(playerid) == 0 || HasBeenCuffed{playerid} == true) return SendClientMessage(playerid, RED, "You must be holding a gun to rob places.");
        if((gettime() - 120) < TimerInfo[playerid][CMD_timer17]) return SendClientMessage(playerid, RED, "Please wait before using this command again.");
        TimerInfo[playerid][CMD_timer17] = gettime();
        new chance = random(3);
        if(chance == 0)
        {
            format(fstr, sizeof(fstr),  "[DISPATCH]: Suspect %s [%d] has attempted to rob the New Vegas Casino at The New Vegas Strip.", GetName(playerid), playerid);
            CopRadio(BLUE, fstr);
            SendClientMessage(playerid, RED, "You have failed to rob the New Vegas Casino.");
            GameTextForPlayer(playerid, "~w~Robbery ~r~Failed", 5000, 5);
            SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid) + 4);
        }
        {
            if((gettime() - 120) < vegasrobbed) return SendClientMessage(playerid, RED, "This place has been robbed recently, try again later.");
            format(fstr, sizeof(fstr), "[DISPATCH]: Suspect %s [%d] is now robbing the New Vegas Casino at The New Vegas Strip.", GetName(playerid), playerid);
            CopRadio(BLUE, fstr);
            SendClientMessage(playerid, LIGHTGREEN, "Your robbing the New Vegas Casino, DON'T LEAVE THE CHECKPOINT!");
            GameTextForPlayer(playerid, "~r~Holdup ~w~In ~g~Progress...~n~~r~Dont Leave ~w~The ~r~Checkpoint.", 25000, 5);
            SetPlayerWantedLevel(playerid,GetPlayerWantedLevel(playerid)+6);
            IsRobbingVegas{playerid} = true;
            vegastimer{playerid} = SetTimerEx("VegasRob", 25000, false, "d", playerid);
            ApplyAnimation(playerid,"ped","ARRESTgun",4.1,0,1,1,1,1);
            vegasrobbed = gettime();
        }
        else
        {
            SendClientMessage(playerid, RED, "Your not at the robbery checkpoint.");
        }
            new astring[100],pName[24];
            GetPlayerName(playerid,(pName),sizeof(pName));
            format(astring,sizeof(astring),"%s [%d] typed: /rob",pName,playerid);
            SendAdminMessage(GREY,astring);
        }
    }
    else if(IsPlayerInRangeOfPoint(playerid,1.0,1139.7198,-4.0644,1000.6719) && GetPlayerVirtualWorld(playerid) == 3)
    {
        if(GetTeam{playerid} != CLASS_CIV) return SendClientMessage(playerid, RED, "Only civilians can rob places.");
        if(IsRobbingRedsands{playerid} == true) return SendClientMessage(playerid, RED, "Your already robbing the joint.");
        if(IsPlayerHoldingAGun(playerid) == 0 || HasBeenCuffed{playerid} == true) return SendClientMessage(playerid, RED, "You must be holding a gun to rob places.");
        if((gettime() - 120) < TimerInfo[playerid][CMD_timer18]) return SendClientMessage(playerid, RED, "Please wait before using this command again.");
        TimerInfo[playerid][CMD_timer18] = gettime();
        new chance = random(3);
        if(chance == 0)
        {
            format(fstr, sizeof(fstr),  "[DISPATCH]: Suspect %s [%d] has attempted to rob the Redsands Casino at Redsands West.", GetName(playerid), playerid);
            CopRadio(BLUE, fstr);
            SendClientMessage(playerid, RED, "You have failed to rob the Redsands Casino.");
            GameTextForPlayer(playerid, "~w~Robbery ~r~Failed", 5000, 5);
            SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid) + 4);
        }
        {
            if((gettime() - 120) < redrobbed) return SendClientMessage(playerid, RED, "This place has been robbed recently, try again later.");
            format(fstr, sizeof(fstr), "[DISPATCH]: Suspect %s [%d] is now robbing the Redsands Casino at Redsands West.", GetName(playerid), playerid);
            CopRadio(BLUE, fstr);
            SendClientMessage(playerid, LIGHTGREEN, "Your robbing the Redsands Casino, DON'T LEAVE THE CHECKPOINT!");
            GameTextForPlayer(playerid, "~r~Holdup ~w~In ~g~Progress...~n~~r~Dont Leave ~w~The ~r~Checkpoint.", 25000, 5);
            IsRobbingRedsands{playerid} = true;
            SetPlayerWantedLevel(playerid,GetPlayerWantedLevel(playerid)+6);
            redsandstimer{playerid} = SetTimerEx("RedsandsRob", 25000, false, "d", playerid);
            ApplyAnimation(playerid,"ped","ARRESTgun",4.1,0,1,1,1,1);
            redrobbed = gettime();
        }
        else
        {
            SendClientMessage(playerid, RED, "Your not at the robbery checkpoint.");
        }
        new astring[100],pName[24];
        GetPlayerName(playerid,(pName),sizeof(pName));
        format(astring,sizeof(astring),"%s [%d] typed: /rob",pName,playerid);
        SendAdminMessage(GREY,astring);
    }
    else if(IsPlayerInRangeOfPoint(playerid,1.0,2156.6917,1599.5377,1006.1797))
    {
        if(GetTeam{playerid} != CLASS_CIV) return SendClientMessage(playerid, RED, "Only civilians can rob places.");
        if(IsRobbingCalg{playerid} == true) return SendClientMessage(playerid, RED, "Your already robbing the joint.");
        if(IsPlayerHoldingAGun(playerid) == 0 || HasBeenCuffed{playerid} == true) return SendClientMessage(playerid, RED, "You must be holding a gun to rob places.");
        if((gettime() - 120) < TimerInfo[playerid][CMD_timer19]) return SendClientMessage(playerid, RED, "Please wait before using this command again.");
        TimerInfo[playerid][CMD_timer19] = gettime();
        new chance = random(3);
        if(chance == 0)
        {
            format(fstr, sizeof(fstr),  "[DISPATCH]: Suspect %s [%d] has attempted to rob the Caligulas Casino at The New Vegas Strip.", GetName(playerid), playerid);
            CopRadio(BLUE, fstr);
            SendClientMessage(playerid, RED, "You have failed to rob the Caligulas Casino.");
            GameTextForPlayer(playerid, "~w~Robbery ~r~Failed", 5000, 5);
            SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid) + 4);
        }
        {
            if((gettime() - 120) < calgrobbed) return SendClientMessage(playerid, RED, "This place has been robbed recently, try again later.");
            format(fstr, sizeof(fstr), "[DISPATCH]: Suspect %s [%d] is now robbing Caligulas Casino at The New Vegas Strip.", GetName(playerid), playerid);
            CopRadio(BLUE, fstr);
            SendClientMessage(playerid, LIGHTGREEN, "Your robbing Caligulas Casino, DON'T LEAVE THE CHECKPOINT!");
            GameTextForPlayer(playerid, "~r~Holdup ~w~In ~g~Progress...~n~~r~Dont Leave ~w~The ~r~Checkpoint.", 25000, 5);
            SetPlayerWantedLevel(playerid,GetPlayerWantedLevel(playerid)+6);
            IsRobbingCalg{playerid} = true;
            calgtimer{playerid} = SetTimerEx("CalgRob", 25000, false, "d", playerid);
            ApplyAnimation(playerid,"ped","ARRESTgun",4.1,0,1,1,1,1);
            calgrobbed = gettime();
        }
        else
        {
            SendClientMessage(playerid, RED, "Your not at the robbery checkpoint.");
        }
        new astring[100],pName[24];
        GetPlayerName(playerid,(pName),sizeof(pName));
        format(astring,sizeof(astring),"%s [%d] typed: /rob",pName,playerid);
        SendAdminMessage(GREY,astring);
    }
    else if(IsPlayerInRangeOfPoint(playerid,1.0,1955.3691,1018.0455,992.4688))
    {
        if(GetTeam{playerid} != CLASS_CIV) return SendClientMessage(playerid, RED, "Only civilians can rob places.");
        if(IsRobbingDrag{playerid} == true) return SendClientMessage(playerid, RED, "Your already robbing the joint.");
        if(IsPlayerHoldingAGun(playerid) == 0 || HasBeenCuffed{playerid} == true) return SendClientMessage(playerid, RED, "You must be holding a gun to rob places.");
        if((gettime() - 120) < TimerInfo[playerid][CMD_timer20]) return SendClientMessage(playerid, RED, "Please wait before using this command again.");
        TimerInfo[playerid][CMD_timer20] = gettime();
        new chance = random(3);
        if(chance == 0)
        {
            format(fstr, sizeof(fstr),  "[DISPATCH]: Suspect %s [%d] has attempted to rob the 4 Dragons Casino at The New Vegas Strip[South]", GetName(playerid), playerid);
            CopRadio(BLUE, fstr);
            SendClientMessage(playerid, RED, "You have failed to rob the 4 Dragons Casino.");
            GameTextForPlayer(playerid, "~w~Robbery ~r~Failed", 5000, 5);
            SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid) + 4);
        }
        {
            if((gettime() - 120) < dragrobbed) return SendClientMessage(playerid, RED, "This place has been robbed recently, try again later.");
            format(fstr, sizeof(fstr), "[DISPATCH]: Suspect %s [%d] is now robbing 4 Dragons Casino at The New Vegas Strip[South]", GetName(playerid), playerid);
            CopRadio(BLUE, fstr);
            SendClientMessage(playerid, LIGHTGREEN, "Your robbing 4 Dragons Casino, DON'T LEAVE THE CHECKPOINT!");
            GameTextForPlayer(playerid, "~r~Holdup ~w~In ~g~Progress...~n~~r~Dont Leave ~w~The ~r~Checkpoint.", 25000, 5);
            SetPlayerWantedLevel(playerid,GetPlayerWantedLevel(playerid)+6);
            IsRobbingDrag{playerid} = true;
            dragtimer{playerid} = SetTimerEx("DragRob", 25000, false, "d", playerid);
            ApplyAnimation(playerid,"ped","ARRESTgun",4.1,0,1,1,1,1);
            dragrobbed = gettime();
        }
        else
        {
            SendClientMessage(playerid, RED, "Your not at the robbery checkpoint.");
        }
        new astring[100],pName[24];
        GetPlayerName(playerid,(pName),sizeof(pName));
        format(astring,sizeof(astring),"%s [%d] typed: /rob",pName,playerid);
        SendAdminMessage(GREY,astring);
    }
    return true;
}
Reply


Messages In This Thread
Help - by BodyBoardVEVO - 20.01.2013, 00:39
Re: Help - by Scrillex - 20.01.2013, 00:46
Re: Help - by BodyBoardVEVO - 20.01.2013, 00:49
Re: Help - by Scrillex - 20.01.2013, 00:51
Re: Help - by BodyBoardVEVO - 20.01.2013, 00:55
Re: Help - by Scrillex - 20.01.2013, 00:57
Re: Help - by DanLore - 20.01.2013, 01:17
Re: Help - by Scott Zulkifli - 20.01.2013, 01:20
Re: Help - by BodyBoardVEVO - 20.01.2013, 09:14
Re: Help - by Patrick - 20.01.2013, 09:21

Forum Jump:


Users browsing this thread: 1 Guest(s)