IsPlayerInRangeOfPoint
#1

Hello,

I've am trying to make a lock command for my property system but whenever i do it gives me a error that i am not near it
Code removed, problem fixed!
Reply
#2

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 10.0, bInfo[businessID][Position][0], bInfo[buID][Position][1], bInfo[businessID][Position][2]))
Why 2 indexes use businessID and the other buID? They should use the same one.
Reply
#3

Try this:
pawn Код:
CMD:bizzfee(playerid, params[])
{
    new buID = pInfo[playerid][pBizz];
    if(IsPlayerInRangeOfPoint(playerid, 10.0, %f, %f, %f, bInfo[businessID][Position][0], bInfo[buID][Position][1], bInfo[businessID][Position][2]))
    {
        if(pInfo[playerid][pBizz] == 0) return SendClientMessage(playerid,COLOR_PINK2,"Error: You dont not own any business");
        new fee,query[500];
        if(sscanf(params, "i", fee)) return SendClientMessage(playerid, COLOR_WHITE, "Usage: "ADMUSAGE"/bizzfee [fee]");
        bInfo[buID][bEntryFee] = fee;
        format(query,sizeof(query),"UPDATE businesses SET `EntryFee` = %d WHERE `id` = %d",fee,bInfo[buID][ID]);
        mysql_query(query);
        new feemsg[256];
        format(feemsg,sizeof(feemsg),"Business Fee Set to %i",fee);
        SendClientMessage(playerid,COLOR_LAWNGREEN,feemsg);
        new string[500];
        format(string, sizeof(string), "%s\nOwner: %s\nPrice: %i\n ID: %i\nEntry Fee: %i", bInfo[buID][bName], bInfo[buD][bOwner], bInfo[buID][Price],bInfo[bID][ID],fee);
        Update3DTextLabelText(bInfo[buID][LabelID], 0xB0D5E8FF, string);
    }
    else
    {
        SendClientMessage(playerid, COLOR_PINK2, "Error: You need to be close to your Business");
    }
    return 1;
}
Reply
#4

Quote:
Originally Posted by Jimmy0wns
Посмотреть сообщение
if(IsPlayerInRangeOfPoint(playerid, 10.0, %f, %f, %f, bInfo[businessID][Position][0], bInfo[buID][Position][1], bInfo[businessID][Position][2]))[/pawn]
That will not even compile..
Reply
#5

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 10.0, bInfo[businessID][Position][0], bInfo[buID][Position][1], bInfo[businessID][Position][2]))
Why 2 indexes use businessID and the other buID? They should use the same one.
woops my bad, fixed now, and@ Jimmy let me see if that code works and i'll get back to you in a sec'
Reply
#6

Код:
error 017: undefined symbol "f"
fatal error 107: too many error messages on one line
Reply
#7

How can you even read that code?
Why does nobody on this forum know how to use TAB?
Reply
#8

umm are you helping?
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)