Jump to content

XpLoD

Membru
  • Posts

    536
  • Joined

  • Last visited

Posts posted by XpLoD

  1. Uite cum arata o masina --> http://wiki.sa-mp.com/wiki/AddStaticVehicle

    Uite culoriile --> Carcolors.jpg

    Iar la NRG pur si simplu pui tu ce culori vrei cand se creaza (NRG-ul).

    Dati Topic Closed.

  2. RuNix" post="73344" timestamp="1305976800"]

    2.Probabil tu folosesti SendClientMessageToAll ... foloseste SendPlayerMessageToAll

    3.Crezi ca serverul are minte artificiala ? punei tu la /buy , /sell sa ii seteze alt string la casa ...

    mai departe nu mai raspund ca vrei sa copiezi rss  :undecided:

    2. asta folosesc

    3. :-?

    /stats nu seamana cu srv tau;p in niciun caz:D

    iar faza cu zona am nevoie ca vreau sa fac cva:) unde sa'ti cumperi bautura.. gen Bar:D dar nu vreau cu pickup ci cu o zona.. dar nuj cum se face.

  3. RuNix" post="73347" timestamp="1305977380"]

    xplod nu ai vrea tu sa ne zici cum creezi aceste text-uri 3d ?

    folosesti un streamer sau simplu Create3Dtextlabel ?

    daca folosesti un streamer e si logic de ce nu iti merge Update3Dtextlabel

    iar tu stuntman ce naiba zici acolo  :huh: dai /buy la casa si le schimba text-ul la toate =)) ?

    Asta am in ladmin ce are legatura cu 3DText

    AddHouse(houseid, Float:iconX, Float:iconY, Float:iconZ, Float:interiorX, Float:interiorY, Float:interiorZ, Costa, Sella, Interiora, virtualworld)
    {
            new house[256];
            format(house, sizeof(house), "Houses/houseid%d",houseid);
            if(!dini_Exists(house))
            {
            dini_Create(house);
            format(hInfo[houseid][Name], 24, "ForSale");
            dini_Set(house, "Name", "ForSale");
            format(hInfo[houseid][Renter], 24, "ForRent");
            dini_Set(house, "Renter", "ForRent");
            hInfo[houseid][Rentable] = 0;
            dini_IntSet(house, "Rentable", 0);
            hInfo[houseid][Rentcost] = 0;
            dini_IntSet(house, "Rentcost", 0);
            hInfo[houseid][Cost] = Costa;
            dini_IntSet(house, "Cost", Costa);
            hInfo[houseid][Sell] = Sella;
            dini_IntSet(house, "Sell", Sella);
            hInfo[houseid][Interior2] = Interiora;
            dini_IntSet(house, "Interior", Interiora);
            dini_IntSet(house, "Virtualworld", virtualworld);
            hInfo[houseid][Virtualworld] = virtualworld;
            hInfo[houseid][Locked] = 1;
            dini_IntSet(house, "Locked", 1);
            hInfo[houseid][Interior2X] = interiorX;
            hInfo[houseid][Interior2Y] = interiorY;
            hInfo[houseid][Interior2Z] = interiorZ;
            dini_FloatSet(house, "X", interiorX);
            dini_FloatSet(house, "Y", interiorY);
            dini_FloatSet(house, "Z", interiorZ);
            dini_IntSet(house, "RentPay", 0);
            dini_IntSet(house, "RentGet", 0);
            print("-");
            print("--------------House Created--------------");
            printf("- Houseid: %d", houseid);
            printf("- Buy Cost: %d", Costa);
            printf("- Sell Cost: %d", Sella);
            printf("- Interior: %d", Interiora);
            printf("- VirtualWorld: %d", virtualworld);
            print("-----------------------------------------");
            print("-");
            }
            else
            {
            format(hInfo[houseid][Name], 24, dini_Get(house, "Name"));
            format(hInfo[houseid][Renter], 24, dini_Get(house, "Renter"));
            hInfo[houseid][Rentable] = dini_Int(house, "Rentable");
            hInfo[houseid][Rentcost] = dini_Int(house, "Rentcost");
            hInfo[houseid][Cost] = dini_Int(house, "Cost");
            hInfo[houseid][Sell] = dini_Int(house, "Sell");
            hInfo[houseid][Interior2] = dini_Int(house, "Interior");
            hInfo[houseid][Locked] = dini_Int(house, "Locked");
            hInfo[houseid][Interior2X] = dini_Float(house, "X");
            hInfo[houseid][Interior2Y] = dini_Float(house, "Y");
            hInfo[houseid][Interior2Z] = dini_Float(house, "Z");
            hInfo[houseid][Virtualworld] = dini_Int(house, "Virtualworld");
            }
            hInfo[houseid][iconx]=iconX;
            hInfo[houseid][icony]=iconY;
            hInfo[houseid][iconz]=iconZ;
            format(house, sizeof(house), "Houses/houseid%d",houseid);
            if(strcmp(hInfo[houseid][Name],"ForSale",true)==0)
            {
            HousePickup[houseid] = CreatePickup(19135, 23, iconX, iconY, iconZ);//not bought
            }
            else
            {
            HousePickup[houseid] = CreatePickup(19135,23, iconX, iconY, iconZ);//bought
            }
            new string[256];
    		format(string, 256, "Proprietar: {FFAF00}%s\n{FFFFFF}Cost:  {00C0FF}%i", hInfo[houseid][Name],hInfo[houseid][Cost]);
       	 	hInfo[houseid][house3d] = CreateDynamic3DTextLabel(string,0xFFFFFFFF,iconX, iconY, iconZ,250.0);
    }
    BUY & SELL
    dcmd_sell(playerid, params[])
    {
            if(PlayerInfo[playerid][LoggedIn] == 0) return SendClientMessage(playerid,red,"ERROR: You must be logged in to use this commands");
    
    	    #pragma unused params
            new str[255],str1[256],pname[24],housenumber;
            housenumber = GetHouseID(playerid);
            GetPlayerName(playerid, pname, 24);
            format(str1, sizeof(str1), "Houses/houseid%d", housenumber);
            if (strcmp(hInfo[housenumber][Name],pname,false || IsPlayerAdmin(playerid))) return SendClientMessage(playerid, c_r, "This house is not yours!");
            SendClientMessage(playerid, c_y, "You sold the house!");
            format(str, sizeof(str), "%s He left home with id %d",pname,housenumber);
            print(str);
            GivePlayerMoney(playerid, hInfo[housenumber][Sell]);
            dini_Set(str1, "Name", "ForSale");
            hInfo[housenumber][Locked] = dini_IntSet(str1,"Locked",1);
            format(hInfo[housenumber][Name],255,"ForSale");
            format(str1, sizeof(str1), "Houses/Users/%s", udb_encode(pname));
            if (!dini_Exists(str1)) dini_Create(str1);
            dini_IntSet(str1, "Houseid", -255);
    
    	    format(str1, 256, "Proprietar: {FFAF00}For Sale\n{FFFFFF}Cost:  {00C0FF}%i", hInfo[housenumber][Cost]);
    	    Update3DTextLabelText(hInfo[housenumber][house3d],0xFFFFFFFF,str1);
    	    
    		DestroyPickup(HousePickup[housenumber]);
            HousePickup[housenumber] = CreatePickup(19135, 23, hInfo[housenumber][iconx], hInfo[housenumber][icony], hInfo[housenumber][iconz]);
            RemovePlayerMapIcon(playerid, housemapicon[playerid]);
            return 1;
    }
    
    dcmd_buy(playerid, params[])
    {
            #pragma unused params
            new str[255],str1[255],pname[24], housenumber;
            housenumber = GetHouseID(playerid);
            if(housenumber == -1) return SendClientMessage(playerid, c_r, "There are not house icon!");
    
            GetPlayerName(playerid, pname, 24);
            format(str1, sizeof(str1), "Houses/Users/%s", udb_encode(pname));
            if(dini_Exists(str1))
            {
            if (dini_Int(str1, "Houseid")!=-255) return SendClientMessage(playerid, c_r, "You have a house! /sell to let old house!");
            }
            format(str1, sizeof(str1), "Houses/houseid%d", housenumber);
            if (strcmp(hInfo[housenumber][Name],"ForSale",true)) return SendClientMessage(playerid, c_r, "This house is already bought!");
            if(GetPlayerScore(playerid)<hInfo[housenumber][Cost]) return SendClientMessage(playerid, c_r, "Do not have enough Score!");
            SendClientMessage(playerid, c_y, "You bought this house!");
            format(str, sizeof(str), "%s bought the house with id 0",pname);
            print(str);
            SetPlayerScore(playerid,GetPlayerScore(playerid)-hInfo[housenumber][Cost]);
            dini_Set(str1, "Name", pname);
            hInfo[housenumber][Name]=pname;
            hInfo[housenumber][Locked] = dini_IntSet(str1,"Incuiat",0);
    
            format(str1, sizeof(str1), "Houses/Users/%s", udb_encode(pname));
            if (!dini_Exists(str1)) dini_Create(str1);
            new Float:sy, Float:sx, Float:sz;
            dini_IntSet(str1, "Houseid", housenumber);
            if(!dini_Isset(str1,"Rentid"))
            {
            dini_IntSet(str1, "Rentid", -255);
            }
            GetPlayerPos(playerid, sx,sy,sz);
            dini_FloatSet(str1, "SpawnX", sx);
            dini_FloatSet(str1, "SpawnY", sy);
            dini_FloatSet(str1, "SpawnZ", sz);
            dini_IntSet(str1, "SpawnInt", GetPlayerInterior(playerid));
            new string[ 256 ];
    		format(string, 256, "Proprietar: {FFAF00}%s\n{FFFFFF}Cost:  {00C0FF}%i", hInfo[housenumber][Name],hInfo[housenumber][Cost]);
    	   	Update3DTextLabelText(hInfo[housenumber][house3d],0xFFFFFFFF,string);
            DestroyPickup(HousePickup[housenumber]);
    		HousePickup[housenumber] = CreatePickup(19135, 23, hInfo[housenumber][iconx], hInfo[housenumber][icony], hInfo[housenumber][iconz]);
    		return 1;
    }

    iar la inceput la enum HouseInfo am " Text3D:house3d "

    atat am... si cand dau /buy nu se schimba Text3d-ul.. si lafel si la /sell.

  4. 1. Aveti idee cum as putea face o zona iar in acea zona sa pot folosi o comanda iar daca nu sunt in ea sa nu o pot folosi :D cva cu IsPlayerArena cred:-? dar nu stiu cum se face si cum sa fac rost de coordonate.

    2. Am facut si eu faza cu (Admin) si (Vip) am 2 fs-uri diferite si la fiecare fs am la OnPlayerText pus (Vip) si (Admin) eh problema este ca .. daca vreau sa raspund la un reaction test nu functioneaza... si am inteles ca e normal sa nu functioneze ca am prea multe OnPLayerTexte.. (Adica multe fs) si am incercat sa'l bag Vip-ul in Admin dar deja avea buguri.. si .. aveti idee cum as putea repara chestia asta.. "Doar cei care au dupa nume (Admin) si (Vip) nu pot sa raspunda la Reaction Test. dar ceilalti (Playeri simpli) pot raspunde.

    3. Aveti idee daca ar trebuii sa pun casele in GM? sa numai am bugu cu [3DTextLabel] cand dau /buy nu se schimba text-ul in cel care a cumparat'o si cand dau /sell nu se schimba in For Sale..  Oare asa va merge :-?

    4. comanda /stats sa o fac in dialog .. ca numai o vreau tip Text..

    dcmd_stats(playerid,params[]) {
        new string[1024], pDeaths, player1, h, m, s;
        new string1[128];
        if(!strlen(params)) player1 = playerid;
        else player1 = strval(params);
    
        if(IsPlayerConnected(player1)) {
            TotalGameTime(player1, h, m, s);
             if(GetPVarInt(player1, "Deaths") == 0) pDeaths = 1; else pDeaths = GetPVarInt(player1, "Deaths");
            format(string1, sizeof(string1), " Stats %s  ",PlayerName2(player1));
            format(string, sizeof(string), " Player Kills: %d \n Player Deaths: %d \n Player Score: %d\n Player Ratio: %0.2f \n Player Money: $%d \n Warnings: %d \n Player Time: %d hrs %d mins %d secs\n Admin Level: %d ", PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths], GetPlayerScore(player1), Float:PlayerInfo[player1][Kills]/Float:pDeaths,GetPlayerMoney(player1),PlayerInfo[playerid][Warnings],
    		, h, m, s,PlayerInfo[playerid][Level]);
            return ShowPlayerDialog(playerid,991,DIALOG_STYLE_MSGBOX, string1, string,"Ok","Close");
        } else return ShowPlayerDialog(playerid,990,DIALOG_STYLE_MSGBOX, "Message server", "Player Not Connected","Ok","Close");
    } 
    si are ceva buguri "Ratia nu prea merge.. uneori kill-urile sunt deaduri" Erorile sunt aceastea
    (5244 -- 5245) : error 029: invalid expression, assumed zero
    (5245) : warning 215: expression has no effect
    (5245) : warning 215: expression has no effect
    (5245) : warning 215: expression has no effect
    (5245) : warning 215: expression has no effect
    (5245) : error 001: expected token: ";", but found ")"
    (5245) : error 029: invalid expression, assumed zero
    (5245) : fatal error 107: too many error messages on one line

    Cam asta ar fi lista :

    Player Kills:

    Player Deaths:

    Player Score:

    Player Ratio:

    Player Money:

    Warnings:

    Player Time:

    -> hrs

    -> mins

    -> secs

    Admin Level:

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