[HELP]How to reset variable
#3

Quote:
Originally Posted by Misiur
Посмотреть сообщение
pawn Код:
//1.
new value = 105;
if (value > 100) value = 100;

//2.
new value = 108;
value = clamp(value, 0, 100);
thanks for answer.

how to use it on:

Код:
	if(dialogid == DIALOG_FOODKIOSK)
	{
    if(response)
    {
	if(listitem == 0)
	{
    if(GetPlayerCash(playerid) < 30) return SCM(playerid, COLOR_GREEN, "[PRODAVAC]: "COL_WHITE"Nemate dovoljno novaca. Hotdog kosta 3$.");
    if(PlayerInfo[playerid][pSnaga] == 100) return SCM(playerid, COLOR_GREEN, "[ZIVOT]: "COL_WHITE"Ne mozete vise jesti.");

    SendClientMessage(playerid, COLOR_GREEN, "[PRODAVAC]: "COL_WHITE"Kupili ste hotdog. Dobar tek.");
    GivePlayerCash(playerid, -3);
    PlayerInfo[playerid][pSnaga] += 7;
    SetPlayerHealth(playerid, +7);
	}
	
	//
    }
    return 1;
	}
Reply


Messages In This Thread
[HELP]How to reset variable - by TiXz0r - 04.03.2015, 19:08
Re: [HELP]How to reset variable - by Misiur - 04.03.2015, 19:09
Re: [HELP]How to reset variable - by TiXz0r - 04.03.2015, 19:53
Re: [HELP]How to reset variable - by Lunoxx - 04.03.2015, 20:40
Re: [HELP]How to reset variable - by Misiur - 04.03.2015, 21:11

Forum Jump:


Users browsing this thread: 1 Guest(s)