OnPlayerText & some code issue
#10

try this out, I have no idea if it will work, This code gave me a head ache anyways here
pawn Код:
if(strcmp(x_op,"withdraw",true) == 0)
    {
        for(new b = 1; b < sizeof(BusinessInfo); b++)
        {
            if(IsPlayerInRangeOfPoint(playerid, 2.0, BusinessInfo[b][bExitX], BusinessInfo[b][bExitY], BusinessInfo[b][bExitZ] && BusinessInfo[b][bOwned] == 1 && strcmp(BusinessInfo[b][bOwner], sendername(playerid), false))
            {
                MSG(playerid,RED,"[ERROR] You don't own this business.");
            else
            {
                new string[100],amount;
                if(sscanf(params,"i",amount)) return MSG(playerid,GRAD,"/vault withdraw [Amount]");
                if(BusinessInfo[b][bMoney] >= amount)
            {
                GivePlayerMoney(playerid,amount);
                BusinessInfo[b][bMoney] -= amount;
                format(string, sizeof(string), "[INFO]{FFFFFF}: You have successfully taken $%d from your vault.", amount);
                SendClientMessage(playerid,GRAD, string);
    return 1;
}
Reply


Messages In This Thread
OnPlayerText & some code issue - by DaniceMcHarley - 08.02.2014, 20:00
Re: OnPlayerText & some code issue - by CuervO - 08.02.2014, 20:09
Re: OnPlayerText & some code issue - by [KHK]Khalid - 08.02.2014, 20:15
Re: OnPlayerText & some code issue - by DaniceMcHarley - 08.02.2014, 20:23
Re: OnPlayerText & some code issue - by DaniceMcHarley - 09.02.2014, 07:24
Re: OnPlayerText & some code issue - by DaniceMcHarley - 09.02.2014, 16:37
Re: OnPlayerText & some code issue - by DaniceMcHarley - 10.02.2014, 08:31
Re: OnPlayerText & some code issue - by SwisherSweet - 10.02.2014, 08:44
Re: OnPlayerText & some code issue - by DaniceMcHarley - 10.02.2014, 08:50
Re: OnPlayerText & some code issue - by SwisherSweet - 10.02.2014, 09:01

Forum Jump:


Users browsing this thread: 1 Guest(s)