Jump to content

Sealand123

Membru
  • Posts

    110
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Sealand123

  1. pai acolo la new ZoneInfo[][eZone] =

     

    unele teritorii merg altele nu. vreau ca atunci cand te afli pe un zteam sa scrie ceva. Adica TEAM_PD vreau sa pun 3 si daca sunt pe unu dintre ele sa zica team pd adica if(zoneinfo[zteam]== team_pd) gamtext, nu merge ceva degenul asta? pentru ca eu vreau sa pun mai multe teritorii.

    Multumesc

  2. Am pus si undele merg si altele nu...

    cele care nu merg:

        {-1715.400,617.500,-1547.400,729.400,TEAM_PD},//sf
        {-96.400,1620.400,449.500,2154.400,TEAM_NG},//ng
        {2342.500,2500.400,2218.4000,2411.4300,TEAM_PD},//lvpd
        {835.7448,-1031.3640,625.9263,-1325.7718,TEAM_CRLR},//crl
  3. Problema intalnita (descriere): Am urmat un tutorial pentru a adauga teritorii si nu stiu cum sa fac ca atunci cand esti pe un teritoriu ex: "TEAM_BALAS" sa dea game text cu "owner balas"
    Ero(area / rile) / warning-(ul / urile): -
    Liniile de cod / sursa / script-ul:

    #define TEAM_SEVILLE 1
    #define TEAM_BALAS 2


    enum eZone
    {
      Float:zMinX,
      Float:zMinY,
      Float:zMaxX,
      Float:zMaxY,
      zTeam
    }
    new ZoneInfo[][eZone] =
    {
      {2678.4000,-1574.4000,2342.4000,-1728.4000,TEAM_SEVILLE},
      {-2595.4314,50.400,-2791.1770,-204.0329,TEAM_BALAS},
    };
    new ZoneID[sizeof(ZoneInfo)];

    stock GetTeamZoneColor(teamid)
    {
      switch(teamid)
      {
          case TEAM_SEVILLE: return 0xF7680988;//0x00FF0088;
          case TEAM_BALAS: return 0xCA04FB88;
      }
      return -1;
    }

    stock IsPlayerInZones(playerid, zoneid)
    {
      new Float:x, Float:y, Float:z;
      GetPlayerPos(playerid, x, y, z);
      return (x > ZoneInfo[zoneid][zMinX] && x < ZoneInfo[zoneid][zMaxX] && y > ZoneInfo[zoneid][zMinY] && y < ZoneInfo[zoneid][zMaxY]);
    }


    stock GetPlayerZone(playerid)
    {
      for(new i=0; i < sizeof(ZoneInfo); i++)
      {
          if(IsPlayerInZone(playerid, i))
          {
              return i;
          }
      }
      return -1;
    }
     

     

    asta este tot ce am


    Imagini / Video (optional):
    Ati incercat sa rezolvati singur?: da am incercat ceva de genu if(IsPlayerInZone(playerid, zoneid) == TEAM_BALAS)
      {
        GameTextForPlayer(playerid,"~g~Ballas!",50,4); //show text
      }

    Multumesc pentru atentie.

  4. Problema intalnita (descriere): Am urmat un tutorial pentru a adauga teritorii si nu stiu cum sa fac ca atunci cand esti pe un teritoriu ex: "TEAM_BALAS" sa dea game text cu "owner balas"
    Ero(area / rile) / warning-(ul / urile): -
    Liniile de cod / sursa / script-ul:

     

    #define TEAM_SEVILLE 1
    #define TEAM_BALAS 2


    enum eZone
    {
        Float:zMinX,
        Float:zMinY,
        Float:zMaxX,
        Float:zMaxY,
        zTeam
    }
    new ZoneInfo[][eZone] =
    {
        {2678.4000,-1574.4000,2342.4000,-1728.4000,TEAM_SEVILLE},
        {-2595.4314,50.400,-2791.1770,-204.0329,TEAM_BALAS},
    };
    new ZoneID[sizeof(ZoneInfo)];

    stock GetTeamZoneColor(teamid)
    {
        switch(teamid)
        {
            case TEAM_SEVILLE: return 0xF7680988;//0x00FF0088;
            case TEAM_BALAS: return 0xCA04FB88;
        }
        return -1;
    }

    stock IsPlayerInZones(playerid, zoneid)
    {
        new Float:x, Float:y, Float:z;
        GetPlayerPos(playerid, x, y, z);
        return (x > ZoneInfo[zoneid][zMinX] && x < ZoneInfo[zoneid][zMaxX] && y > ZoneInfo[zoneid][zMinY] && y < ZoneInfo[zoneid][zMaxY]);
    }


    stock GetPlayerZone(playerid)
    {
        for(new i=0; i < sizeof(ZoneInfo); i++)
        {
            if(IsPlayerInZone(playerid, i))
            {
                return i;
            }
        }
        return -1;
    }
     

     

     

    asta este tot ce am


    Imagini / Video (optional):
    Ati incercat sa rezolvati singur?: da am incercat ceva de genu

    if(IsPlayerInZone(playerid, zoneid) == TEAM_BALAS)
        {
            GameTextForPlayer(playerid,"~g~Ballas!",50,4); //show text
        }

    Multumesc pentru atentie.

  5. Tot nu merge

    public OnPlayerCommandText(playerid, cmdtext[])
    {
    //    dcmd(xgoto, 5, cmdtext);
      //  dcmd(gpsfind, 7, cmdtext);
    //  dcmd(getips,6,cmdtext);
      //dcmd(unattach,8,cmdtext);
    //    dcmd(acheckcode,10,cmdtext);
    //    dcmd(alias,5,cmdtext);
    //    dcmd(ips,3,cmdtext);
    //  dcmd(attach,6,cmdtext);

    //    dcmd(getaliases,10,cmdtext);
    //    dcmd(unban,5,cmdtext);
    //    dcmd(saveeverything,14,cmdtext);
        new string[512 char];

     

  6. nu am decat strcmd

     

    am cautat ctrl F  "#include"

    si asta e tot

    #include <a_samp>
    #include <core>
    #include <float>
    #include <time>
    #include <file>
    #include <utils>
    #include <morphinc>
    #include <a_npc>
    #include <streamer>
    #include <Dini>
    #include <dutils>

     

    si mai sunt niste chestii paramas

    #define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
    dcmd_ips(playerid,params[])
    {
        if(PlayerInfo[playerid][pAdmin] >= 1 || IsPlayerAdmin(playerid))
        {
            if(!strlen(params))
                return SendClientMessage(playerid, COLOR_GREY, "USAGE: /ips [playerid]");
    
            new player1, playername[MAX_PLAYER_NAME], str[128];
            player1 = strval(params);
    
            if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID)
            {
                GetPlayerName(player1, playername, sizeof(playername));
                format(str,sizeof(str),"IPs Used for %s (%d) are: %s", playername, player1, dini_Get("LARP/Users/Aliases/ips.txt",playername) );
                return SendClientMessage(playerid,COLOR_GREY,str);
            }
            else return SendClientMessage(playerid, COLOR_GREY, "* Player is not connected or is yourself");
        }
        else return SendClientMessage(playerid,COLOR_GREY,"* ERROR: You are not a high enough level to use this command");
    }
    

    dar nu stiu de ce sunt

     

    Am pus la toate acea stea si bara " /*  */ " si tot asa face

  7. Problema intalnita (descriere): Salut, nu merg comenzile la trucker cand dau /loadprod, /sellprods si /buyprods zice unknown command si nu se intampla nimic altceva desi sunt in masina de trucker si am jobul de trucker.
    Ero(area / rile) / warning-(ul / urile): -
    Liniile de cod / sursa / script-ul:

    if(strcmp(cmd, "/loadprod", true) == 0)
        {
            if(IsPlayerConnected(playerid))
            {
                new tmpcar = GetPlayerVehicleID(playerid);
                if(!IsATruck(tmpcar))
                {
                    GameTextForPlayer(playerid, "~r~You are not in a delivery truck", 5000, 1);
                    return 1;
                }
                else
                {
                    format(string, sizeof(string), "Products: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
                    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                }
            }
            return 1;
        }
    
        if(strcmp(cmd, "/buyprods", true) == 0)
        {
            if(IsPlayerConnected(playerid))
            {
                new tmpcar = GetPlayerVehicleID(playerid);
                new compcost = 20;
                if(IsPlayerInRangeOfPoint(playerid, 70, 2468.4919,-2092.9902,13.5469))
                {
                    if(IsATruck(tmpcar))
                    {
                        if(PlayerHaul[tmpcar][pLoad] < PlayerHaul[tmpcar][pCapasity])
                        {
                            new amount;
                            tmp = strtok(cmdtext, idx);
                            if(!strlen(tmp))
                            {
                                SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /buyprods [amount]");
                                return 1;
                            }
                            amount = strval(tmp);
                            if(amount < 1 || amount > 500) { SendClientMessage(playerid, COLOR_GREY, "   Can't buy less then 1 Product or more then 500!"); return 1; }
                            new check= PlayerHaul[tmpcar][pLoad] + amount;
                            if(check > PlayerHaul[tmpcar][pCapasity])
                            {
                                format(string, sizeof(string), "   You went over the Truck Products Carry Limit of %d, you currently carry %d.",PlayerHaul[tmpcar][pCapasity],PlayerHaul[tmpcar][pLoad]);
                                SendClientMessage(playerid, COLOR_GREY, string);
                                return 1;
                            }
                            new cost = amount*compcost;
                            if(GetPlayerMoney(playerid) >= cost)
                            {
                                PlayerHaul[tmpcar][pLoad] += amount;
                                format(string, sizeof(string), "Products: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
                                SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                                format(string, sizeof(string), "You bought %d Products for $%d.", amount,cost);
                                SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                                SafeGivePlayerMoney(playerid,-cost);
                                PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                                return 1;
                            }
                            else
                            {
                                format(string, sizeof(string), "You cant afford %d Products at $%d!", amount,cost);
                                SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                                return 1;
                            }
                        }
                        else
                        {
                                format(string, sizeof(string), "Products: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
                                SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                                return 1;
                        }
                    }
                    else
                    {
                        SendClientMessage(playerid, TEAM_GROVE_COLOR, "This Vehicle does not deliver Products.");
                        return 1;
                    }
                }
                else
                {
                    SendClientMessage(playerid, COLOR_GREY, "You are not in trucker place.");
                    return 1;
                }
            }
            return 1;
        }
    
        if(strcmp(cmd, "/sellprods", true) == 0)
        {
            new cashmade;
            new tmpcar;
            if(IsPlayerConnected(playerid))
            {
                tmpcar = GetPlayerVehicleID(playerid);
                if(!IsATruck(tmpcar))
                {
                    GameTextForPlayer(playerid, "~r~You are not in a delivery truck", 5000, 1);
                    return 1;
                }
                if(PlayerHaul[tmpcar][pLoad] == 0)
                {
                    GameTextForPlayer(playerid, "~r~Truck is empty, return to the stock house", 5000, 1);
                    format(string, sizeof(string), "Products: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
                    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                    return 1;
                }
                for(new i = 0; i < sizeof(BizzInfo); i++)
                {
                    if (IsPlayerInRangeOfPoint(playerid, 10,BizzInfo[bEntranceX], BizzInfo[bEntranceY], BizzInfo[bEntranceZ]))
                    {
                        //printf("Found House :%d",i);
                        for(new l = PlayerHaul[tmpcar][pLoad]; l > 0; l--)
                        {
                            if(BizzInfo[bProducts] == BizzInfo[bMaxProducts])
                            {
                                GameTextForPlayer(playerid, "~r~Our stores are full", 5000, 1);
                                format(string, sizeof(string), "Cash Earned $%d.", cashmade);
                                SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                                format(string, sizeof(string), "Products: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
                                SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                                PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                                return 1;
                            }
                            if(BizzInfo[bPriceProd] > BizzInfo[bTill])
                            {
                                GameTextForPlayer(playerid, "~r~We Cant Afford The Deal", 5000, 1);
                                format(string, sizeof(string), "Cash Earned $%d.", cashmade);
                                SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                                format(string, sizeof(string), "Products: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
                                SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                                PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                                return 1;
                            }
                            PlayerHaul[tmpcar][pLoad]--;
                            BizzInfo[bProducts]++;
                            cashmade = cashmade+BizzInfo[bPriceProd];
                            //ConsumingMoney[playerid] = 1;
                            SafeGivePlayerMoney(playerid,BizzInfo[bPriceProd]);
                            BizzInfo[bTill] -= BizzInfo[bPriceProd];
                            if(PlayerHaul[tmpcar][pLoad] == 0)
                            {
                                GameTextForPlayer(playerid, "~r~Truck is empty, return to the stock house", 5000, 1);
                                format(string, sizeof(string), "Cash Earned $%d.", cashmade);
                                SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                                format(string, sizeof(string), "Products: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
                                SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                                PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                                return 1;
                            }
                        }
                        OnPropUpdate(3,i);
                        return 1;
                    }
                }
            }
            for(new i = 0; i < sizeof(SBizzInfo); i++)
            {
                if (IsPlayerInRangeOfPoint(playerid, 10,SBizzInfo[sbEntranceX], SBizzInfo[sbEntranceY], SBizzInfo[sbEntranceZ]))
                {
                    //printf("Found House :%d",i);
                    for(new l = PlayerHaul[tmpcar][pLoad]; l > 0; l--)
                    {
                        if(SBizzInfo[sbProducts] == SBizzInfo[sbMaxProducts])
                        {
                            GameTextForPlayer(playerid, "~r~Our stores are full", 5000, 1);
                            format(string, sizeof(string), "Cash Earned $%d.", cashmade);
                            SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                            format(string, sizeof(string), "Products: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
                            SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                            return 1;
                        }
                        if(SBizzInfo[sbPriceProd] > SBizzInfo[sbTill])
                        {
                            GameTextForPlayer(playerid, "~r~We Cant Afford The Deal", 5000, 1);
                            format(string, sizeof(string), "Cash Earned $%d.", cashmade);
                            SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                            format(string, sizeof(string), "Products: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
                            SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                            return 1;
                        }
                        PlayerHaul[tmpcar][pLoad]--;
                        SBizzInfo[sbProducts]++;
                        cashmade = cashmade+SBizzInfo[sbPriceProd];
                        //ConsumingMoney[playerid] = 1;
                        SafeGivePlayerMoney(playerid,SBizzInfo[sbPriceProd]);
                        SBizzInfo[sbTill] -= SBizzInfo[sbPriceProd];
                        if(PlayerHaul[tmpcar][pLoad] == 0)
                        {
                            GameTextForPlayer(playerid, "~r~Truck is empty, return to the stock house", 5000, 1);
                            format(string, sizeof(string), "Cash Earned $%d.", cashmade);
                            SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                            format(string, sizeof(string), "Products: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
                            SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                            return 1;
                        }
                    }
                    OnPropUpdate(3,i);
                    return 1;
                }
            }
            GameTextForPlayer(playerid, "~r~To Far From A Business", 5000, 1);
            return 1;
        }

    Imagini / Video (optional):-
    Ati incercat sa rezolvati singur?: la /loadprods nu era asa si am modificat cum se vede sus dar tot nu merge

    
        if(strcmp(cmd, "/loadprod", true) == 0)
        {
            if(IsPlayerConnected(playerid))
            {
                new tmpcar = GetPlayerVehicleID(playerid);
                if(!IsATruck(tmpcar))
                {
                    GameTextForPlayer(playerid, "~r~You are not in a delivery truck", 5000, 1);
                    return 1;
                }
                 format(string, sizeof(string), "Products: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
                SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
            }
            return 1;
        }
  8. if(strcmp(cmd, "/removegirofar", true) == 0)
      {
        if(IsPlayerConnected(playerid))
        {
          
    girofar = 0;
    girofar2 = 0;
    DestroyObject(girofar);
    DestroyObject(girofar2);
          SendClientMessage(playerid, COLOR_GRAD2, "** Ai demontat girofarul!");
          return 1;
        
        }
        return 1;
      }

    salut nu merge se pune girofaul dar la fel zice ai demontat girofarul dar este inca acolo...

     

     

     

        new girofar2 = CreateObject(18646, 0.00210, -0.16660, 0.67680,   0.00000, 0.00000, 0.00000);

        if(strcmp(cmd, "/girofar2", true) == 0)

        {

            if(IsPlayerConnected(playerid))

            {

                new tmpcar = GetPlayerVehicleID(playerid);

                {

                    if(IsAnFbiCar(tmpcar))

                    {

                        if(PlayerInfo[playerid][pDuty] == 0)

                        {

                            SendClientMessage(playerid, COLOR_GREY, "* Nu esti On duty");

                            return 1;

                        }

                        if(PlayerInfo[playerid][pMember] == 2||PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 17||PlayerInfo[playerid][pLeader] == 17)

                            {

                            if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 411)

                            {

                                new vehicleid = GetPlayerVehicleID(playerid);

                                AttachObjectToVehicle(girofar2, vehicleid, -0.2979,  -0.16660, 0.68280, 0.0, 0.0, 0.0);

                            }

                        }

                    }

                }

            }

            return 1;

        }

        if(strcmp(cmd, "/removegirofar", true) == 0)

        {

            if(IsPlayerConnected(playerid))

            {

            //    girofar = 0;

                girofar2 = 0;

            //    DestroyObject(girofar);

                DestroyObject(girofar2);

                  SendClientMessage(playerid, COLOR_GRAD2, "** Ai demontat girofarul!");

                return 1;

            }

            return 1;

        }

     

  9. Problemă întâlnită (descriere):Salut, am aceasta comanda care pune girofar pe masinili de fbi doar daca e limuzina sau infernusul si esti fbi,

    Scriu /girofar se pune girofarul dar cand scriu /removegirofar de ce nu se sterge?

    Ero(area / rile) / warning-(ul / urile): 0
    Liniile de cod / sursa / script-ul:if(strcmp(cmd, "/girofar", true) == 0)
        {
            if(IsPlayerConnected(playerid))
            {
                new tmpcar = GetPlayerVehicleID(playerid);
                {
                    if(IsAnFbiCar(tmpcar))
                    {
                        if(PlayerInfo[playerid][pMember] == 2||PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 17||PlayerInfo[playerid][pLeader] == 17)
                        {
                            if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 411)
                            {
                                new girofar2 = CreateObject(18646, 0.00210, -0.16660, 0.67680,   0.00000, 0.00000, 0.00000);
                                new vehicleid = GetPlayerVehicleID(playerid);
                                AttachObjectToVehicle(girofar2, vehicleid, 0.00210,  -0.16660, 0.67680, 0.0, 0.0, 0.0);
                            }
                             if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 409)
                            {
                                new girofar2 = CreateObject(18646, 0.00210, -0.16660, 0.67680,   0.00000, 0.00000, 0.00000);
                                new vehicleid = GetPlayerVehicleID(playerid);
                                AttachObjectToVehicle(girofar2, vehicleid, 0.00210, -0.16660, 0.79680,   0.00000, 0.00000, 0.00000);
                            }
                        }
                    }
                }
            }
            return 1;
        }
        if(strcmp(cmd, "/removegirofar", true) == 0)
        {
            if(IsPlayerConnected(playerid))
            {
                new girofar = CreateObject(19419, 0.00210, -0.16660, 0.67680,   0.00000, 0.00000, 0.00000);
                new girofar2 = CreateObject(18646, 0.00210, -0.16660, 0.67680,   0.00000, 0.00000, 0.00000);
                DestroyObject(girofar);
                DestroyObject(girofar2);
                SendClientMessage(playerid, COLOR_GRAD2, "** Ai demontat girofarul!");
                return 1;
            
            }
            return 1;
        }

    Imagini / Video (optional):
    Aţi încercat să rezolvaţi singur?:da....

     

     

     

  10. Problemă întâlnită (descriere):Cum fac ca o masina de job sa fie luata doar de playerii care au jobul respectiv sau cum fac ca o poarta sa fie deschisa doar de proprietar?
    Ero(area / rile) / warning-(ul / urile):nu cred ca e nevoie
    Liniile de cod / sursa / script-ul:nu cred ca e nevoie
    Imagini / Video (optional):
    Aţi încercat să rezolvaţi singur?:da....

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