adding IsPlayerInRangeOfPoint
#1

can anyone help me adding this if(IsPlayerInRangeOfPoint(playerid,10.0,1997.4836, 1004.0374,994.4688 ))
to this http://pastebin.com/VfM8wPqA
can remove all of the you cant do this just so say you aint at locker

any help will be +rep'd
Reply
#2

Ok wait !!!
Reply
#3

pawn Код:
CMD:nbshop(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 10.0, 1997.4836, 1004.0374,994.4688))
    {
        if(PlayerCuffed[playerid] >= 1 || GetPVarInt(playerid, "Injured") == 1) return SendClientMessage(playerid, COLOR_WHITE, "You can't do this right now.");
        if(GetPVarInt(playerid, "EventToken") != 0) return SendClientMessage(playerid, COLOR_GREY, "You can't access the referral shop while you're in an event.");
        if(PlayerInfo[playerid][pJailed] > 0) return SendClientMessage(playerid, COLOR_WHITE, "You can't use this in jail/prison.");
        if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You can't do this while you're in a vehicle.");
        new LineOne[465];
        new LineTwo[410];
        new string[875];
        format(LineOne,sizeof(LineOne),"{FFFFFF}100 pot, 100 crack {00F70C}(Price: 1 token)\n{FFFFFF}150000 {00F70C}(Price: 1 token)\n{FFFFFF}4 respect points {00F70C}(Price: 1 token)\n{FFFFFF}SPAS-12 & Deagle {00F70C}(Price: 1 token)\n{FFFFFF}250 pot, 250 crack {00F70C}(Price: 2 tokens)\n{FFFFFF}Full weapon set {00F70C}(Price: 2 tokens)\n{FFFFFF}8 respect points {00F70C}(Price: 2 tokens)\n{FFFFFF}10000 materials {00F70C}(Price: 2 tokens)\n{FFFFFF}12 respect points {00F70C}(Price: 3 tokens)");
        format(LineTwo,sizeof(LineOne),"{FFFFFF}500000 materials {00F70C}(Price: 3 tokens)\n{FFFFFF}16 respect points {00F70C}(Price: 4 tokens)\n{FFFFFF}15,000 materials {00F70C}(Price: 4 tokens)\n{FFFFFF}20 respect points {00F70C}(Price: 5 tokens)\n{FFFFFF}20,000 materials {00F70C}(Price: 5 tokens)\n{FFFFFF}One level up & 2 upgrade points {00F70C}(Price: 10 tokens)\n{FFFFFF}Car of choice from one of the dealerships {00F70C}(Price: 10 tokens)");
        format(string,sizeof(string),"%s\n%s",LineOne, LineTwo);
        ShowPlayerDialogEx(playerid, DIALOG_REFSHOP, DIALOG_STYLE_LIST, "Referral shop", string, "Purchase", "Cancel");
    }
    else return SendClientMessage(playerid, COLOR_GREY, "Bla Bla Bla Bla");
    return 1;
}
Reply
#4

thanks, and this will work only if at isplayerinrangeofpoint place?
Reply
#5

yep
Change the Bla Bla Bla to You need To Be in ................ to use this command!!
Don't Forget To +Rep
Reply
#6

mate me gawd damn loves you, no homo lol +rep'd for that mate thank you very very much

tried doing it myself yesterday but just kept getting errors
Reply
#7

You Are Welcome
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)