PlayerToPoint error
#1

Hello. I don't know how to fix this problem.. Can you help me? Here is script:

Код:
if(!strcmp(cmdtext,"/desrainis",true))
	{
	for(new i = 0; i < MAX_VEHICLES; i++)
	{
		if(IsPlayerConnected(i))
		{
		if(GetVehicleModel(GetPlayerVehicleID(i)) == 588)//hotdog
			{
			  new Float:px, Float:py, Float:pz;
			  GetVehiclePos(i, px, py, pz);
        if(PlayerToPoint(4, i, px, py, pz))// 177 line
        {
				  SetPlayerHealth(i, 100.0);
				  GivePlayerMoney(i, -15);
				  SendClientMessage(i,0xFFFF00AA,"***Astrus desrainis...");
					}
					else
					{
					SendClientMessage(i,0xFFFF00AA,"***Jus per toli nuo masinos.");
				}
			}
		}
	}
	return 1;
	}
	return 0;
}
And here is error:

Код:
(177) : error 017: undefined symbol "PlayerToPoint"
Reply
#2

You don't have PlayerToPoint function in your script.

pawn Код:
stock PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
if(IsPlayerConnected(playerid))
{
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx - x);
tempposy = (oldposy - y);
tempposz = (oldposz - z);
if(((tempposx < radi)
&& (tempposx > - radi))
&& ((tempposy < radi)
&& (tempposy > - radi))
&& ((tempposz < radi)
&& (tempposz > - radi)))
{
return 1;
}
}
return 0;
}
Reply
#3

try adding this



pawn Код:
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);

pawn Код:
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
  if(IsPlayerConnected(playerid))
    {
        new Float:oldposx, Float:oldposy, Float:oldposz;
        new Float:tempposx, Float:tempposy, Float:tempposz;
        GetPlayerPos(playerid, oldposx, oldposy, oldposz);
        tempposx = (oldposx -x);
        tempposy = (oldposy -y);
        tempposz = (oldposz -z);
        if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
        {
            return 1;
        }
    }
    return 0;
}

let me no how it goes
Reply
#4

Quote:
Originally Posted by Don Correlli
You don't have PlayerToPoint function in your script.

pawn Код:
stock PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
if(IsPlayerConnected(playerid))
{
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx - x);
tempposy = (oldposy - y);
tempposz = (oldposz - z);
if(((tempposx < radi)
&& (tempposx > - radi))
&& ((tempposy < radi)
&& (tempposy > - radi))
&& ((tempposz < radi)
&& (tempposz > - radi)))
{
return 1;
}
}
return 0;
}
Thank's
Reply
#5

Quote:
Originally Posted by shady91
forward PlayerToPointStripped(Float:radi, playerid, Float, Float:y, Float:z, Float:curx, Float:cury, Float:curz);
Why should he forward this function? How do you even know if he has this function in his script?
Reply
#6

Just trying to help him i posted here for him not for you so how do i no he has it?

how do i no he dosent! only trying to help
Reply
#7

He just asked for PlayerToPoint function which i gave him. After that you posted the same function and added useless forward for a function you don't even know if it's in his script.
Reply
#8

Quote:
Originally Posted by Don Correlli
He just asked for PlayerToPoint function which i gave him. After that you posted the same function and added useless forward for a function you don't even know if it's in his script.
You're rather arrogant. You remind me of the people on JewTube that claim they they've posted on a specific video first.
Stop being disrespectful, he was only trying to help. GG
Reply
#9

actualy i was posting there when no one had posted as i posted it you posted your so its a few sec's gap if i saw you posted there i wouldnt of but you posted at the same time if you can check time s of the post
Reply
#10

Something wrong.. My command doesn't work. What I do wrong?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)