Fast Please [rep++] -
nezo2001 - 19.01.2015
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
Re: Fast Please [rep++] -
Ironboy - 19.01.2015
Use this
http://forum.sa-mp.com/showthread.ph...terDynamicArea
Re: Fast Please [rep++] -
Kaperstone - 19.01.2015
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
}
Re: Fast Please [rep++] -
RayC - 19.01.2015
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]))
Re: Fast Please [rep++] -
nezo2001 - 19.01.2015
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
Re: Fast Please [rep++] -
Schneider - 19.01.2015
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
}
Re: Fast Please [rep++] -
nezo2001 - 19.01.2015
IsPlayerInDynamicAreaaaaaa please another rep
Re: Fast Please [rep++] -
CalvinC - 19.01.2015
Quote:
Originally Posted by CalvinC
|
As i said on your new topic.
Re: Fast Please [rep++] -
nezo2001 - 19.01.2015
Check my replay in my new topic
Re: Fast Please [rep++] -
Kaperstone - 20.01.2015
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.