Drink Dialog
#1

i made a drink dialog but i dot get it why i get 26 errors..isnt the cmd good?

PHP код:
if ( dialogid == Dialog_Bar )
                    {
                    if ( 
response )
                    {
                    if( 
listitem == )
                    {
                    if(
PlayerInfo[playerid][pAge] < 16)
                    {
                    
SendClientMessage(playeridCOLOR_WHITE"Barman:Scuzati trebuie sa detineti varsta de 16 ani!");
                    return 
1;
                    }
                    
GivePlayerCash(playerid, - 10);
                    
SetPlayerSpecialAction(playeridSPECIAL_ACTION_DRINK_BEER);
                    new 
Float:health;
                    
GetPlayerHealth(playeridhealth);
                    if(
health 100)
                    {
                    if(
PlayerInfo[playerid][pAlcoholPerk] > 0) { PlayerDrunk[playerid] += 1; new hp PlayerInfo[playerid][pAlcoholPerk]; hp += 10SetPlayerHealth(playeridhealth hp); }
                    else { 
SetPlayerHealth(playeridhealth 10.0); }
                    }
                    }
                    if( 
listitem == )
                    {
                    if(
PlayerInfo[playerid][pAge] < 18)
                    {
                    
SendClientMessage(playeridCOLOR_WHITE"Barman:Scuzati trebuie sa detineti varsta de 18 ani!");
                    return 
1;
                    }
                    
GivePlayerCash(playerid, - 8);
                    
SetPlayerSpecialAction(playeridSPECIAL_ACTION_DRINK_BEER);
                    new 
Float:health;
                    
GetPlayerHealth(playeridhealth);
                    if(
health 100)
                    {
                    if(
PlayerInfo[playerid][pAlcoholPerk] > 0) { PlayerDrunk[playerid] += 1; new hp PlayerInfo[playerid][pAlcoholPerk]; hp += 15SetPlayerHealth(playeridhealth hp); }
                    else { 
SetPlayerHealth(playeridhealth 15.0); }
                    }
                    }
                    if( 
listitem == )
                    {
                    if(
PlayerInfo[playerid][pAge] < 18)
                    {
                    
SendClientMessage(playeridCOLOR_WHITE"Barman:Scuzati trebuie sa detineti varsta de 18 ani!");
                    return 
1;
                    }
                    
GivePlayerCash(playerid, - 100);
                    
SetPlayerSpecialAction(playeridSPECIAL_ACTION_DRINK_WINE);
                    new 
Float:health;
                    
GetPlayerHealth(playeridhealth);
                    if(
health 100)
                    {
                    if(
PlayerInfo[playerid][pAlcoholPerk] > 0) { PlayerDrunk[playerid] += 1; new hp PlayerInfo[playerid][pAlcoholPerk]; hp += 20SetPlayerHealth(playeridhealth hp); }
                    else { 
SetPlayerHealth(playeridhealth 20.0); }
                    }
                    }
                    if( 
listitem == )
                    {
                    if(
PlayerInfo[playerid][pAge] < 18)
                    {
                    
SendClientMessage(playeridCOLOR_WHITE"Barman:Scuzati trebuie sa detineti varsta de 18 ani!");
                    return 
1;
                    }
                    
GivePlayerCash(playerid, - 20);
                    
SetPlayerSpecialAction(playeridSPECIAL_ACTION_DRINK_WINE);
                    new 
Float:health;
                    
GetPlayerHealth(playeridhealth);
                    if(
health 100)
                    {
                    if(
PlayerInfo[playerid][pAlcoholPerk] > 0) { PlayerDrunk[playerid] += 1; new hp PlayerInfo[playerid][pAlcoholPerk]; hp += 27SetPlayerHealth(playeridhealth hp); }
                    else { 
SetPlayerHealth(playeridhealth 27.0); }
                    }
                    }
                    if( 
listitem == )
                    {
                    if(
PlayerInfo[playerid][pAge] < 18)
                    {
                    
SendClientMessage(playeridCOLOR_WHITE"Barman:Scuzati trebuie sa detineti varsta de 18 ani!");
                    return 
1;
                    }
                    
GivePlayerCash(playerid, - 18);
                    
SetPlayerSpecialAction(playeridSPECIAL_ACTION_DRINK_WINE);
                    new 
Float:health;
                    
GetPlayerHealth(playeridhealth);
                    if(
health 100)
                    {
                    if(
PlayerInfo[playerid][pAlcoholPerk] > 0) { PlayerDrunk[playerid] += 1; new hp PlayerInfo[playerid][pAlcoholPerk]; hp += 40SetPlayerHealth(playeridhealth hp); }
                    else { 
SetPlayerHealth(playeridhealth 40.0); }
                    }
                    }
                    if(
listitem== )
                    {
                    
GivePlayerCash(playerid, - 10);
                    new 
Float:health;
                    
GetPlayerHealth(playeridhealth);
                    
SetPlayerSpecialAction(playeridSPECIAL_ACTION_DRINK_SPRUNK);
                    
SetPlayerDrunkLevel(playerid, -1000);
                    if(
health 100)
                    {
                    if(
PlayerInfo[playerid][pAlcoholPerk] > 0) { new hp PlayerInfo[playerid][pAlcoholPerk]; hp += 5SetPlayerHealth(playeridhealth hp); }
                    else { 
SetPlayerHealth(playeridhealth 50.0); }
                    }
                    else if(
health 100)
                    {
                    
SetPlayerHealth(playerid100);
                    }
                    }
                    if(
listitem == )
                    {
                    
GivePlayerCash(playerid, - 4);
                    new 
Float:health;
                    
GetPlayerHealth(playeridhealth);
                    
SetPlayerSpecialAction(playeridSPECIAL_ACTION_DRINK_SPRUNK);
                    
SetPlayerDrunkLevel(playerid, -1000);
                    if(
health 100)
                    {
                    if(
PlayerInfo[playerid][pAlcoholPerk] > 0) { new hp PlayerInfo[playerid][pAlcoholPerk]; hp += 5SetPlayerHealth(playeridhealth hp); }
                    else { 
SetPlayerHealth(playeridhealth 50.0); }
                    }
                    else if(
health 100)
                    {
                    
SetPlayerHealth(playerid100);
                    }
                    }
                    return 
1;
                    } 
PHP код:
if(strcmp(cmd"/drink"true) == 0)
                    {
                    if(
IsAtBar(playerid))
                    {
                    if(
GetPlayerDrunkLevel(playerid) <= 20000)
                    {
                    
ShowPlayerDialog(playerid,Dialog_Bar,DIALOG_STYLE_LIST,"{278227}Bar","Apa\nFanta\nBere\nTuica\nSampanie\nVodka\nLichior","Selecteaza","Inchide");
                    return 
1;
                    {
                    
SendClientMessage(playeridCOLOR_WHITE"Bartender: I don't know that Drink Name.");
                    return 
1;
                    }
                    
format(stringsizeof(string), "* %s bea %s de la pahar."sendername,Dialog_Bar);
                    
ProxDetector(30.0playeridstringCOLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
                    }
                    else
                    {
                    
SendClientMessage(playeridCOLOR_GREY"   Numai poti sa bei");
                    return 
1;
                    }
                    }
                    }
                    } 
Reply


Messages In This Thread
Drink Dialog - by Dan_Barocu - 12.06.2012, 16:45
Re: Drink Dialog - by Faisal_khan - 12.06.2012, 17:04
Re: Drink Dialog - by Dan_Barocu - 12.06.2012, 17:09
Re: Drink Dialog - by Dan_Barocu - 12.06.2012, 17:42
Re: Drink Dialog - by WillyP - 12.06.2012, 17:43
Re: Drink Dialog - by milanosie - 12.06.2012, 17:43
Re: Drink Dialog - by Faisal_khan - 12.06.2012, 17:44
Re: Drink Dialog - by Dan_Barocu - 12.06.2012, 17:48
Re: Drink Dialog - by milanosie - 12.06.2012, 17:49
Re: Drink Dialog - by WillyP - 12.06.2012, 17:49

Forum Jump:


Users browsing this thread: 1 Guest(s)