HELPPP PLEASEE
#1

what did I done wrong in this script?? I get 10 errors
Код:
function "PlayerToPoint" is not implemented
help please

Код:
CMD:granica(playerid,params[])
{
new string[109];
if(PlayerInfo[playerid][pPutovnica] == 1)
{
if(IsPlayerInRangeOfPoint(20, playerid,55.39017487,-1539.68786621,5.90319920))
{
MoveDynamicObject(putovnicagate,55.38964844,-1539.68750000,0.90319920,1);
SetTimer("putovnicazatvori", 6000, 0);
SendClientMessage(playerid, NARANDZASTA,"Kapija se spusta, molimo pricekajte...");
format(string, sizeof(string), "* %s pokazuje putovnicu i prolazi kroz granicu.", ImeIgraca(playerid));
ProxDetector(30.0, playerid, string, ZELENA,ZELENA,ZELENA,ZELENA,ZELENA);
}
else { SendClientMessage(playerid, SIVA,"Destinacija je previse udaljena."); }
}
else if(PlayerInfo[playerid][pPutovnica] == 1)
{
if(IsPlayerInRangeOfPoint(20, playerid,57.96934891,-1524.55236816,5.90319920))
{
MoveDynamicObject(putovnicagate1,57.96875000,-1524.55175781,0.90319920,1);
SetTimer("putovnicazatvori", 6000, 0);
SendClientMessage(playerid, NARANDZASTA,"Kapija se spusta, molimo pricekajte...");
format(string, sizeof(string), "* %s pokazuje putovnicu i prolazi kroz granicu.", ImeIgraca(playerid));
ProxDetector(30.0, playerid, string, ZELENA,ZELENA,ZELENA,ZELENA,ZELENA);
}
else { SendClientMessage(playerid, SIVA,"Destinacija je previse udaljena."); }
else if(PlayerInfo[playerid][pPutovnica] == 1)
{
if(IsPlayerInRangeOfPoint(20, playerid,1631.45507812,-18.65383148,37.43769073))
{
MoveDynamicObject(putovnicagate2,1631.45507812,-18.65332031,32.18769073,1);
SetTimer("putovnicazatvori", 6000, 0);
SendClientMessage(playerid, NARANDZASTA,"Kapija se spusta, molimo pricekajte...");
format(string, sizeof(string), "* %s pokazuje putovnicu i prolazi kroz granicu.", ImeIgraca(playerid));
ProxDetector(30.0, playerid, string, ZELENA,ZELENA,ZELENA,ZELENA,ZELENA);
}
else { SendClientMessage(playerid, SIVA,"Destinacija je previse udaljena."); }
else if(PlayerInfo[playerid][pPutovnica] == 1)
{
if(IsPlayerInRangeOfPoint(20, playerid,1645.88232422,-12.76724625,37.34720612))
{
MoveDynamicObject(putovnicagate3,1645.88183594,-12.76660156,32.09720612,1);
SetTimer("putovnicazatvori", 6000, 0);
SendClientMessage(playerid, NARANDZASTA,"Kapija se spusta, molimo pricekajte...");
format(string, sizeof(string), "* %s pokazuje putovnicu i prolazi kroz granicu.", ImeIgraca(playerid));
ProxDetector(30.0, playerid, string, ZELENA,ZELENA,ZELENA,ZELENA,ZELENA);
}
else { SendClientMessage(playerid, SIVA,"Destinacija je previse udaljena."); }
}
else return SendClientMessage(playerid, SIVA,"Nemate putovnicu.");
return 1;
}
Reply
#2

It's not a problem in the script you gave since there is no Player2Point.
But put this anywhere:
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);
        //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
        if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
        {
            return 1;
        }
    }
    return 0;
}
Just note that I had to download GF on my PC to find the PlayerToPoint. Use IsPlayerInRangeOfPoint, it's better.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)