Jump to content

[emy]

Membru
  • Posts

    29
  • Joined

  • Last visited

Posts posted by [emy]

  1. schimba tot OnDialogResponse cu ce iti dau eu aici

    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
        switch(dialogid) {
        case DIALOG_REGISTER: {
                if(!response)
                    return Kick(playerid);
    
                if(strlen(inputtext) <4 || strlen(inputtext) > 32)
                return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Register", "Scrie o parola pentru a iti crea contul:", "Select", "Cancel");
    
                gQuery[0] = EOS;
                mysql_format(SQL, gQuery, sizeof(gQuery), "INSERT INTO `users` (`Name`, `Password`) VALUES (`%s` , `%s`)", GetName(playerid), inputtext);
                mysql_tquery(SQL, gQuery, "insertAccount", "i" , playerid );
    
                gString[0] = EOS;
                format(gString, sizeof(gString), "Parola ta contine %d caractere." strlen(inputtext));
                SCM(playerid, -1 , gString);
    
                format(PlayerInfo[playerid][pPassword], 32 , inputtext);
    
                ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT, "EMAIL", "Te rugam sa-ti setezi adresa de email:", "Select", "Cancel");
            }
            case DIALOG_EMAIL: {
                if(!response)
                    return Kick(playerid);
    
                if(strlen(inputtext) <4 || strlen(inputtext) > 32)
                return ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT, "EMAIL", "Te rugam sa-ti setezi adresa de email:", "Select", "Cancel");
    
                gQuery[0] = EOS;
                mysql_format(SQL, gQuery, sizeof(gQuery), "UPDATE `Users` SET `Email = `%s` WHERE `ID` = `%d`" , inputtext, PlayerInfo[playerid][pSQLID]);
                mysql_tquery(SQL, gQuery, "", "" );
    
                gString[0] = EOS;
                format(gString, sizeof(gString), "Email setat %s" strlen(inputtext));
                SCM(playerid, -1 , gString);
    
                format(PlayerInfo[playerid][pEmail], 32 , inputtext);
    
                ShowPlayerDialog(playerid, DIALOG_GENDER, DIALOG_STYLE_MSGBOX, "GENDER", "Seteaza-ti sexul:", "Masculin", "Feminin");
            }
            case DIALOG_GENDER: {
                switch(response) {
                    case 0: {
                        PlayerInfo[playerid][pGender] = 1;
                        SCM(playerid, -1, "Sexul ales este Feminin");
                    }
                    case 1: {
                        PlayerInfo[playerid][pGender] = 0;
                        SCM(playerid, -1, "Sexul ales este Masculin");
                }
            }
            gQuery[0] = EOS;
                mysql_format(SQL, gQuery, sizeof(gQuery), "UPDATE `Users` SET `Gender = `%d` WHERE `ID` = `%d`", PlayerInfo[playerid][pGender], PlayerInfo[playerid][pSQLID]);
                mysql_tquery(SQL, gQuery, "", "" );
    
                SpawnPlayer(playerid);
            }
                case DIALOG_LOGIN: {
                    if(!response)
                        return Kick(playerid);
    
                mysql_format(SQL, gQuery, sizeof(gQuery), "SELECT * FROM `users` WHERE Name` = `%s` AND `Password`=`%s` LIMIT 1" GetName(playerid)inputtext);
                mysql_tquery(SQL, gQuery, "onlogin" , "i" , playerid);
            }
        }
        return 1;
    }

    mai multa atentie data viitoare

  2. Acum 10 ore, shane a spus:

    Salut @[emy],

    Nu ai nevoie neaparat de o functie pentru asta. Poti calcula premiul urmator adunand pPrays cu 5. Rezultatul va fi urmatorul:

    
    SCMf(playerid, -1, "{28A700}PRAY >> {FFFFFF}You have prayed %d times until now. {FF5D00}Next reward at %d times.", praypoints+1, playerVariables[playerid][pPrayers] + 5);

    Iar ca sa simplifici si mai mult, ai putea face ceva de genul:

    
    new Prays_Rewards[ 6 ] = { 5, 10, 15, 20, 25, 30 };
    
    for( new i = 0; i < 6; i ++ ) {
    	if( playerVariables[ playerid ][ pPrayers ] == Prays_Rewards[ i ] ) {
    		SCMf( playerid, -1, "Case %d", playerVariables[ playerid ][ pPrayers ] );
    		SCMf( playerid, -1, "{28A700}PRAY >> {FFFFFF}You have prayed %d times until now. {FF5D00}Next reward at %d times.", playerVariables[ playerid ][ pPrayers ], playerVariables[ playerid ][ pPrayers ] + 5 );
    		break;
    	}
    }

    Ti-am dat un exemplu, nu stiu ce vrei sa faci sau cum ai tu format sistemul :)

    e exact ce cautam, mersi mult! 

    respect!

  3. 	switch (playerVariables[playerid][pPrayers]) {
    		case 5: { 
    			SendClientMessage(playerid, -1, "Case 5"); 
    			SCMf(playerid, -1, "{28A700}PRAY >> {FFFFFF}You have prayed %d times until now. {FF5D00}Next reward at 10 times.", praypoints+1);	
    		}
    		case 10: { 
    			SendClientMessage(playerid, -1, "Case 10");
    			SCMf(playerid, -1, "{28A700}PRAY >> {FFFFFF}You have prayed %d times until now. {FF5D00}Next reward at 15 times.", praypoints+1);	 
    		}
    		case 15: { 
    			SendClientMessage(playerid, -1, "Case 15");
    			SCMf(playerid, -1, "{28A700}PRAY >> {FFFFFF}You have prayed %d times until now. {FF5D00}Next reward at 30 times.", praypoints+1);	 
    		}
    		case 30: { 
    			SendClientMessage(playerid, -1, "Case 30");
    			SCMf(playerid, -1, "{28A700}PRAY >> {FFFFFF}You have prayed %d times until now. {FF5D00}Next reward at 35 times.", praypoints+1);	 
    		}
    		case 35: { 
    			SendClientMessage(playerid, -1, "Case 35");
    			SCMf(playerid, -1, "{28A700}PRAY >> {FFFFFF}You have prayed %d times until now. {FF5D00}Next reward at 50 times.", praypoints+1);	 
    		}
    	}

    Cum as putea face ca in loc de a pune mesajul asta de fiecare data sa pot sa scriu 

    SCMf(playerid, -1, "{28A700}PRAY >> {FFFFFF}You have prayed %d times until now. {FF5D00}Next reward at %d times.", praypoints+1, getPrayPoints(playerid)));

    Adica practic, cum sa arate functia mea.. getPrayPoints... Vreau ca atunci cand mai are 5 sa scrie ca au mai ramas 5... cand se fac 35 de exemplu si eu am 31 de puncte sa imi scrie ca mai trebuie de 4 ori sa repet actiunea...  

  4. ia-o și tu logic. când intră într-un biz, jucătorului i se atribuie valoarea InBussines, InHouse, etc... dupa iesire, adica ExitFunction, i se sterge acea valoare, se schimba de fapt. 

    nu mai luati b-hood de la HPQ de pe net daca nu stiti sa-l serviti. simplu. 

    function ExitFunction(playerid) {
        new i;
        if(InHouse[playerid] != -1) {
            i = InHouse[playerid];
            if(PlayerInfo[playerid][pSleeping] == 1) 
                return true;    
            
            if(!PlayerToPoint(2, playerid,HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz]))
                return true;
    
            SetPlayerPosEx(false, playerid,HouseInfo[i][hEntrancex],HouseInfo[i][hEntrancey],HouseInfo[i][hEntrancez]);
            SetPlayerFreeze(playerid, 3);
            SetPlayerInterior(playerid,0);
            SetPlayerVirtualWorld(playerid, 0);
            PlayRadio[playerid] = 0;
            StopAudioStreamForPlayer(playerid);
            InHouse[playerid] = -1; // uita-te aici.
            return true;
        }
        if(InBussines[playerid] != -1) {
            i = InBussines[playerid];
            if(!PlayerToPoint(2, playerid,BizzInfo[i][bExitX], BizzInfo[i][bExitY], BizzInfo[i][bExitZ]))
                return true;
    
            SetPlayerInterior(playerid, 0);
            SetPlayerPosEx(false, playerid,BizzInfo[i][bEntranceX],BizzInfo[i][bEntranceY],BizzInfo[i][bEntranceZ]);
            SetPlayerFreeze(playerid, 3);
            PlayerInfo[playerid][pLocal] = 255;
            PlayRadio[playerid] = 0;
            StopAudioStreamForPlayer(playerid);
            SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pTutorial] < 10 ? playerid + 10 : 0);
            InBussines[playerid] = -1; // uita-te si aici.
            return true;
        }
        if(InHQ[playerid] != -1) {
            i = InHQ[playerid];
            if(!PlayerToPoint(2, playerid, DynamicFactions[i][fcX], DynamicFactions[i][fcY], DynamicFactions[i][fcZ]))
                return true;
    
            SetPlayerPosEx(false, playerid, DynamicFactions[i][extX], DynamicFactions[i][extY], DynamicFactions[i][extZ]);
            SetPlayerInterior(playerid, 0);
            SetPlayerVirtualWorld(playerid, 0);
            InHQ[playerid] = -1; // poate intelegi pana la urma.
            return true;
        }
        if(InClanHQ[playerid] != -1) {
            i = InClanHQ[playerid];
            if(PlayerToPoint(2, playerid, ClanHQInfo[i][cEnterX], ClanHQInfo[i][cEnterY], ClanHQInfo[i][cEnterZ])){
                SetPlayerInterior(playerid, 0);
                SetPlayerFreeze(playerid, 3);
                SetPlayerPosEx(false, playerid, ClanHQInfo[i][cPosX], ClanHQInfo[i][cPosY], ClanHQInfo[i][cPosZ]);
                SetPlayerVirtualWorld(playerid, 0);
                InClanHQ[playerid] = -1;  // daca intra, trebuie sa si iasa.     
            } 
        }
        return true;
    }

     

  5. pe linia plugins ai 2 mysql. scoate mysql.so, restart, incearca iarasi.

    [22:49:38]   Loaded.
    [22:49:38]  Loading plugin: mysql_static.so
    [22:49:38]  >> plugin.mysql: R34 successfully loaded.
    [22:49:38]   Loaded.
    [22:49:38]  Loading plugin: mysql.so
    [22:49:38]  >> plugin.mysql: R34 successfully loaded.
    [22:49:38]   Loaded.

    chiar aici.

  6. Salutari. Dupa cum spune si titlul caut cativa oameni care sa ma ajute sa testez anumite lucruri. Sa cunoasca SA:MP si cateva chestii de baza, sa stie sa isi bage nasul in comenzi si sa 'abuzeze' controlat de ele. Am 22 de ani, nu doresc copii. Scriptez de aproape un an (adunat), joc de pe vremea gf-zone-ului, m-am apucat de SA:MP la infiintarea pronion-ului. ~2012, 2013. Am fost admin 1 acolo, iar dupa aia am incetat sa mai activez in domeniul SA:MP. Am luat o pauza de 5, ba chiar 6 ani.  Dovada vechimii mele: 

    Spoiler

     

    Sunt dispus sa ofer de la admin 2 sau 3 in jos + lideri. Nu exista desfiintarea comunitatii din punctul meu de vedere. Eu platesc lunar hostul server-ului + forumul de aproape 6 luni, si nu joaca nici naiba pe server.

    Nu sunt geniul scripterilor, dar nici paleta. Daca nu pot primi ajutor din alte parti, o voi face eu singur atunci. Orice se poate. Am deja co-fondator (admin 6) si admin 5.

    Discord: hope#2698

  7. cum se rezolva chestia aia cu mailul? 

    Citat

    You are connecting from a different IP address from the game IP address, please check your mail to login.

    tot primesc

    Citat

    PHP Warning:  include(/home/.../panel/inc/composer/vendor/autoload.php): failed to open stream: No such file or directory in /home/.../inc/pages/login.p.php on line 49
    PHP Warning:  include(): Failed opening '/home.../panel/inc/composer/vendor/autoload.php' for inclusion (include_path='.:/opt/alt/php72/usr/share/pear') in /home/.../inc/pages/login.p.php on line 49


     

  8. e un gamemode greoi de inteles, iti multumesc frumos, acum am terminat de trecut pe r41-4 tot gamemode-ul. pot spune ca se misca decent. 

    vreau sa trec si timerele pe ysi, sa trec si la ultima versiune de ysi si cred ca e numai bun de pornit.

    greselile gramaticale si lucrurile neterminate se iarta, le rezolv eu. 

    super gamemode per total!

  9. gamemode-ul e foarte bun, doar ca e putin cam plin de bug-uri:))

    merita de inceput ceva pe el, trecut la r41-4 si trecute timerele pe ysi si e numa' bun.

    de scos anumite chestii, sunt multe nefolositoare. 

    eu am depistat cateva buguri, cel putin la sistemul de pet sunt cateva. 

    nu e chiar optimizat... cam asta e.

  10. SA-MP Dedicated Server
    ----------------------
    v0.3.7-R2, (C)2005-2015 SA-MP Team
    
    [21:04:10] filterscripts = ""  (string)
    [21:04:10] 
    [21:04:10] Server Plugins
    [21:04:10] --------------
    [21:04:10]  Loading plugin: crashdetect.so
    [21:04:10]   CrashDetect v4.15.1 is OK.
    [21:04:10]   Loaded.
    [21:04:10]  Loading plugin: mysql_static.so
    [21:04:10]  >> plugin.mysql: R39-6 successfully loaded.
    [21:04:10]   Loaded.
    [21:04:10]  Loading plugin: sscanf.so
    [21:04:10] 
    
    [21:04:10]  ===============================
    
    [21:04:10]       sscanf plugin loaded.     
    
    [21:04:10]          Version:  2.8.1        
    
    [21:04:10]    (c) 2012 Alex "Y_Less" Cole  
    
    [21:04:10]  ===============================
    
    [21:04:10]   Loaded.
    [21:04:10]  Loading plugin: streamer.so
    [21:04:10] 
    
    *** Streamer Plugin v2.7.7 by Incognito loaded ***
    
    [21:04:10]   Loaded.
    [21:04:10]  Loaded 4 plugins.
    
    [21:04:10] 
    [21:04:10] Filterscripts
    [21:04:10] ---------------
    [21:04:10]   Loaded 0 filterscripts.
    
    [21:04:12]  
    [21:04:12]  
    [21:04:12]  
    [21:04:12]  ======================================= 
    [21:04:12]  |                                     | 
    [21:04:12]  |        YSI version 3.09.0684        | 
    [21:04:12]  |        By Alex "Y_Less" Cole        | 
    [21:04:12]  |                                     | 
    [21:04:12]  ======================================= 
    [21:04:12]  
    [21:04:12]  
    [21:04:12]  
    [21:04:12] Server: Official
    [21:04:12] Server vehicles: 0
    [21:04:12] Safezones: 0
    [21:04:12] Houses: 0
    [21:04:12] Clans: 0
    [21:04:12] Clan zones: 0
    [21:04:12] Bussines: 0
    [21:04:12] Turfs: 0
    [21:04:12] Factions: 0
    [21:04:12] Garages: 0
    [21:04:12] Jobs: 0
    [21:04:12] Furnitures: 0
    [21:04:12] Stuff Loaded
    [21:04:12] Safes: 0
    [21:04:12] Apartaments: 0
    [21:04:12] Number of vehicle models: 18
    [21:04:13] Garages loaded: 0
    [21:04:13] Accesory loaded: 0

     

    Dupa cum vedeti, astea-s "erorile".

    Folosesc mysql_static.so in plugins. Si nu il ia. Deja nu mai pot.

  11.                 if(!strcmp(PlayerInfo[i][pPropose], "Nimeni", true) == 0)
                    {
                        new gold = 1 + random(477777);
                        SCM(i, COLOR_GOLD, "Married: Ai primit +$%s pentru ca faci parte dintr-un cuplu!", FormatNumber(gold)); //go back payday casatoriti dublat
                        GivePlayerCash(i, 1, gold);
                    } 
    warning 213: tag mismatch: expected tag none ("_"), but found "bool"
     warning 202: number of arguments does not match definition

    primesc aceste erori. 

     

    edit: stiu ca sunt warn-uri, dar vreau un gm curat si nu ma las pana nu dispar toate warnurile

  12. public OnPlayerStreamOut(playerid, forplayerid) {
        if(PlayerHit[playerid] != -1) ShowPlayerNameTagForPlayer(forplayerid, playerid, 0);
        SetPlayerMarkerForPlayer( playerid, forplayerid, ( GetPlayerColor( forplayerid ) & 0xFFFFFF00 ) );
        SetPlayerMarkerForPlayer( forplayerid, playerid, ( GetPlayerColor( playerid ) & 0xFFFFFF00 ) );
        return 1;
    }

    asta am la onstreamout

    public OnPlayerStreamIn(playerid, forplayerid)
    {
        new iswar = 0, attackers, defenders;
        if(PlayerHit[playerid] != -1) ShowPlayerNameTagForPlayer(forplayerid, playerid, 0);
        for(new i = 1; i < sizeof(Turfs) && iswar == 0; i++) {
            attackers = WarInfo[i][wAttacker];
            defenders = WarInfo[i][wFaction];
            if(WarInfo[i][wTime] > 1 && attackers != 0 && defenders != 0) {
                if( (PlayerInfo[playerid][pMember] == attackers || PlayerInfo[playerid][pMember] == defenders) && (PlayerInfo[forplayerid][pMember] == attackers || PlayerInfo[forplayerid][pMember] == defenders) ) iswar = 1;
            }
        }
        
        if(PaintType[playerid] == PaintType[forplayerid] && PaintType[playerid] != 0 )
        {
            SetPlayerMarkerForPlayer( playerid, forplayerid, COLOR_LIGHTRED );
            SetPlayerMarkerForPlayer( forplayerid, playerid, COLOR_LIGHTRED );
        }
        else if(InEvent[playerid] == 1 && InEvent[forplayerid] == 1) {
            SetPlayerMarkerForPlayer( playerid, forplayerid, GetPlayerColor( forplayerid ) );
            SetPlayerMarkerForPlayer( forplayerid, playerid, GetPlayerColor( playerid ) );
        }
        else if(InRaceArena[playerid] == 1 && InRaceArena[forplayerid] == 1) {
            SetPlayerMarkerForPlayer( playerid, forplayerid, GetPlayerColor( forplayerid ) );
            SetPlayerMarkerForPlayer( forplayerid, playerid, GetPlayerColor( playerid ) );
        }
        else if(InGame[playerid] == 1 && InGame[forplayerid] == 1) {
            if(Team[playerid] == Team[forplayerid]) {
                if(Team[playerid] == 2) SetPlayerMarkerForPlayer( forplayerid, playerid, COLOR_LIGHTBLUE );
                else if(Team[playerid] == 1) SetPlayerMarkerForPlayer( forplayerid, playerid, COLOR_LIGHTRED );
            }    
            else {
                if(Team[playerid] == 2) SetPlayerMarkerForPlayer( forplayerid, playerid, 0x00C3FF00 );
                else if(Team[playerid] == 1) SetPlayerMarkerForPlayer( forplayerid, playerid, 0xFF634700 );        
            }
        }        
        else if(IsACop(playerid) && OnDuty[playerid] == 1 && PlayerInfo[forplayerid][pWantedLevel] != 0) {
            SetPlayerMarkerForPlayer( playerid, forplayerid, 0xe3336d00 );
        }    
        else if(iswar == 1) {
            if( (PlayerInfo[playerid][pMember] == attackers || PlayerInfo[playerid][pMember] == defenders) && (PlayerInfo[forplayerid][pMember] == attackers || PlayerInfo[forplayerid][pMember] == defenders) ) {
                SetPlayerMarkerForPlayer( playerid, forplayerid, GetPlayerColor( forplayerid ) );
                SetPlayerMarkerForPlayer( forplayerid, playerid, GetPlayerColor( playerid ) );
            }
            else {
                SetPlayerMarkerForPlayer( playerid, forplayerid, ( GetPlayerColor( forplayerid ) & 0xFFFFFF00 ) );
                SetPlayerMarkerForPlayer( forplayerid, playerid, ( GetPlayerColor( playerid ) & 0xFFFFFF00 ) );
            }
        }    
        else
        {
            SetPlayerMarkerForPlayer( playerid, forplayerid, ( GetPlayerColor( forplayerid ) & 0xFFFFFF00 ) );
            SetPlayerMarkerForPlayer( forplayerid, playerid, ( GetPlayerColor( playerid ) & 0xFFFFFF00 ) );
        }
        return 1;
    }

     

    ma gandeam sa fie ceva modificat din transparenta? 

    am modificat la ShowPlayerMarkers, am pus in loc de 2 -> sintaxa PLAYER_MARKERS_MODE_STREAMED

    still not working.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.