HouseID
#1

pawn Код:
stock HouseID(playerid)
{
    new returnid = 1;
    for(new i = 1;i < sizeof(StaticHouse);i ++)
    {
        if(PlayerToPoint(1,playerid,House[i][HD_ExtX],House[i][HD_ExtY],House[i][HD_ExtZ]))
        {
            returnid = i;
        }
    }
    return returnid;
}
the problem is that even if the player is near that point the PlayerToPoint doesn't detect it, the PlayerToPoint is not modified any ideas what might be the problem?
Reply
#2

yes I know I double posted because my post was way back in the tread,
I found out that GetPlayerPos is not working
Код:
[02:09:30] *P:2.500000|-2398.157470|2408.808349|8.911000|U:0.000000|0.000000|0.000000
[02:09:30] *P:2.500000|-2381.871093|2406.493408|8.892100|U:0.000000|0.000000|0.000000
[02:09:30] *P:2.500000|-2348.713378|2423.021728|7.339900|U:0.000000|0.000000|0.000000
[02:09:30] *P:2.500000|-2344.023681|2439.079589|7.304699|U:0.000000|0.000000|0.000000
[02:09:30] *P:2.500000|-2437.513183|2354.932617|5.443099|U:0.000000|0.000000|0.000000
[02:09:30] *P:2.500000|-2428.563476|2368.266113|5.443699|U:0.000000|0.000000|0.000000
[02:09:30] *P:2.500000|-2385.418457|2217.146240|4.984399|U:0.000000|0.000000|0.000000
radius,pickup x,pickup y,pickup z,user x,user y,user z
P: is the pickups coordinate U: is the players coordinate you can see that it's 0.000000 I don't know the reason why this is happening
Reply
#3

If you mean that GetPlayerPos under PlayerToPoint don't work then maybe show your PlayerToPoint function.
Reply
#4

pawn Код:
stock IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z)
{
    new Float:px,Float:py,Float:pz;
    GetPlayerPos(playerid,px,py,pz);
    //printf("*P:%f|%f|%f|%f|U:%f|%f|%f",range,x,y,z,px,py,pz);
    px -= x;
    py -= y;
    pz -= z;
    return ((px * px) + (py * py) + (pz * pz)) < (range * range);
}
Reply
#5

You're using

pawn Код:
if(PlayerToPoint(1,playerid,House[i][HD_ExtX],House[i][HD_ExtY],House[i][HD_ExtZ]))
It should be

pawn Код:
if(PlayerToPoint(playerid,1,House[i][HD_ExtX],House[i][HD_ExtY],House[i][HD_ExtZ]))
Reply
#6

Quote:
Originally Posted by JaTochNietDan
You're using

pawn Код:
if(PlayerToPoint(1,playerid,House[i][HD_ExtX],House[i][HD_ExtY],House[i][HD_ExtZ]))
It should be

pawn Код:
if(PlayerToPoint(playerid,1,House[i][HD_ExtX],House[i][HD_ExtY],House[i][HD_ExtZ]))
i think
pawn Код:
if(PlayerToPoint(1,playerid,House[i][HD_ExtX],House[i][HD_ExtY],House[i][HD_ExtZ]))
is correct !!
Reply
#7

ahm GetPlayerPos(...); is not working
Reply
#8

GetPlayerPos(..); is not working at all where ever I put it now wth is happening, please help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)