IsPlayerInRangeOfPoint - 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)
+--- Thread: IsPlayerInRangeOfPoint (
/showthread.php?tid=490906)
IsPlayerInRangeOfPoint -
ZBits - 28.01.2014
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!
Re: IsPlayerInRangeOfPoint -
Konstantinos - 28.01.2014
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.
Re: IsPlayerInRangeOfPoint -
Jimmy0wns - 28.01.2014
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;
}
Re: IsPlayerInRangeOfPoint -
Konstantinos - 28.01.2014
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..
Re: IsPlayerInRangeOfPoint -
ZBits - 28.01.2014
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'
Re: IsPlayerInRangeOfPoint -
ZBits - 28.01.2014
Код:
error 017: undefined symbol "f"
fatal error 107: too many error messages on one line
Re: IsPlayerInRangeOfPoint -
Shetch - 28.01.2014
How can you even read that code?
Why does nobody on this forum know how to use TAB?
Re: IsPlayerInRangeOfPoint -
ZBits - 28.01.2014
umm are you helping?