Player Around a object co-ordinate fails?
#1

Solved
Reply
#2

1. Wtf is "IsPlayerAroundNapalm"?
2. Try this:

pawn Код:
IsPlayerAroundFire(playerid)
{
    for(new f; f < 21; f++)
    {
        new Float:oPosition[3];
        GetObjectPos(gServerData[E_FIRE][f], oPosition[0], oPosition[1], oPosition[2]);
        return IsPlayerInRangeOfPoint(playerid, 3.0, oPosition[0], oPosition[1], oPosition[2]);
    }
}
Reply
#3

the only thing I see in it is that you are using "IsPlayerAroundNapalm" at OnPlayerUpdate and as stock "IsPlayerAroundFire"..
however I guess this are basicly 2 different functions and has nothing to do with the problem.. I don't see any other mistake though.. what about trying to set the range a little bit higher? (e.g. to 5 -- just to test)
Reply
#4

Quote:
Originally Posted by BaubaS
Посмотреть сообщение
1. Wtf is "IsPlayerAroundNapalm"?
2. Try this:

pawn Код:
IsPlayerAroundFire(playerid)
{
    for(new f; f < 21; f++)
    {
        new Float:oPosition[3];
        GetObjectPos(gServerData[E_FIRE][f], oPosition[0], oPosition[1], oPosition[2]);
        return IsPlayerInRangeOfPoint(playerid, 3.0, oPosition[0], oPosition[1], oPosition[2]);
    }
}
Sorry about that, just did a mistake, IsPlayerAroundNapalm is the same thing as IsPlayerAroundFire.

Compeletly the same, just theres a define/macro

pawn Код:
#define IsPlayerAroundNapalm(%1) IsPlayerAroundFire(%1)
By the way, the solution isn't working, what the hell is the problem with the code. Code looks fine.

Quote:
Originally Posted by Sascha
Посмотреть сообщение
the only thing I see in it is that you are using "IsPlayerAroundNapalm" at OnPlayerUpdate and as stock "IsPlayerAroundFire"..
however I guess this are basicly 2 different functions and has nothing to do with the problem.. I don't see any other mistake though.. what about trying to set the range a little bit higher? (e.g. to 5 -- just to test)
Sorry I missed your comment lol, it worked when i set it to 5.0 as the distance.

EDIT: It only worked for one object? Wth?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)