15.05.2017, 09:06
This cmd have a problem when i join the server and type it does not show this message
PHP код:
SendClientMessage(playerid, COLOR_GRAD2, "You're not in your bussiness.");
PHP код:
CMD:bizwithdraw(playerid, params[])
{
for(new biz = 0; biz < MAX_BIZ; biz++)
{
if(IsPlayerInRangeOfPoint(playerid, 100, BizInfo[biz][IXCoord], BizInfo[biz][IYCoord], BizInfo[biz][IZCoord]))
{
if(GetPlayerVirtualWorld(playerid) == BizInfo[biz][VW])
{
if(!strcmp(BizInfo[biz][Owner], GetPlayerNameEx(playerid), true))
{
new money;
if(sscanf(params,"d", money)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /bizwithdraw [amount]");
if(money > BizInfo[biz][Till]) return SendClientMessage(playerid, COLOR_GRAD2, "You don't have that much money in your Till!");
new string[150];
format(string,sizeof(string),"You've taken $%d out of your Business Till.", money);
SendClientMessage(playerid, COLOR_GREY, string);
GivePlayerCash(playerid, money);
BizInfo[biz][Till] -= money;
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "You're not in your bussiness.");
}
}
}
}
return 1;
}