Problem Compile
#1

He gives me these errors
pawn Код:
D:\servere\GF_Car_v0.1.3\GF Car Ownership\gamemodes\gf.pwn(2042) : error 004: function "PlayerToPoint" is not implemented
D:\servere\GF_Car_v0.1.3\GF Car Ownership\gamemodes\gf.pwn(2054) : error 004: function "PlayerToPoint" is not implemented
D:\servere\GF_Car_v0.1.3\GF Car Ownership\gamemodes\gf.pwn(2058) : error 004: function "PlayerToPoint" is not implemented
D:\servere\GF_Car_v0.1.3\GF Car Ownership\gamemodes\gf.pwn(2070) : error 004: function "PlayerToPoint" is not implemented
D:\servere\GF_Car_v0.1.3\GF Car Ownership\gamemodes\gf.pwn(2074) : error 004: function "PlayerToPoint" is not implemented
D:\servere\GF_Car_v0.1.3\GF Car Ownership\gamemodes\gf.pwn(2078) : error 004: function "PlayerToPoint" is not implemented
D:\servere\GF_Car_v0.1.3\GF Car Ownership\gamemodes\gf.pwn(2082) : error 004: function "PlayerToPoint" is not implemented
D:\servere\GF_Car_v0.1.3\GF Car Ownership\gamemodes\gf.pwn(2086) : error 004: function "PlayerToPoint" is not implemented
D:\servere\GF_Car_v0.1.3\GF Car Ownership\gamemodes\gf.pwn(2090) : error 004: function "PlayerToPoint" is not implemented
D:\servere\GF_Car_v0.1.3\GF Car Ownership\gamemodes\gf.pwn(2094) : error 004: function "PlayerToPoint" is not implemented
D:\servere\GF_Car_v0.1.3\GF Car Ownership\gamemodes\gf.pwn(2106) : error 004: function "PlayerToPoint" is not implemented
D:\servere\GF_Car_v0.1.3\GF Car Ownership\gamemodes\gf.pwn(2110) : error 004: function "PlayerToPoint" is not implemented
D:\servere\GF_Car_v0.1.3\GF Car Ownership\gamemodes\gf.pwn(2114) : error 004: function "PlayerToPoint" is not implemented
D:\servere\GF_Car_v0.1.3\GF Car Ownership\gamemodes\gf.pwn(2118) : error 004: function "PlayerToPoint" is not implemented
D:\servere\GF_Car_v0.1.3\GF Car Ownership\gamemodes\gf.pwn(2122) : error 004: function "PlayerToPoint" is not implemented
D:\servere\GF_Car_v0.1.3\GF Car Ownership\gamemodes\gf.pwn(2134) : error 004: function "PlayerToPoint" is not implemented
D:\servere\GF_Car_v0.1.3\GF Car Ownership\gamemodes\gf.pwn(2138) : error 004: function "PlayerToPoint" is not implemented
D:\servere\GF_Car_v0.1.3\GF Car Ownership\gamemodes\gf.pwn(2142) : error 004: function "PlayerToPoint" is not implemented
D:\servere\GF_Car_v0.1.3\GF Car Ownership\gamemodes\gf.pwn(2154) : error 004: function "PlayerToPoint" is not implemented
D:\servere\GF_Car_v0.1.3\GF Car Ownership\gamemodes\gf.pwn(2158) : error 004: function "PlayerToPoint" is not implemented
D:\servere\GF_Car_v0.1.3\GF Car Ownership\gamemodes\gf.pwn(4118) : error 004: function "CrimInRange" is not implemented
D:\servere\GF_Car_v0.1.3\GF Car Ownership\gamemodes\gf.pwn(4347) : error 004: function "PlayerToPoint" is not implemented
D:\servere\GF_Car_v0.1.3\GF Car Ownership\gamemodes\gf.pwn(4941) : error 004: function "PlayerToPoint" is not implemented
D:\servere\GF_Car_v0.1.3\GF Car Ownership\gamemodes\gf.pwn(5018) : error 004: function "ProxDetector" is not implemented
D:\servere\GF_Car_v0.1.3\GF Car Ownership\gamemodes\gf.pwn(5705) : error 004: function "PlayerToPoint" is not implemented
D:\servere\GF_Car_v0.1.3\GF Car Ownership\gamemodes\gf.pwn(5711) : error 004: function "PlayerToPoint" is not implemented

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


26 Errors.
What gives me errors:

pawn Код:
public IsAtDealership(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        if(PlayerToPoint(25.0,playerid,2128.0864,-1135.3912,25.5855) || PlayerToPoint(30.0,playerid,-2740.6726,-281.5352,6.7821))
        {
            return 1;
        }
    }
    return 0;
}

public IsAtClothShop(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        if(PlayerToPoint(25.0,playerid,207.5627,-103.7291,1005.2578) || PlayerToPoint(25.0,playerid,203.9068,-41.0728,1001.8047))
        {//Binco & Suburban
            return 1;
        }
        else if(PlayerToPoint(30.0,playerid,214.4470,-7.6471,1001.2109) || PlayerToPoint(50.0,playerid,161.3765,-83.8416,1001.8047))
        {//Zip & Victim
            return 1;
        }
    }
    return 0;
}

public IsAtGasStation(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        if(PlayerToPoint(6.0,playerid,1004.0070,-939.3102,42.1797) || PlayerToPoint(6.0,playerid,1944.3260,-1772.9254,13.3906))
        {//LS
            return 1;
        }
        else if(PlayerToPoint(6.0,playerid,-90.5515,-1169.4578,2.4079) || PlayerToPoint(6.0,playerid,-1609.7958,-2718.2048,48.5391))
        {//LS
            return 1;
        }
        else if(PlayerToPoint(6.0,playerid,-2029.4968,156.4366,28.9498) || PlayerToPoint(8.0,playerid,-2408.7590,976.0934,45.4175))
        {//SF
            return 1;
        }
        else if(PlayerToPoint(5.0,playerid,-2243.9629,-2560.6477,31.8841) || PlayerToPoint(8.0,playerid,-1676.6323,414.0262,6.9484))
        {//Between LS and SF
            return 1;
        }
        else if(PlayerToPoint(6.0,playerid,2202.2349,2474.3494,10.5258) || PlayerToPoint(10.0,playerid,614.9333,1689.7418,6.6968))
        {//LV
            return 1;
        }
        else if(PlayerToPoint(8.0,playerid,-1328.8250,2677.2173,49.7665) || PlayerToPoint(6.0,playerid,70.3882,1218.6783,18.5165))
        {//LV
            return 1;
        }
        else if(PlayerToPoint(8.0,playerid,2113.7390,920.1079,10.5255) || PlayerToPoint(6.0,playerid,-1327.7218,2678.8723,50.0625))
        {//LV
            return 1;
        }
    }
    return 0;
}

public IsAtFishPlace(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        if(PlayerToPoint(1.0,playerid,403.8266,-2088.7598,7.8359) || PlayerToPoint(1.0,playerid,398.7553,-2088.7490,7.8359))
        {//Fishplace at the bigwheel
            return 1;
        }
        else if(PlayerToPoint(1.0,playerid,396.2197,-2088.6692,7.8359) || PlayerToPoint(1.0,playerid,391.1094,-2088.7976,7.8359))
        {//Fishplace at the bigwheel
            return 1;
        }
        else if(PlayerToPoint(1.0,playerid,383.4157,-2088.7849,7.8359) || PlayerToPoint(1.0,playerid,374.9598,-2088.7979,7.8359))
        {//Fishplace at the bigwheel
            return 1;
        }
        else if(PlayerToPoint(1.0,playerid,369.8107,-2088.7927,7.8359) || PlayerToPoint(1.0,playerid,367.3637,-2088.7925,7.8359))
        {//Fishplace at the bigwheel
            return 1;
        }
        else if(PlayerToPoint(1.0,playerid,362.2244,-2088.7981,7.8359) || PlayerToPoint(1.0,playerid,354.5382,-2088.7979,7.8359))
        {//Fishplace at the bigwheel
            return 1;
        }
    }
    return 0;
}

public IsAtCookPlace(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        if(PlayerToPoint(3.0,playerid,369.9786,-4.0798,1001.8589))
        {//Cluckin Bell
            return 1;
        }
        else if(PlayerToPoint(3.0,playerid,376.4466,-60.9574,1001.5078) || PlayerToPoint(3.0,playerid,378.1215,-57.4928,1001.5078))
        {//Burgershot
            return 1;
        }
        else if(PlayerToPoint(3.0,playerid,374.1185,-113.6361,1001.4922) || PlayerToPoint(3.0,playerid,377.7971,-113.7668,1001.4922))
        {//Well Stacked Pizza
            return 1;
        }
    }
    return 0;
}

public IsAtBar(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        if(PlayerToPoint(4.0,playerid,495.7801,-76.0305,998.7578) || PlayerToPoint(4.0,playerid,499.9654,-20.2515,1000.6797))
        {//In grove street bar (with girlfriend), and in Havanna
            return 1;
        }
        else if(PlayerToPoint(4.0,playerid,1215.9480,-13.3519,1000.9219) || PlayerToPoint(10.0,playerid,-2658.9749,1407.4136,906.2734))
        {//PIG Pen
            return 1;
        }
    }
    return 0;
}
pawn Код:
if(CellTime[i] > 0)
            {
                if (CellTime[i] == cchargetime)
                {
                    CellTime[i] = 1;
                    if(Mobile[Mobile[i]] == i)
                    {
                        CallCost[i] = CallCost[i]+callcost;
                    }
                }
                CellTime[i] = CellTime[i] +1;
                if (Mobile[Mobile[i]] == 255 && CellTime[i] == 5)
                {
                    if(IsPlayerConnected(Mobile[i]))
                    {
                        new called[MAX_PLAYER_NAME];
                        GetPlayerName(Mobile[i], called, sizeof(called));
                        format(string, sizeof(string), "* %s's phone rings.", called);
                        RingTone[Mobile[i]] = 10;
                        ProxDetector(30.0, Mobile[i], string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    }
                }
            }
pawn Код:
if(newstate == PLAYER_STATE_WASTED)
    {
        if(WantedLevel[playerid] >= 1)
        {
            new price = WantedLevel[playerid] * 4000;
            new count;
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    if(gTeam[i] == 2 && CrimInRange(30.0, playerid,i))
                    {
                        count = 1;
                        format(string, sizeof(string), "~w~Running Suspect~r~Killed~n~Bonus~g~$%d", price);
                        GameTextForPlayer(i, string, 5000, 1);
                        ConsumingMoney[i] = 1;
                        GivePlayerMoney(i, price / 2);
                        PlayerPlaySound(i, 1058, 0.0, 0.0, 0.0);
                    }
                }
            }
            if(count == 1)
            {
                GivePlayerMoney(playerid, - price);
                PlayerInfo[playerid][pWantedDeaths] += 1;
                PlayerInfo[playerid][pJailed] = 1;
                PlayerInfo[playerid][pJailTime] = (WantedLevel[playerid])*(600);
                format(string, sizeof(string), "* You are in Jail for %d Seconds and lose $%d because of running away and getting shot by the Officer.", PlayerInfo[playerid][pJailTime], price);
                SendClientMessage(playerid, COLOR_LIGHTRED, string);
                WantedPoints[playerid] = 0;
                WantedLevel[playerid] = 0;
            }
        }
    }
Reply
#2

Replace With IsPlayerInRangeOfPoint

Example For You
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 25.0, 2128.0864, -1135.3912, 25.5855) || IsPlayerInRangeOfPoint(playerid, 30.0, -2740.6726, -281.5352, 6.7821))
PlayerToPoint Function
pawn Код:
PlayerToPoint(range, playerid, X, Y, Z);
IsPlayerInRangeOfPoint Function
pawn Код:
IsPlayerInRangeOfPoint(playerid, range, X, Y, Z);
Reply
#3

Well that happens when you copy+paste code without knowing what its using..
Either keep it with this or use what eDz0r told you:
pawn Код:
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
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;
}
And here is the other function:
pawn Код:
forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
    if(IsPlayerConnected(playerid))
    {
        new Float:posx, Float:posy, Float:posz;
        new Float:oldposx, Float:oldposy, Float:oldposz;
        new Float:tempposx, Float:tempposy, Float:tempposz;
        GetPlayerPos(playerid, oldposx, oldposy, oldposz);
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                GetPlayerPos(i, posx, posy, posz);
                tempposx = (oldposx -posx);
                tempposy = (oldposy -posy);
                tempposz = (oldposz -posz);
                if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
                {
                    SendClientMessage(i, col1, string);
                }
                else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
                {
                    SendClientMessage(i, col2, string);
                }
                else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
                {
                    SendClientMessage(i, col3, string);
                }
                else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
                {
                    SendClientMessage(i, col4, string);
                }
                else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
                {
                    SendClientMessage(i, col5, string);
                }
                else
                {
                    SendClientMessage(i, col1, string);
                }
            }
        }
    }//not connected
    return 1;
}
And for CrimInRange look at the gm you copied from..and make sure your script really needs it
Reply
#4

Quote:
Originally Posted by s0nic
Посмотреть сообщение
Well that happens when you copy+paste code without knowing what its using..
Either keep it with this or use what eDz0r told you:
pawn Код:
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
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;
}
And here is the other function:
pawn Код:
forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
    if(IsPlayerConnected(playerid))
    {
        new Float:posx, Float:posy, Float:posz;
        new Float:oldposx, Float:oldposy, Float:oldposz;
        new Float:tempposx, Float:tempposy, Float:tempposz;
        GetPlayerPos(playerid, oldposx, oldposy, oldposz);
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                GetPlayerPos(i, posx, posy, posz);
                tempposx = (oldposx -posx);
                tempposy = (oldposy -posy);
                tempposz = (oldposz -posz);
                if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
                {
                    SendClientMessage(i, col1, string);
                }
                else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
                {
                    SendClientMessage(i, col2, string);
                }
                else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
                {
                    SendClientMessage(i, col3, string);
                }
                else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
                {
                    SendClientMessage(i, col4, string);
                }
                else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
                {
                    SendClientMessage(i, col5, string);
                }
                else
                {
                    SendClientMessage(i, col1, string);
                }
            }
        }
    }//not connected
    return 1;
}
And for CrimInRange look at the gm you copied from..and make sure your script really needs it
I have
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)