PlayerToPoint being a bitch
#1

I dont know what I'm missing. I have a brand new script and I dont know what to add to get PlayerToPoint working.

pawn Код:
if (strcmp(cmd, "/drivethru", true) == 0)
{
if(PlayerToPoint(5, playerid, 2377.7808,-1908.1727,13.3828) || PlayerToPoint(5, playerid, 800.4943,-1629.1968,13.3828) || PlayerToPoint(5, playerid, 2410.0376,-1488.1743,23.8281))
{
ShowMenuForPlayer(DriveThru, playerid);
TogglePlayerControllable(playerid, 0);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_RED, "[!] You are not at any local drive thru!");
return 1;
}
}
Errors:

Код:
C:\Users\Lachlan\Desktop\Random Pawno\AntonioRP.pwn(375) : error 004: function "PlayerToPoint" is not implemented
Reply
#2

Im learning to search...

FIXED,

add...

pawn Код:
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
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

Lol, and you added some stuffs wrong as well... The script was all okay, you only had 1 error... and here's the fix...

pawn Код:
if (strcmp(cmd, "/drivethru", true) == 0)
{
if(PlayerToPoint(5, playerid, 2377.7808,-1908.1727,13.3828 || PlayerToPoint(5, playerid, 800.4943,-1629.1968,13.3828 || PlayerToPoint(5, playerid, 2410.0376,-1488.1743,23.8281))
{
ShowMenuForPlayer(DriveThru, playerid);
TogglePlayerControllable(playerid, 0);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_RED, "[!] You are not at any local drive thru!");
return 1;
}
}
Reply
#4

YAY, you searched. Here, have a cookie.
Reply
#5

Mhmm, tasted good. Gimmie MORE!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)