sscanf
#1

Hello, i am trying to make: /property sell [ID], the problem is that when i type /property sell it shows usage but when i type /property sell 1 it does nothing!

Код:
else {
        if(strcmp(option, "sell", true) == 0) {
            new i;
            if(sscanf(option, "i", i)) return ShowInfoBox(playerid,"~y~USAGE: /property sell [ID]" , 5);
            if(PropertyData[i][Owned] != playerid) return ShowInfoBox(playerid, "You don't own this business!", 3);
            if(PropertyData[i][Minutes] < 30) return ShowInfoBox(playerid, "You must own this property 30 minutes before selling!", 4);
            PropertyData[i][Owned] = -1;
            GivePlayerMoney(playerid, PropertyData[i][Price] / 2);
            format(string, sizeof(string), "%s has been sold for ~g~%d!", PropertyData[i][pName], PropertyData[i][Price]);
            SendClientMessage(playerid, COLOR_SYSTEM, string);
            return 1;

        }
Reply
#2

how can i do it then, i can't think other ways
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)