Help with /eat
#9

hm.......... try this...

PHP код:
case DIALOG_IDLESTACKEAT:
        {
            new 
cash GetPlayerMoney(playerid);
            new 
price;
            if(!
response) return 1;
            if(
response)
            {
                switch(
listitem)
                {
                    case 
0:
                    {
                        new 
Float:health;
                        
GetPlayerHealth(playeridhealth);
                        
price 5;
                        if(
cash price) return SCM(playeridCOLOR_RED"You cannot afford that!");
                        
SCM(playerid,COLOR_LIGHTBLUE"You have purchased a small meal!");
                        
GivePlayerMoney(playerid, -price);
                        
PlayerInfo[playerid][pHealth] = health+15;
                        if(
PlayerInfo[playerid][pHealth] > 100)
                        {
                            
PlayerInfo[playerid][pHealth] = 100;
                            
SetPlayerHealth(playeridPlayerInfo[playerid][pHealth] );
                        }
                        else
                        {
                            
SetPlayerHealth(playerid,PlayerInfo[playerid][pHealth]);
                        }
                    }
                }
            }
        } 
Reply


Messages In This Thread
Help with /eat - by EiresJason - 02.04.2013, 15:25
Re: Help with /eat - by glbracer - 02.04.2013, 15:34
Re: Help with /eat - by EiresJason - 02.04.2013, 15:46
Re: Help with /eat - by glbracer - 02.04.2013, 15:49
Re: Help with /eat - by brawrr - 02.04.2013, 15:50
Re: Help with /eat - by EiresJason - 02.04.2013, 16:22
Re: Help with /eat - by brawrr - 02.04.2013, 16:24
Re: Help with /eat - by EiresJason - 02.04.2013, 16:26
Re: Help with /eat - by brawrr - 02.04.2013, 16:31
Re: Help with /eat - by EiresJason - 02.04.2013, 16:35
Re: Help with /eat - by RajatPawar - 02.04.2013, 16:37
Re: Help with /eat - by EiresJason - 02.04.2013, 16:47

Forum Jump:


Users browsing this thread: 1 Guest(s)