adding IsPlayerInRangeOfPoint - 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)
+--- Thread: adding IsPlayerInRangeOfPoint (
/showthread.php?tid=526446)
adding IsPlayerInRangeOfPoint -
Lukka_Vercetti - 17.07.2014
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
Re: adding IsPlayerInRangeOfPoint -
GeekSiMo - 17.07.2014
Ok wait !!!
Re: adding IsPlayerInRangeOfPoint -
GeekSiMo - 17.07.2014
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;
}
Re: adding IsPlayerInRangeOfPoint -
Lukka_Vercetti - 17.07.2014
thanks, and this will work only if at isplayerinrangeofpoint place?
Re: adding IsPlayerInRangeOfPoint -
GeekSiMo - 17.07.2014
yep
Change the Bla Bla Bla to You need To Be in ................ to use this command!!
Don't Forget To +Rep
Re: adding IsPlayerInRangeOfPoint -
Lukka_Vercetti - 17.07.2014
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
Re: adding IsPlayerInRangeOfPoint -
GeekSiMo - 17.07.2014
You Are Welcome