Jump to content

Alberto.

Membru
  • Posts

    153
  • Joined

  • Last visited

  • Days Won

    5

Posts posted by Alberto.

  1. nu cred ca se refera la o comanda anume, cred ca vrea sa ii apara "unknown command" cand comanda nu exista. 

    Daca la asta te referi, mergi la linia OnPlayerCommandText si la ultimul return, inloc de return 1/0 sau ce ai tu pui asa: 

    return SendClientMessage(playerid, -1, "SERVER: Unknown command");

  2. poftim: 

    if(strcmp(cmd, "/gethere", true) == 0)
        {
            if(IsPlayerConnected(playerid))
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                    SendUsage(playerid,"/gethere [playerid/PartOfName]");
                    return 1;
                }
                new Float:plocx,Float:plocy,Float:plocz;
                new plo;
                plo = ReturnUser(tmp);
                if (IsPlayerConnected(plo))
                {
                    if(plo != INVALID_PLAYER_ID)
                    {
                        if (PlayerData[playerid][pAdmin] >= 1 || PlayerData[playerid][pAgent] >= 1)
                        {
                            GetPlayerPos(playerid, plocx, plocy, plocz);
                            SetPlayerInterior(plo,GetPlayerInterior(playerid));
                            PlayerData[plo][pInt] = GetPlayerInterior(playerid);
                            PlayerData[plo][pLocal] = PlayerData[playerid][pLocal];
                            if(PlayerData[playerid][pInt] == 0)
                            {
                                SetPlayerInterior(plo,0);
                            }
                            if(plocz > 930.0 && PlayerData[playerid][pInt] == 0)
                            {
                                SetPlayerInterior(plo,1);
                                PlayerData[plo][pInt] = 1;
                            }
                            if (GetPlayerState(plo) == 2)
                            {
                                new tmpcar = GetPlayerVehicleID(plo);
                                SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
                            }
                            else
                            {
                                SetPlayerPos(plo,plocx,plocy+2, plocz);
                            }
                            SendClientMessage(plo, COLOR_LIGHTGREEN, "Ai fost teleportat cu succes!");
                            foreach(Player, i)
                            {
                                if(PlayerData[pAdmin] >= 1)
                                {
                                    GetPlayerName(playerid, sendername, sizeof(sendername));
                                    GetPlayerName(plo, giveplayer,sizeof(giveplayer));
                                    format(string, sizeof(string), "{C8D4D4}Adm{DB8E12}Warning:{FFFFFF} Admin %s l-a teleportat pe %s.", sendername,giveplayer);
                                    SendClientMessage(i, COLOR_LIGHTRED, string);
                                }
                            }
                        }
                        else
                        {
                            SendError(playerid,cmd);
                        }
                      
                      }
                }
                else
                {
                    format(string, sizeof(string), "%d nu este conectat.", plo);
                    SendClientMessage(playerid, COLOR_GRAD1, string);
                }
            
         }
            return 1;
        }

  3. Acum 3 minute, AlexanderSMG a spus:

    if(strcmp(cmd, "/goto", true) == 0)
        {
            if(IsPlayerConnected(playerid))
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                    SendClientMessage(playerid, COLOR_GRAD2, "{00FF00}Folosire:{FFFFFF} /goto [playerid/numejucator]");
                    return 1;
                }
                new Float:plocx,Float:plocy,Float:plocz;
                new plo;
                plo = ReturnUser(tmp);
                if (IsPlayerConnected(plo))
                {
                 if(plo != INVALID_PLAYER_ID)
                {
                    if(Goto[plo] == 1)
                    {
                        if (PlayerData[playerid][pAdmin] >= 1 || PlayerData[playerid][pAgent] >= 1)
                        {
                            if(Spectate[playerid] != 255)
                            {
                                Spectate[playerid] = 256;
                            }
                            GetPlayerPos(plo, plocx, plocy, plocz);
                            if(PlayerData[plo][pInt] > 0)
                            {
                                SetPlayerInterior(playerid,PlayerData[plo][pInt]);
                                PlayerData[playerid][pInt] = PlayerData[plo][pInt];
                                PlayerData[playerid][pLocal] = PlayerData[plo][pLocal];
                            }
                            if(PlayerData[playerid][pInt] == 0)
                            {
                                SetPlayerInterior(playerid,0);
                            }
                            if(plocz > 530.0 && PlayerData[plo][pInt] == 0) //the highest land point in sa = 526.8
                            {
                                SetPlayerInterior(playerid,1);
                                PlayerData[playerid][pInt] = 1;
                            }
                            if (GetPlayerState(playerid) == 2)
                            {
                                new tmpcar = GetPlayerVehicleID(playerid);
                                SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
                            }
                            else
                            {
                                SetPlayerPos(playerid,plocx,plocy+2, plocz);
                            }
                            SendClientMessage(playerid, COLOR_GRAD1, "   Ai fost teleportat");
                            SetPlayerInterior(playerid, GetPlayerInterior(plo));
                            //Goto[plo] = 0;
                            SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(plo));
                        }
                        else
                        {
                            SendClientMessage(playerid, COLOR_GRAD1, "   Nu ai rangul administrativ necesar!");
                        }
                    }
                    else
                    {
                    SendClientMessage(playerid, COLOR_GRAD1, "[Anti-Abuz] Acel player nu dat ajutor sau report ");
                    }
                }
                else
                {
                    format(string, sizeof(string), "   %d nu este conectat.", plo);
                    SendClientMessage(playerid, COLOR_GRAD1, string);
                }
                }
            }
            return 1;
        }

     

    Pot da goto doar daca playerul da /report,cum pot rezolva??

    modifica cu scriptul asta:

    if(strcmp(cmd, "/goto", true) == 0)
        {
            if(IsPlayerConnected(playerid))
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                    SendClientMessage(playerid, COLOR_GRAD2, "{00FF00}Folosire:{FFFFFF} /goto [playerid/numejucator]");
                    return 1;
                }
                new Float:plocx,Float:plocy,Float:plocz;
                new plo;
                plo = ReturnUser(tmp);
                if (IsPlayerConnected(plo))
                {
                 if(plo != INVALID_PLAYER_ID)
                {
                        if (PlayerData[playerid][pAdmin] >= 1 || PlayerData[playerid][pAgent] >= 1)
                        {
                            if(Spectate[playerid] != 255)
                            {
                                Spectate[playerid] = 256;
                            }
                            GetPlayerPos(plo, plocx, plocy, plocz);
                            if(PlayerData[plo][pInt] > 0)
                            {
                                SetPlayerInterior(playerid,PlayerData[plo][pInt]);
                                PlayerData[playerid][pInt] = PlayerData[plo][pInt];
                                PlayerData[playerid][pLocal] = PlayerData[plo][pLocal];
                            }
                            if(PlayerData[playerid][pInt] == 0)
                            {
                                SetPlayerInterior(playerid,0);
                            }
                            if(plocz > 530.0 && PlayerData[plo][pInt] == 0) //the highest land point in sa = 526.8
                            {
                                SetPlayerInterior(playerid,1);
                                PlayerData[playerid][pInt] = 1;
                            }
                            if (GetPlayerState(playerid) == 2)
                            {
                                new tmpcar = GetPlayerVehicleID(playerid);
                                SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
                            }
                            else
                            {
                                SetPlayerPos(playerid,plocx,plocy+2, plocz);
                            }
                            SendClientMessage(playerid, COLOR_GRAD1, "   Ai fost teleportat");
                            SetPlayerInterior(playerid, GetPlayerInterior(plo));
                            //Goto[plo] = 0;
                            SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(plo));
                        }
                        else
                        {
                            SendClientMessage(playerid, COLOR_GRAD1, "   Nu ai rangul administrativ necesar!");
                        }
                 }           

               else
                {
                    format(string, sizeof(string), "   %d nu este conectat.", plo);
                    SendClientMessage(playerid, COLOR_GRAD1, string);
                }
                }
            }
            return 1;
        }

  4. Cauti parteneriat sau vrei servicii contra cost? In caz vrei servicii contra cost, puneti si cat sunteti dispusi sa platiti si ce cereti. Daca cautati parteneriat, cum se numeste comunitatea? ce planuri aveti pentru a o face si a o mentine? de unde stiti ca veti avea succes? Mai multe detalii daca se poate.

  5. Te ajut eu cu viata. Uite ce trebuie sa faci:

    1. Definesti o variabila "ArataViata" si o initializezi cu 0;

    2. Creezi un textdraw numeric pus pe bara aia rosie / linia vietii;

    3. Faci un string care sa ii "ia viata" playerului;

    4. Faci o comanda gen /showhealth in cara variabila "ArataViata" = 1 si sa arate     textdraw-ul playerului. 

    E putin mai complicat, dar o sa te descurci.

  6. Poftim:

    CMD:gotols(playerid, params[])
    {
        if(playerVariables[playerid][pAdminLevel] >= 1 || playerVariables[playerid][pHelper] >= 2)
        {

            new vehicleid = GetPlayerVehicle(playerid);
            SetPlayerPos(playerid, 1529.1075,-1660.6410,13.3828);   

            SetVechilePos(vehicleid, 1529.1075,-1660.6410,13.3828);

            PutPlayerInVehicle(playerid, vehicleid, 1);
            SetPlayerInterior(playerid, 0);
            SetPlayerVirtualWorld(playerid, 0);
        }
        return 1;
    }

  7. sterge aia cu listitem == x si fa asa

                            new string1[MAX_STRING],string2[MAX_STRING],string3[MAX_STRING],string4[MAX_STRING],string5[MAX_STRING],string6[MAX_STRING],string7[MAX_STRING],string8[MAX_STRING],stringy[MAX_STRING];

    if(response)

    {

    if(listitem)

    {

    case 0:  ShowPlayerDialog(playerid, DIALOG_HELP2, DIALOG_STYLE_MSGBOX, "SERVER: Account Commands", "/stats /buylevel /changepass","Back","Exit");

    case 1: 

    format(string1, sizeof(string1), "*** Other *** /cellphonehelp /househelp /renthelp /businesshelp /wthelp /vhelp  /leaderhelp /eventhelp /clanhelp");

     ShowPlayerDialog(playerid, DIALOG_HELP2, DIALOG_STYLE_MSGBOX, "SERVER: Other Commands", stringy,"Back","Exit");

    case 2:   

    1.                             format(string1, sizeof(string1), "*** GENERAL *** /admins /helpers /report /helpme /accept /cancel /pay /hqs /charity /givekey /switchkey /shop");
    2.                                 format(string2, sizeof(string2), "*** GENERAL *** /showlicenses /contract /spawnchange /animlist /gps /achievements /findbiz /findhouse");
    3.                             format(string3, sizeof(string3), "*** GENERAL *** /wars /top /topclans /turfs");
    4.                             format(stringy, sizeof(stringy), "%s\n%s\n%s", string1, string2, string3);

    ShowPlayerDialog(playerid, DIALOG_HELP2, DIALOG_STYLE_MSGBOX, "SERVER: General Commands", stringy,"Back","Exit");

    si tot asa

     

  8. nu mai bagati baiatul in ceata. Uite cum sta treaba cu panelul:

    1.Instalezi xampp.

    2. Pornesti primele 3 de la xampp.

    3. Mergi unde ai instalat xampp, la folderul htdocs si copiezi acolo panelul pe care il ai.

    4. Intri in gm si cauti  linia "SQL_HOST", se afla prin #define-uri

    5. Te asiguri ca ai asa:

    #define SQL_HOST "localhost"
    #define SQL_USER "root"
    #define SQL_PASS ""
    #define SQL_DB "numele bazei tale de date"

    Daca nu ai, inlocuiesti si compilezi.

    6. Intri in browser si scrii localhost

    Asta e tot ce trebuie sa faci, bafta.

     

    • Upvote 1
  9. La dialog ai 2 butoane, in cazul tau "Select" si "Cancel"

    Primul buton, in cazul tau "select" reprezinta cand respectivul raspunde la dialog (response)

    Al doilea buton, in cazul tau "Cancel" reprezinta cand respectivul nu raspunde la dialog (!response)

    Dialogul se inchide la orice buton ai selecta, totul depinde doar de ce il pui sa faca daca playerul raspunde sau nu raspunde la dialog.

×
×
  • 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.