Jump to content

Tutorial 3D Text Label


Mark S.

Recommended Posts

Descriere tutorial: Buna ziua as dori un tutorial pentru un biz adica sa zica acolo "Fuel: pret pe litru 2$"

 

 

am acest fillup

 

public Fillup2()
{
    for(new i=0; i<MAX_PLAYERS; i++)
       {
           if(IsPlayerConnected(i))
           {
            new VID;
            new FillUp2;
            new string[130];
            VID = GetPlayerVehicleID(i);
            FillUp2 = GasMax - Gas[VID];
            if(Refueling == 1)
            {
                if(IsACopCar(VID) || IsAnFbiCar(VID) || IsAnAmbulance(VID) || IsAnFiretruck(VID) || IsNgCar(VID) || IsAGovernmentCar(VID))
                {
                    Gas[VID] += FillUp2;
                    FillUp2 = FillUp2 * SBizzInfo[12][sbEntranceCost];
                    format(string,sizeof(string),"* Vehicle filled up, for: $%d.",FillUp2);
                    SendClientMessage(i,COLOR_WHITE,string);
                    GameTextForPlayer(i, "~w~Government has paid for a gas.", 5000, 1);
                    SBizzInfo[12][sbTill] += FillUp2;
                    ExtortionSBiz(12, FillUp2);
                    Refueling = 0;
                    TogglePlayerControllable(i, 1);
                }
                else
                {
                    if(GetPlayerMoney(i) >= FillUp2+4)
                    {
                        Gas[VID] += FillUp2;
                        FillUp2 = FillUp2 * SBizzInfo[12][sbEntranceCost];
                        format(string,sizeof(string),"* Vehicle filled up, for: $%d.",FillUp2);
                        SendClientMessage(i,COLOR_WHITE,string);
                        SafeGivePlayerMoney(i, - FillUp2);
                        SBizzInfo[12][sbTill] += FillUp2;
                        ExtortionSBiz(12, FillUp2);
                        Refueling = 0;
                        TogglePlayerControllable(i, 1);
                    }
                       else
                       {
                           format(string,sizeof(string),"* Not enough Money to refill, it costs $%d to fill your Vehicle.",FillUp2);
                        SendClientMessage(i,COLOR_WHITE,string);
                        TogglePlayerControllable(i, 1);
                       }
                }
             }
        }
    }
    return 1;
}

 

Am incercat asa la onplayerupdate :

 

    new FillUp2;
    FillUp2 = FillUp2 * SBizzInfo[12][sbEntranceCost];
     format(string,sizeof(string), "Pret :%d",Fillup2);
      Update3DTextLabelText(Fillup2,COLOR_BLUE,string);

 

si nu am reusit.

Link to comment
Share on other sites

Functia este : Create3DTextLabel(text[], color, Float:X, Float:Y, Float:Z, Float:DrawDistance, virtualworld, testLOS)

 

: Click

 

: Click

 

Click

 

: Click

 

: Click

 

Aici ai tot despre Text3D

 

PS : un ex : Create3DTextLabel ("Mafia e smeker WopsS nu e :))", 0xFFFFFFFF, 372.6514, 2474.6919, 16.4844, 50, 0);

 

 

PS2: Vezi ca in linkurile care le ai mai sus ai si exemple jos!

Edited by Mafia.
Update :))
Link to comment
Share on other sites

pai si link urile alea le-am vazut si eu pe wiki si nu m-au ajutat cu nimic, de ce nu poti sa imi dai si mie un exemplu cu pretu?

cu textul meu ca din aia inteleg cum sa creez un text draw la o anumita locatie si asta stiu si eu.

Nu cred ca ai inteles ce vreau, nu vreau sa scrie "fuel pret:2$"

 

vreau sa scrie "fuel pret: %d $" acel %d identifier sau cum se numeste ma intereseaza, cum il folosesc in 3dtextlabel.

Edited by Selby
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.