Fast Please [rep++]
#1

I want to make IsPlayerInRangOfPoint but for a base
so the base cor. like that "minx, miny, maxx, maxy"
And IsPlayerInRangrOfPoint is like this "radius, x, y, z"
So how to make it ??
Please Fast Help Rep
Reply
#2

Use this http://forum.sa-mp.com/showthread.ph...terDynamicArea
Reply
#3

2d
pawn Код:
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid, x, y, z);
if(x<=minx && x>=maxx && y<=miny && y>=maxy) {
// He is in that area
}
3d
pawn Код:
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid, x, y, z);
if(x<=minx && x>=maxx && y<=miny && y>=maxy && z<=minz && z>=maxy) {
// He is in that area
}
Reply
#4

Try this, if you have your bases defined, then just add
Код:
Float:fBaseX,
	Float:fBaseY,
	Float:fBaseZ,
into the enum like:

Код:
#define MAX_BASE 5
enum base
{
	Float:fBaseX,
	Float:fBaseY,
	Float:fBaseZ
};
new BaseInfo[MAX_BASE][Base];
then you can just use:

Код:
for(new x; x < MAX_BASE; x++)
	{
	    if(IsPlayerInRangeOfPoint(playerid, 3.0, BaseInfo[x][fBaseX], BaseInfo[x][fBaseY], BaseInfo[x][fBaseZ]))
Reply
#5

Thank all and thanks for kaperstone amazing idea rep
But i think streamer is better can anyone help me in
IsPlayerInDynamicArea with its params plz help thank you and repped IronBoy
Reply
#6

Quote:
Originally Posted by Kaperstone
Посмотреть сообщение
2d
pawn Код:
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid, x, y, z);
if(x<=minx && x>=maxx && y<=miny && y>=maxy) {
// He is in that area
}
@Kaperstone: You got the operators flipped: > means larger, < means smaller.

pawn Код:
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid, x, y, z);
if(x>=minx && x<=maxx && y>=miny && y<=maxy) {
// He is in that area
}
Reply
#7

IsPlayerInDynamicAreaaaaaa please another rep
Reply
#8

Quote:
Originally Posted by CalvinC
Посмотреть сообщение
Haven't used it before, for the params just check the topic.
pawn Код:
IsPlayerInDynamicArea(playerid, areaid, recheck = 0);
It might work like this, not sure though.
https://sampwiki.blast.hk/wiki/Areacheck
As i said on your new topic.
Reply
#9

Check my replay in my new topic
Reply
#10

Quote:
Originally Posted by Schneider
Посмотреть сообщение
@Kaperstone: You got the operators flipped: > means larger, < means smaller.

pawn Код:
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid, x, y, z);
if(x>=minx && x<=maxx && y>=miny && y<=maxy) {
// He is in that area
}
oh lol, didn't notice.
thanks for pointing out.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)