28.01.2014, 16:20
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;
}