PlayerToPoint being a bitch - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: PlayerToPoint being a bitch (
/showthread.php?tid=90391)
PlayerToPoint being a bitch -
Antonio [G-RP] - 08.08.2009
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
Re: PlayerToPoint being a bitch -
Antonio [G-RP] - 08.08.2009
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;
}
Re: PlayerToPoint being a bitch -
AcId n RaPiD - 08.08.2009
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;
}
}
Re: PlayerToPoint being a bitch -
Abernethy - 08.08.2009
YAY, you searched. Here, have a cookie.
Re: PlayerToPoint being a bitch -
Antonio [G-RP] - 08.08.2009
Mhmm, tasted good. Gimmie MORE!