Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

help

$
0
0
pls guys help me
Script:
PHP Code:

public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    switch (
dialogid)
    {
        case 
DIALOG_ARMI:
        {
            if (
response)
            {
                switch (
listitem)
                {
                    case 
0:
                    {
                        if (
GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid0xAA3333AA"Non hai abbastanza denaro.!");
                        
SendClientMessage(playerid0xAA3333AA"Hai comprato un'AK47!");
                        
GivePlayerMoney(playerid, -1000);
                        
GivePlayerWeapon(playerid30100);
                    }
                    case 
1:
                    {
                        if (
GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid0xAA3333AA"Non hai abbastanza denaro.!");
                        
SendClientMessage(playerid0xAA3333AA"Hai comprato una M4!");
                        
GivePlayerMoney(playerid, -1000);
                        
GivePlayerWeapon(playerid31100);
                    }
                    case 
2:
                    {
                        if (
GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid0xAA3333AA"Non hai abbastanza denaro.!");
                        
SendClientMessage(playerid0xAA3333AA"Hai comprato una desert eagle!");
                        
GivePlayerMoney(playerid, -1000);
                        
GivePlayerWeapon(playerid24100);
                    }
                }
            }
        }
        case 
DIALOG_DROGA:
        {
            if (
response)
            {
                switch (
listitem)
                {
                    case 
0:
                    {
                        if (
GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid0xAA3333AA"Non hai abbastanza denaro.!");
                        
SendClientMessage(playerid0xAA3333AA"Hai comprato la Marijuana!");
                        
GivePlayerMoney(playerid, -1000);
                    }
                    case 
1:
                    {
                        if (
GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid0xAA3333AA"Non hai abbastanza denaro.!");
                        
SendClientMessage(playerid0xAA3333AA"Hai comprato la metanfetamina!");
                        
GivePlayerMoney(playerid, -1000);
                    }
                    case 
2:
                    {
                        if (
GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid0xAA3333AA"Non hai abbastanza denaro.!");
                        
SendClientMessage(playerid0xAA3333AA"Hai comprato la cocaina!");
                        
GivePlayerMoney(playerid, -1000);
                    }
                    default: return 
0// dialogid non è stato trovato,lo cerca in un altro script
                
}
            }
        }
        case 
DIALOG_REGISTRAZIONE:
        {
             if (!
response) return Kick(playerid);
             if(
response)
             {
                if(!
strlen(inputtext)) return ShowPlayerDialog(playeridDIALOG_REGISTRAZIONEDIALOG_STYLE_INPUT,""COL_WHITE"Registrazione...",""COL_RED"Hai inserito una password errata.\n"COL_WHITE"Inserisci una password per creare un account.","Registrati","Esci");
                new 
INI:File INI_Open(UserPath(playerid));
                
INI_SetTag(File,"data");
                
INI_WriteInt(File,"Password",udb_hash(inputtext));
                
INI_WriteInt(File,"Soldi",0);
                
INI_WriteInt(File,"Admin",0);
                
INI_WriteInt(File,"Uccisioni",0);
                
INI_WriteInt(File,"Morti",0);
                
INI_Close(File);

                
SetSpawnInfo(playerid001958.331343.1215.36269.15000000);
                
SpawnPlayer(playerid);
                
ShowPlayerDialog(playeridDIALOG_SUCCESSO_1DIALOG_STYLE_MSGBOX,""COL_WHITE"Sei loggato!",""COL_GREEN"Buono! Il Sistema Y_INI funziona corettamente. Rilogga per aggiornare il tuo stato!","Ok","");
                
SetCameraBehindPlayer(playerid);
             }
        }
        case 
DIALOG_LOGIN:
        {
             if ( !
response ) return Kick playerid );
             if( 
response )
             {
                if(
udb_hash(inputtext) == PlayerInfo[playerid][pPassword])
                 {
                    
INI_ParseFile(UserPath(playerid ), "LoadUser_%s", .bExtra true, .extra playerid);
                    
GivePlayerMoney(playeridPlayerInfo[playerid][pSoldi]);
                    
ShowPlayerDialog(playeridDIALOG_SUCCESSO_2DIALOG_STYLE_MSGBOX,""COL_WHITE"Successo!",""COL_GREEN"Sei loggato!","Ok","");
                 }
                 else
                 {
                    
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_INPUT,""COL_WHITE"Logga",""COL_RED"Hai inserito una password errata.\n"COL_WHITE"Inserisci una password.","Login","Esci");
                 }
             }
        }
    }
    return 
1// dialogid è stato trovato
}
{
    if(
response)
        {
        switch(
dialogid)
            {
            case 
1:
                {
                switch(
listitem)
                {
                    case 
0:
                    {
                       new 
Float:X;
                       new 
Float:Y;
                       new 
Float:Z;
                       
GetPlayerPos(playerid,X,Y,Z);
                       
CreateVehicle(451,X,Y+5,Z,1,1,1,90000);
                    }
                    case 
1:
                    {
                       new 
Float:X;
                       new 
Float:Y;
                       new 
Float:Z;
                       
GetPlayerPos(playerid,X,Y,Z);
                       
CreateVehicle(411,X,Y+5,Z,1,1,1,90000);
                    }
                    case 
2:
                    {
                       new 
Float:X;
                       new 
Float:Y;
                       new 
Float:Z;
                       
GetPlayerPos(playerid,X,Y,Z);
                       
CreateVehicle(541,X,Y+5,Z,1,1,1,90000);
                    }
                    case 
3:
                    {
                       new 
Float:X;
                       new 
Float:Y;
                       new 
Float:Z;
                       
GetPlayerPos(playerid,X,Y,Z);
                       
CreateVehicle(567,X,Y+5,Z,1,1,1,90000);
                    }
                }
            }
        }
        return 
1;
    }


Errori
PHP Code:

C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(545) : error 055start of function body without function header
C
:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(546) : error 010invalid function or declaration
C
:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(548) : error 010invalid function or declaration
C
:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(550) : error 010invalid function or declaration
C
:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(552) : error 010invalid function or declaration
C
:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(554) : error 010invalid function or declaration
C
:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(559) : error 021symbol already defined"GetPlayerPos"
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(562) : error 010invalid function or declaration
C
:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(564) : error 021symbol already defined"X"
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(565) : error 021symbol already defined"Y"
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(566) : error 021symbol already defined"Z"
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(570) : error 010invalid function or declaration
C
:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(572) : error 021symbol already defined"X"
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(573) : error 021symbol already defined"Y"
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(574) : error 021symbol already defined"Z"
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(578) : error 010invalid function or declaration
C
:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(580) : error 021symbol already defined"X"
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(581) : error 021symbol already defined"Y"
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(582) : error 021symbol already defined"Z"
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(589) : error 010invalid function or declaration
C
:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(601) : warning 203symbol is never used"X"
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(601) : warning 203symbol is never used"Y"
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(601) : warning 203symbol is never used"Z"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase


20 Errors



Viewing all articles
Browse latest Browse all 18226

Trending Articles