Range in command
#1

Code:
        if (strcmp("/depositlogs", cmdtext, true) == 0)
	{
	    if(IsPlayerInRangeOfPoint(playerid, 5, -533, -74, 62))
	    {
	    	if (PlayerInfo[playerid][logs] >= 1)
	    	{
	    	    PlayerInfo[playerid][maxinv] = PlayerInfo[playerid][maxinv] - 1;
		    PlayerInfo[playerid][logs] = PlayerInfo[playerid][logs] - 1;
	            PlayerInfo[playerid][blogs] = PlayerInfo[playerid][blogs] + 1;
	            SendClientMessage(playerid, 0xFFFB00FF, "[!] 1 batch of logs deposited");
	    	}
	    	else
	    	{
	    	    SendClientMessage(playerid, 0xFF0000FF, "[!] You don't have any logs.");
		}
		}
		else
		{
		    SendClientMessage(playerid, 0xFF0000FF, "[!] You are not near the bank");
		}
		return 1;
	}
Ok so this is a command used for an item bank. I would however like to change the command so that I would be able to choose the number of logs I want to deposit using this with the restrictions that they don't have the amount of logs they chose to deposit. I would like the range to be between 1-28 when it comes to depositing.

How would I be able to do this?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)