SA-MP Forums Archive
code problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: code problem (/showthread.php?tid=580611)



code problem - Cr3dO - 06.07.2015

PHP код:
if(dialogid == ATM)
            {
                if(
response)
                {
                    if(
listitem == 0)
                    {
                    
format(string,sizeof(string),"Вашата обща сума е %d$"PlayerInfo[playerid][pAccount]);
        
ShowPlayerDialog(playerid,1123,DIALOG_STYLE_MSGBOX,"Withdraw",string,"OK","Cancel");
                                    }
                            if(
listitem == 1)
                            {
                            else if(!
IsNumeric(inputtext))
        {
        
format(string,sizeof(string),"Въведете сумата, която искате да истеглите отдолу:");
        
ShowPlayerDialog(playerid,1123,DIALOG_STYLE_INPUT,"Withdraw",string,"Изтегли","Отмени");
        
SendClientMessage(playerid,COLOR_RED,"Валидни са само цифри");
        }
        else
        {
        
GivePlayerMoney(playerid,strval(inputtext));
        
PlayerInfo[playerid][pAccount] -= strval(inputtext);
        
format(string,sizeof(string),"Вие изтеглихте : %d$",strval(inputtext));
        
SendClientMessage(playerid,COLOR_YELLOW,string);
        
dini_IntSet(file,"Deposit",PlayerInfo[playerid][pAccount]);
        new 
string2[256]; format(string2,128,"Вашата нова обща сума е: %d$",PlayerInfo[playerid][pAccount]);
        
SendClientMessage(playerid,COLOR_YELLOW,string2);
        }
    }
                            if(
listitem == 2)
                            {
                new 
wanti;
                
wanti GetPlayerWantedLevel(playerid);
                
format(string,sizeof(string),"%d wanted level:"wanti);
                
ShowPlayerDialog(playerid,atm,DIALOG_STYLE_INPUT," Bail"string,"ok","cancel");
                }
                if(!
IsNumeric(inputtext))
                {
                }
                else
                {
                new 
nxtprice GetPlayerWantedLevel(playerid)+1//
                
new expamountprice nxtprice*price1;
                
GivePlayerMoney(playerid, -expamountprice);
                
GiveePlayerWantedLevel(playeridstrval(inputtext))
                }
                }
                return 
1;
                } 
help me


Re: code problem - Vince - 06.07.2015

Seriously? Plopping some horribly indented code and expecting people to magically know what is wrong?