Jump to content
  • 0

pomoc problem s GameTextForPlayer


Guest poblib

Dotaz

dobry den prosim vas poradiliy by ste mi s tymto?

 

format(string,sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~w~ ~r~Benzin ~y~: %d ~r~litru ~r~Stav ~y~: %1.f ~w~",benzin[GetPlayerVehicleID(i)],stav);

 

problem je ze je to le na dve- a neviem ako urobit na 3 premenne///

Link to comment
Share on other sites

4 odpovědí na tuto otázku

Recommended Posts

  • 0

format(string,sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~w~ ~r~Benzin ~y~: %d ~r~litru ~r~Stav ~y~: %1.f ~w~ a tady das jak se ma zobrazit, v jakem formatu",benzin[GetPlayerVehicleID(i)],stav, mno sem das dalsi promenou);

Link to comment
Share on other sites

  • 0

%d = dial neboli cislice

 

Priklad:

new penize;
GetPlayerMoney(playerid, penize);
format(string, sizeof(string), "Penize %d", penize);

 

%s = string neboli text

 

Priklad:

format(string, sizeof(string), "Jmeno %s", PlayerName(playerid));

 

 

%1.f - Desetine cislo

 

Priklad:

new Float:zdravi;
GetPlayerHealth(playerid,zdravi);
format(string, sizeof(string), "Zdravi %.1f", zdravi);

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...