»Samp-Series™ -Il Forum-

Posts written by NotAhzee

  1. .
    Già c'era un post di spam di south valley.
  2. .
    Farò una visita.
  3. .
    Vuoi fare il comando /ame in Zcmd?

    #Edit: Ti ho postato il comando.


    CITAZIONE
    CMD:ame(playerid, params[])
    {
    new sendername[MAX_PLAYER_NAME], string[128];
    if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "Uso: /ame [azione]");
    format(string, sizeof(string), "* %­s %­s", GetPlayerNameEx(playerid), params);
    SetPlayerChatBubble(playerid, string, me, 100.0, 10000);
    ProxDetector(20.0, playerid, string, 0x330066AA);
    return 1;
    }

    CITAZIONE
    stock GetPlayerNameEx(playerid)
    {
    new string[24];
    GetPlayerName(playerid,string,24);
    new str[24];
    strmid(str,string,0,strlen(string),24);
    for(new i = 0; i < MAX_PLAYER_NAME; i++)
    {
    if (str[i] == '_') str[i] = ' ';
    }
    return str;
    }


    Non lo testato.
  4. .
    Date un bel esempio utilizzando la Sobeit!
  5. .
    UP!
  6. .
    Ho risolto il problema.
    Quando ho messo
    CITAZIONE
    #include <ysi/Y_ini>

    L'errore era che ho messo la slash
    CITAZIONE
    /

    cosi,invece che
    CITAZIONE
    \

    cosi.


    Edited by |Hutcherson| - 16/6/2014, 02:16
  7. .
    Come faccio a risolverlo?
  8. .
    Da come vedo,sta venendo unica questa gamemode.
  9. .
    Ho notato un'altro post,siete voi o un utente ad averlo fatto?

    (CLICK ME)
  10. .
    Il server TS3 serve solo per assistenza tecnica?
  11. .
    Benvenuto.
  12. .
    EDIT: Cambiato voto in "LV"

    Edited by Alexander.H - 25/5/2014, 15:26
  13. .
    CITAZIONE (Cesar_Wialpont @ 14/5/2014, 16:05) 
    CITAZIONE (Alexander.H @ 14/5/2014, 15:29) 
    Questo sistema me l'aveva passato il mio amico,dicendo che l'aveva fatto lui.
    Le variabili le ho inserite io.
    Comunque non l'avevo mai visto prima questo sistema.

    Come fai ad inserire le variabili se non sai da dove provengono?

    :| Me l'ha passato con un paio di variabili già fatte, bastava sostituirle.
  14. .
    Questo sistema me l'aveva passato il mio amico,dicendo che l'aveva fatto lui.
    Le variabili le ho inserite io.
    Comunque non l'avevo mai visto prima questo sistema.
  15. .
    Salve,oggi dopo un bel po di tempo che non utilizzavo pawno volevo riprendere il mio progetto fermo da tanto tempo.(:|)
    Inserisco nella mia gamemode il sistema registrazione(Tutto ok),appena inserisco il sistema login,sorgono quattro tipi di errori.(errore 17-25-33-35).


    CODICE
    C:\Users\Toshiba\Desktop\Marco\Proggetto\gamemodes\SV-RP.pwn(119) : error 017: undefined symbol "RPName"
    C:\Users\Toshiba\Desktop\Marco\Proggetto\gamemodes\SV-RP.pwn(198) : error 025: function heading differs from prototype
    C:\Users\Toshiba\Desktop\Marco\Proggetto\gamemodes\SV-RP.pwn(208) : error 017: undefined symbol "ini_GetKey"
    C:\Users\Toshiba\Desktop\Marco\Proggetto\gamemodes\SV-RP.pwn(208) : error 033: array must be indexed (variable "keytmp")
    C:\Users\Toshiba\Desktop\Marco\Proggetto\gamemodes\SV-RP.pwn(211) : error 017: undefined symbol "ini_GetValue"
    C:\Users\Toshiba\Desktop\Marco\Proggetto\gamemodes\SV-RP.pwn(211) : error 033: array must be indexed (variable "valtmp")
    C:\Users\Toshiba\Desktop\Marco\Proggetto\gamemodes\SV-RP.pwn(214) : error 035: argument type mismatch (argument 2)
    C:\Users\Toshiba\Desktop\Marco\Proggetto\gamemodes\SV-RP.pwn(220) : error 017: undefined symbol "ini_GetKey"
    C:\Users\Toshiba\Desktop\Marco\Proggetto\gamemodes\SV-RP.pwn(220) : error 033: array must be indexed (variable "key")
    C:\Users\Toshiba\Desktop\Marco\Proggetto\gamemodes\SV-RP.pwn(221) : error 017: undefined symbol "ini_GetValue"
    C:\Users\Toshiba\Desktop\Marco\Proggetto\gamemodes\SV-RP.pwn(221) : error 033: array must be indexed (variable "val")
    C:\Users\Toshiba\Desktop\Marco\Proggetto\gamemodes\SV-RP.pwn(222) : error 017: undefined symbol "ini_GetValue"
    C:\Users\Toshiba\Desktop\Marco\Proggetto\gamemodes\SV-RP.pwn(222) : error 033: array must be indexed (variable "val")
    C:\Users\Toshiba\Desktop\Marco\Proggetto\gamemodes\SV-RP.pwn(223) : error 017: undefined symbol "ini_GetValue"
    C:\Users\Toshiba\Desktop\Marco\Proggetto\gamemodes\SV-RP.pwn(223) : error 033: array must be indexed (variable "val")
    C:\Users\Toshiba\Desktop\Marco\Proggetto\gamemodes\SV-RP.pwn(224) : error 017: undefined symbol "ini_GetValue"
    C:\Users\Toshiba\Desktop\Marco\Proggetto\gamemodes\SV-RP.pwn(224) : error 033: array must be indexed (variable "val")
    C:\Users\Toshiba\Desktop\Marco\Proggetto\gamemodes\SV-RP.pwn(225) : error 017: undefined symbol "ini_GetValue"
    C:\Users\Toshiba\Desktop\Marco\Proggetto\gamemodes\SV-RP.pwn(225) : error 033: array must be indexed (variable "val")
    C:\Users\Toshiba\Desktop\Marco\Proggetto\gamemodes\SV-RP.pwn(226) : error 017: undefined symbol "ini_GetValue"
    C:\Users\Toshiba\Desktop\Marco\Proggetto\gamemodes\SV-RP.pwn(226) : error 033: array must be indexed (variable "val")
    C:\Users\Toshiba\Desktop\Marco\Proggetto\gamemodes\SV-RP.pwn(227) : error 017: undefined symbol "ini_GetValue"
    C:\Users\Toshiba\Desktop\Marco\Proggetto\gamemodes\SV-RP.pwn(227) : error 033: array must be indexed (variable "val")
    C:\Users\Toshiba\Desktop\Marco\Proggetto\gamemodes\SV-RP.pwn(228) : error 017: undefined symbol "ini_GetValue"
    C:\Users\Toshiba\Desktop\Marco\Proggetto\gamemodes\SV-RP.pwn(228) : error 033: array must be indexed (variable "val")
    C:\Users\Toshiba\Desktop\Marco\Proggetto\gamemodes\SV-RP.pwn(229) : error 017: undefined symbol "ini_GetValue"


    CODICE
    public OnPlayerLogin(playerid,password)
    {
       new string2[128];
           format(string2, sizeof(string2), "Data/Account/%­s.ini", nome);
           new File: UserFile = fopen(string2, io_read);
           if ( UserFile )
           {
               new PassData[256];
               new keytmp[256], valtmp[256];
               fread( UserFile , PassData , sizeof( PassData ) );
               keytmp = ini_GetKey( PassData );
               if( strcmp( keytmp , "Key" , true ) == 0 )
                   {
                           valtmp = ini_GetValue( PassData );
                           strmid(PInfo[playerid][pPassword], valtmp, 0, strlen(valtmp)-1, 255);
                   }
                   if(strcmp(PInfo[playerid][pPassword],password, true ) == 0 && strlen(password) > 0)
                   {
                               new key[ 256 ] , val[ 256 ];
                               new Data[ 256 ];
                               while ( fread( UserFile , Data , sizeof( Data ) ) )
                                   {
                                           key = ini_GetKey( Data );
                                           if( strcmp( key , "Nome" , true ) == 0 ) { val = ini_GetValue( Data ); PInfo[playerid][pNome] = strval( val ); }
                                       if( strcmp( key , "Email" , true ) == 0 ) { val = ini_GetValue( Data ); PInfo[playerid][pEmail] = strval( val ); }
                                   if( strcmp( key , "Ip" , true ) == 0 ) { val = ini_GetValue( Data ); PInfo[playerid][pIp] = strval( val ); }
                                   if( strcmp( key , "IdHardware" , true ) == 0 ) { val = ini_GetValue( Data ); PInfo[playerid][pIdHardware] = strval( val ); }
                                           if( strcmp( key , "Registrato" , true ) == 0 ) { val = ini_GetValue( Data ); PInfo[playerid][pRegistrato] = strval( val ); }
                                           if( strcmp( key , "Sesso" , true ) == 0 ) { val = ini_GetValue( Data ); PInfo[playerid][pSesso] = strval( val ); }
                                           if( strcmp( key , "Altezza" , true ) == 0 ) { val = ini_GetValue( Data ); PInfo[playerid][pAltezza] = strval( val ); }
                                           if( strcmp( key , "Peso" , true ) == 0 ) { val = ini_GetValue( Data ); PInfo[playerid][pPeso] = strval( val ); }
                                           if( strcmp( key , "Eta" , true ) == 0 ) { val = ini_GetValue( Data ); PInfo[playerid][pEta] = strval( val ); }
                                           if( strcmp( key , "Livello" , true ) == 0 ) { val = ini_GetValue( Data ); PInfo[playerid][pLivello] = strval( val ); }
                                           if( strcmp( key , "Exp" , true ) == 0 ) { val = ini_GetValue( Data ); PInfo[playerid][pExp] = strval( val ); }
                                           if( strcmp( key , "Tutoriato" , true ) == 0 ) { val = ini_GetValue( Data ); PInfo[playerid][pTutoriato] = strval( val ); }
                                           if( strcmp( key , "Staffer" , true ) == 0 ) { val = ini_GetValue( Data ); PInfo[playerid][pStaffer] = strval( val ); }
                                           if( strcmp( key , "LivelloStaffer" , true ) == 0 ) { val = ini_GetValue( Data ); PInfo[playerid][pStafferLivello] = strval( val ); }
                                           if( strcmp( key , "StafferinDuty" , true ) == 0 ) { val = ini_GetValue( Data ); PInfo[playerid][pStafferDuty] = strval( val ); }
                                           if( strcmp( key , "VirtualWorld" , true ) == 0 ) { val = ini_GetValue( Data ); PInfo[playerid][pVirtualWorld] = strval( val ); }
                                           if( strcmp( key , "Soldi" , true ) == 0 ) { val = ini_GetValue( Data ); PInfo[playerid][pSoldi] = strval( val ); }
                                           if( strcmp( key , "ContoBancario" , true ) == 0 ) { val = ini_GetValue( Data ); PInfo[playerid][pContoBancario] = strval( val ); }
                                           if( strcmp( key , "Donatore" , true ) == 0 ) { val = ini_GetValue( Data ); PInfo[playerid][pDonatore] = strval( val ); }
                                        if( strcmp( key , "PatenteA" , true ) == 0 ) { val = ini_GetValue( Data ); PInfo[playerid][pPatenteA] = strval( val ); }
                                   if( strcmp( key , "PatenteB" , true ) == 0 ) { val = ini_GetValue( Data ); PInfo[playerid][pPatenteB] = strval( val ); }
                                      if( strcmp( key , "LicenzaNautica" , true ) == 0 ) { val = ini_GetValue( Data ); PInfo[playerid][pLicenzaNautica] = strval( val ); }
                                           if( strcmp( key , "LicenzaVolo" , true ) == 0 ) { val = ini_GetValue( Data ); PInfo[playerid][pLicenzaVolo] = strval( val ); }
                                           if( strcmp( key , "Products" , true ) == 0 ) { val = ini_GetValue( Data ); PInfo[playerid][pProducts] = strval( val ); }
                                           if( strcmp( key , "Arrestato" , true ) == 0 ) { val = ini_GetValue( Data ); PInfo[playerid][pArrestato] = strval( val ); }
                                           if( strcmp( key , "TempoArrestato" , true ) == 0 ) { val = ini_GetValue( Data ); PInfo[playerid][pTempoArresto] = strval( val ); }
                                           if( strcmp( key , "Jailato" , true ) == 0 ) { val = ini_GetValue( Data ); PInfo[playerid][pJailato] = strval( val ); }
                                           if( strcmp( key , "TempoJail" , true ) == 0 ) { val = ini_GetValue( Data ); PInfo[playerid][pTempoJail] = strval( val ); }
                                           if( strcmp( key , "Ammanettato" , true ) == 0 ) { val = ini_GetValue( Data ); PInfo[playerid][pAmmanettato] = strval( val ); }
                                           if( strcmp( key , "Bannato" , true ) == 0 ) { val = ini_GetValue( Data ); PInfo[playerid][pBannato] = strval( val ); }
                                           if( strcmp( key , "AccountLockato" , true ) == 0 ) { val = ini_GetValue( Data ); PInfo[playerid][pLockAccount] = strval( val ); }
                                           if( strcmp( key , "BanIp" , true ) == 0 ) { val = ini_GetValue( Data ); PInfo[playerid][pBanIp] = strval( val ); }
                                           if( strcmp( key , "Loggato" , true ) == 0 ) { val = ini_GetValue( Data ); PInfo[playerid][pLoggato] = strval( val ); }
                   }
                   fclose(UserFile);
           return 1;
    }

    La prima riga è 198 e l'ultima 257.

    In OnPlayerConnect
    CODICE
    if(RPName(nome,first,last))
           {
                   GetPlayerName(playerid, nome, sizeof(nome));
                   format(stringa, sizeof(stringa), "Data/Account/%­s.ini",nome);
                   new File: hFile = fopen(stringa, io_read);
                   if (hFile)
                   {
                       ShowPlayerDialog(playerid, login, DIALOG_STYLE_INPUT,"Login..","{FFFFFF}Metti la password per loggare.","Conferma","Esci");
                   }
                   else
                   {
                       ShowPlayerDialog(playerid, registrazione, DIALOG_STYLE_INPUT,"Registrazione..","{FFFFFF}Inserisci una password per registrarti.","Conferma","Esci");
                   }
           }
           else
           {
               SendClientMessage(playerid,COLOR_RED,"[Kick]:{FFFFFF}Sei stato kickato dal bot motivo:Nome non RP. Es. Mario_Rossi");
               SetTimerEx("KickNomeRP", 1000, false, "i", playerid);
           }


    In fondo alla gamemode.
    CODICE
    stock RPName(name[],ret_first[],ret_last[])
    {
           new len = strlen(name),
                   point = -1,
                   bool:done = false;
           for(new i = 0; i < len; i++)
           {
               if(name[i] == '_')
               {
                   if(point != -1) return 0;
                   else {
                                   if(i == 0) return 0;
                                   point = i + 1;
                           }
               } else if(point == -1) ret_first[i] = name[i];
               else {
                           ret_last[i - point] = name[i];
                           done = true;
                   }
           }
           if(!done) return 0;
           return 1;
    }

    stock ini_GetKey( line[] )
    {
       new keyRes[128];
       keyRes[0] = 0;
       if ( strfind( line , "=" , true ) == -1 ) return keyRes;
       strmid( keyRes , line , 0 , strfind( line , "=" , true ) , sizeof( keyRes) );
       return keyRes;
    }

    stock ini_GetValue( line[] )
    {
       new valRes[128];
       valRes[0]=0;
       if ( strfind( line , "=" , true ) == -1 ) return valRes;
       strmid( valRes , line , strfind( line , "=" , true )+1 , strlen( line ) , sizeof( valRes ) );
       return valRes;
    }


    Spero che mi potrete aiutare,se non avete capito domandate pure.
55 replies since 23/1/2014
.