Command help
#1

Код:
	if(strcmp(cmd, "/bizfee", true) == 0)
	{
		new bouse = PlayerInfo[playerid][pPbiskey];
		if (bouse == -1)
		{
			SendClientMessage(playerid, COLOR_GRAD2, "   You don't own a business");
			return 1;
		}
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_WHITE, "USAGE: /bizfee [EntranceFee]");
		}
		if(strval(tmp) < 0)
		{
			SendClientMessage(playerid, COLOR_WHITE, "Minimum entrance is $0");
			return 1;
		}
		if (bouse >= 100)
		{

			SBizzInfo[bouse-100][sbEntcost] = strval(tmp);
			format(string, sizeof(string), "Entrance fee set to $%d", SBizzInfo[bouse-100][sbEntcost]);
		}
		else
		{
			BizzInfo[bouse][bEntcost] = strval(tmp);
			format(string, sizeof(string), "Entrance fee set to $%d", BizzInfo[bouse][bEntcost]);
		}
		OnPropUpdate();
		SendClientMessage(playerid, COLOR_WHITE, string);
		return 1;
	}
its now that the min biz fee is 0 how can i make that the max fee is 5000 and min fee is 0 ?
Reply
#2

pawn Код:
if(strcmp(cmd, "/bizfee", true) == 0)
    {
        new bouse = PlayerInfo[playerid][pPbiskey];
        if (bouse == -1)
        {
            SendClientMessage(playerid, COLOR_GRAD2, "   You don't own a business");
            return 1;
        }
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, COLOR_WHITE, "USAGE: /bizfee [EntranceFee]");
        }
        if(strval(tmp) < 0)
        {
            SendClientMessage(playerid, COLOR_WHITE, "Minimum entrance is $0");
            return 1;
        }
                if(strval(tmp) < 5000)
        {
            SendClientMessage(playerid, COLOR_WHITE, "Maximum Entrance is $5000");
            return 1;
        }
        if (bouse >= 100)
        {

            SBizzInfo[bouse-100][sbEntcost] = strval(tmp);
            format(string, sizeof(string), "Entrance fee set to $%d", SBizzInfo[bouse-100][sbEntcost]);
        }
        else
        {
            BizzInfo[bouse][bEntcost] = strval(tmp);
            format(string, sizeof(string), "Entrance fee set to $%d", BizzInfo[bouse][bEntcost]);
        }
        OnPropUpdate();
        SendClientMessage(playerid, COLOR_WHITE, string);
        return 1;
    }
try that?
Reply
#3

works changed if(strval(tmp) < 5000) to >
Reply
#4

alright. forgot the >
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)