[POMOC] PlayerTextDrawSetString


Započeo Majkl Script, Decembar 29, 2016, 18:14:37 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: Moja od 0
Detaljan opis problema: Napravio sam textdrawowe za brzinometar i sada sam radio playertextdrawsetstring za gorivo brzinu skin igraca itd sve to lepo radi bez errora ali kad pokusam da napravim string za preview model za auta u kojem je igrac izbaci ove erore
Dio skriptehttp://pastebin.com/GCNwPJMt
Neke slike/video za lakse dobivanje pomoci(neobavezno): //nista

Citat: Marko_Salvatorelo poslato Decembar 29, 2016, 18:14:37 POSLE PODNE
Skripta koju koristim: Moja od 0
Detaljan opis problema: Napravio sam textdrawowe za brzinometar i sada sam radio playertextdrawsetstring za gorivo brzinu skin igraca itd sve to lepo radi bez errora ali kad pokusam da napravim string za preview model za auta u kojem je igrac izbaci ove erore
Dio skriptehttp://pastebin.com/GCNwPJMt
Neke slike/video za lakse dobivanje pomoci(neobavezno): //nista

Na najlaksi nacin da uradis za preview za model vozila ti je ovako:
A to sto si uradio modelvozila, napisi kako si kreira taj td, a sve ostalo izbrisi sto ti ne treba.

PlayerTextDrawSetPreviewModel(playerid, BRZINOMETAR_TD[playerid][3], GetVehicleModel(GetPlayerVehicleID(playerid)));


A evo i za ime vozila da uradis na laksi nacin, da ne bude tako sve natrpano:

format(string, sizeof(string), "%s", GetVehicleModel(GetPlayerVehicleID(playerid)));
			PlayerTextDrawSetString(playerid, BRZINOMETAR_TD[playerid][5], string);
Poslednja Izmena: Decembar 29, 2016, 19:37:47 POSLE PODNE od [BE] Boky


     Ne ide to tako kako ti mislis zar je tesko procitat malo ovo ono ovako bi trebalo ic bez problema     


     
      new PlayerText:IMETEXTDRAWA


     
       IMETEXTDRAWA = CreatePlayerTextDraw(playerid,KODOVI, "_");
       PlayerTextDrawLetterSize(playerid,IMETEXTDRAWA,  KODOVI);
       PlayerTextDrawTextSize(playerid,IMETEXTDRAWA, KODOVI);
       PlayerTextDrawAlignment(playerid,IMETEXTDRAWA, KODOVI);
       PlayerTextDrawColor(playerid,IMETEXTDRAWA, KODOVI);
       PlayerTextDrawSetShadow(playerid,IMETEXTDRAWA, KODOVI);
       PlayerTextDrawSetOutline(playerid,IMETEXTDRAWA, KODOVI);
       PlayerTextDrawBackgroundColor(playerid,SIMETEXTDRAWA, KODOVI);
       PlayerTextDrawFont(playerid, IMETEXTDRAWA, TEXT_DRAW_FONT_MODEL_PREVIEW);
       PlayerTextDrawSetProportional(playerid,IMETEXTDRAWA, KODOVI);
       PlayerTextDrawSetShadow(playerid,IMETEXTDRAWA, KODOVI);
       PlayerTextDrawSetPreviewModel(playerid,IMETEXTDRAWA, 560);
       PlayerTextDrawSetPreviewRot(playerid,IMETEXTDRAWA, KODOVI);



public OnPlayerStateChange(playerid, newstate, oldstate)
{

	if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)//IGRAC U VOZILU
	{
	        new vehicleid = GetPlayerVehicleID(playerid);
		PlayerTextDrawSetPreviewModel(playerid, IMETEXTDRAWA,GetVehicleModel(vehicleid));//KAD UDE POKAZIVA MU VOZILA TJST SLIKU VOZILA
		PlayerTextDrawShow(playerid, IMETEXTDRAWA);//KAD UDE POKAZIVA MU VOZILA TJST SLIKU VOZILA
	}
	if( (newstate != oldstate) && (oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER) )//IGRAC IZASO IZ VOZILA
	{
            PlayerTextDrawHide(playerid, IMETEXTDRAWA);//KAD IZADE SKRIVA TEXTDRAW
     
        }
Poslednja Izmena: Decembar 29, 2016, 21:37:53 POSLE PODNE od MySQL

My PC:
# Procesor: AMD FX-8350 (8 x 4,0 GHz)
# Matična ploča: Asus M5A78M-M LX3
# Memorija: Kingston Fury 8 GB 1600 MHz
# Hard disk: Seagate / WD 500 GB
# Grafička kartica: GTX750-Ti 2 GB GDDR5
# Windows 8.1 64-Bit

Sve sam pokusao ali i dalje izbacuje ovaj error
E:\DM SAMP SERVER\gamemodes\BalkaniaFreeroom.pwn(12264) : error 035: argument type mismatch (argument 3)

Dodaj pod

public OnPlayerStateChange(playerid, newstate, oldstate)


       


       
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)//Igraci u vozilu
	{
                new vehicleid = GetPlayerVehicleID(playerid);
		PlayerTextDrawSetPreviewModel(playerid, IMETEXTDRAWA DODAJ OVDJE OD TOG VOZILA[playerid],GetVehicleModel(vehicleid));//dodaj ime ovdje od tog vozila naslikanog
	        PlayerTextDrawShow(playerid,bbox1[playerid]);
                PlayerTextDrawShow(playerid,bbox2[playerid]);
                PlayerTextDrawShow(playerid,bbox3[playerid]);
                PlayerTextDrawShow(playerid,bbox4[playerid]);
                PlayerTextDrawShow(playerid,Kmhtd[playerid]);
                PlayerTextDrawShow(playerid,modelvozila[playerid]);
                PlayerTextDrawShow(playerid,vgoriva[playerid]);
                PlayerTextDrawShow(playerid,gorivo[playerid]);
                PlayerTextDrawShow(playerid,infernus[playerid]);
               PlayerTextDrawShow(playerid,turistaskin[playerid]);
               PlayerTextDrawShow(playerid,modelvozilatxt[playerid]);
               PlayerTextDrawShow(playerid,svetlatd[playerid]);
	}
	if( (newstate != oldstate) && (oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER) )//IGRAC IZASO IZ VOZILA
	{
            PlayerTextDrawHide(playerid, IMETEXTDRAWA);
            PlayerTextDrawHide(playerid,bbox1[playerid]);
            PlayerTextDrawHide(playerid,bbox2[playerid]);
            PlayerTextDrawHide(playerid,bbox3[playerid]);
            PlayerTextDrawHide(playerid,bbox4[playerid]);
            PlayerTextDrawHide(playerid,Kmhtd[playerid]);
            PlayerTextDrawHide(playerid,modelvozila[playerid]);
            PlayerTextDrawHide(playerid,vgoriva[playerid]);
            PlayerTextDrawHide(playerid,gorivo[playerid]);
            PlayerTextDrawHide(playerid,infernus[playerid]);
            PlayerTextDrawHide(playerid,turistaskin[playerid]);
            PlayerTextDrawHide(playerid,modelvozilatxt[playerid]);
            PlayerTextDrawHide(playerid,svetlatd[playerid]);

    }

Poslednja Izmena: Decembar 29, 2016, 22:13:07 POSLE PODNE od MySQL

My PC:
# Procesor: AMD FX-8350 (8 x 4,0 GHz)
# Matična ploča: Asus M5A78M-M LX3
# Memorija: Kingston Fury 8 GB 1600 MHz
# Hard disk: Seagate / WD 500 GB
# Grafička kartica: GTX750-Ti 2 GB GDDR5
# Windows 8.1 64-Bit

   if(newstate == PLAYER_STATE_DRIVER)
{
   new model[24],vehicleids = GetPlayerVehicleID(playerid),conelys[50];
   GetVehicleName(GetPlayerVehicleID(playerid),model,sizeof(model));
   PlayerTextDrawSetString(playerid, modelvozila[playerid], model);
   PlayerTextDrawSetString(playerid, turistaskin[playerid],PlayerInfo[playerid][pSkin]);
   PlayerTextDrawShow(playerid,turistaskin[playerid]);
   PlayerTextDrawSetString(playerid, infernus[playerid],GetVehicleModel(vehicleids));
   PlayerTextDrawShow(playerid,infernus[playerid]);
   format(conelys, sizeof(conelys), "%dL", Fuel[GetPlayerVehicleID(playerid)]);
   PlayerTextDrawSetString(playerid, gorivo[playerid], conelys);
   PlayerTextDrawShow(playerid,bbox1[playerid]);
   PlayerTextDrawShow(playerid,bbox2[playerid]);
   PlayerTextDrawShow(playerid,bbox3[playerid]);
   PlayerTextDrawShow(playerid,bbox4[playerid]);
   PlayerTextDrawShow(playerid,Kmhtd[playerid]);
   PlayerTextDrawShow(playerid,modelvozila[playerid]);
   PlayerTextDrawShow(playerid,vgoriva[playerid]);
   PlayerTextDrawShow(playerid,gorivo[playerid]);
   PlayerTextDrawShow(playerid,modelvozilatxt[playerid]);
   PlayerTextDrawShow(playerid,svetlatd[playerid]);
   }
meni je ovako to

Ništa to ne valja nece ti radit al eto kako hoces ja sam ti objasnio panj od drveta bi skonto.

My PC:
# Procesor: AMD FX-8350 (8 x 4,0 GHz)
# Matična ploča: Asus M5A78M-M LX3
# Memorija: Kingston Fury 8 GB 1600 MHz
# Hard disk: Seagate / WD 500 GB
# Grafička kartica: GTX750-Ti 2 GB GDDR5
# Windows 8.1 64-Bit

Sada nema errora ali kad udjem na server i sednem na vozilo preview modei izgledaju ovako http://imgur.com/a/ZWzLq imaju ovaj crni okvir

a kad sam zavrsio rad u td editoru ovako je izgledalo  http://imgur.com/a/TuFx1 - nzm kako sad to

Nisi dobro uradio nešto.

My PC:
# Procesor: AMD FX-8350 (8 x 4,0 GHz)
# Matična ploča: Asus M5A78M-M LX3
# Memorija: Kingston Fury 8 GB 1600 MHz
# Hard disk: Seagate / WD 500 GB
# Grafička kartica: GTX750-Ti 2 GB GDDR5
# Windows 8.1 64-Bit

Citat: Marko_Salvatorelo poslato Decembar 30, 2016, 15:03:25 POSLE PODNE
Sada nema errora ali kad udjem na server i sednem na vozilo preview modei izgledaju ovako http://imgur.com/a/ZWzLq imaju ovaj crni okvir

a kad sam zavrsio rad u td editoru ovako je izgledalo  http://imgur.com/a/TuFx1 - nzm kako sad to
Je l koristis onaj Mumin TDEditor?
samo rejv i debele zene