Function non implemented -
anumaz - 29.03.2010
Here's my code
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/hopital", cmdtext, true, 10) == 0)
{
if (PlayerToPoint(5.0, playerid,-551.8567,2593.9453,53.9348))
{
new name[MAX_PLAYER_NAME],string[128];
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),"*** %s a entrйe l'Hopital (/hopital)",name);
SendClientMessage(playerid,YELLOW,string);
SetPlayerPos(playerid,1935.4089,-2110.2100,-19.3109);
SetPlayerFacingAngle(playerid,322.2638);
}
return 1;
}
return 0;
}
C:\Users\Anthony\Desktop\Hospital.pwn(195) : error 004: function "PlayerToPoint" is not implemented
I get this error, but I do have:
#include <a_samp>
#include <float>
#define YELLOW 0xFBFB00FF
forward PlayerToPoint(Float:radi, playerid, Float

, Float:y, Float:z);
--
How to fix it?
Re: Function non implemented -
Hot - 29.03.2010
You can't just forward a function, you need THE FUNCTION.
Anyway, add it to your gamemode:
Код:
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: Function non implemented -
anumaz - 29.03.2010
Where do I add this? I put 'public PlayerToPoint...' then your code?
Re: Function non implemented -
aircombat - 29.03.2010
del that line : forward PlayerToPoint(Float:radi, playerid, Float

, Float:y, Float:z);
Re: Function non implemented -
Hot - 29.03.2010
You can add it at the end of your code, scroll the code page at max you can, the copy the function I send to you there. And as Etch said, remove:
Код:
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
Re: Function non implemented -
anumaz - 29.03.2010
Alright, thanks, it works