a problem help^ -
Rabea - 03.01.2015
i have a problem with fuel and speedometter, i can see the speedo and fuel for everyone when i /tog speedo or /tog fuel
codes for speedo
pawn Код:
// Speedometer
if(Speedo[playerid] && IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new string[64], speed = GetVehicleSpeed(GetPlayerVehicleID(playerid), 0);
//format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n~~n~~r~Speedometer: ~w~%d MPH", speed);
format(string,sizeof(string),"MPH: %d", speed);
TextDrawSetString(speedometer, string);
//GameTextForPlayer(playerid, string,1000, 3);
}
pawn Код:
// Speedometer
speedometer = TextDrawCreate(292.000000, 432.000000, "MPH:");
TextDrawBackgroundColor(speedometer, 255);
TextDrawFont(speedometer, 1);
TextDrawLetterSize(speedometer, 0.500000, 1.000000);
TextDrawColor(speedometer, 16777215);
TextDrawSetOutline(speedometer, 0);
TextDrawSetProportional(speedometer, 1);
TextDrawSetShadow(speedometer, 1);
TextDrawSetSelectable(speedometer, 0);
Re: a problem help^ -
ATGOggy - 03.01.2015
You can see both speedo and fuel, then what is the problem?
Re: a problem help^ -
Rabea - 03.01.2015
no i don't mean this, i mean when i tog speed i see the speedo for everyone is using, same story with fuel.
Re: a problem help^ -
Riddick94 - 03.01.2015
You mean, if you write a command "/tog speed" then you will get an output of who's using Speedometer currently or what?
edit:// @down,
I don't know if you got this right, but if you did, then you're master of decrypting nasty English.
Re: a problem help^ -
Vince - 03.01.2015
There is only ONE variable, so once you update it, it will show to everyone who can see this ONE textdraw. You need to turn your "speedometer" variable into a MAX_PLAYER array and create the textdraw for each player individually. I recommend using PlayerTextDraw.
AW: a problem help^ -
CutX - 03.01.2015
well well.
these are the types of textdraws that need to be assigned to the clients individually
for the textdraw-id it should look similar to:
pawn Код:
new Text:speedo[MAX_PLAYERS][NUMBER_OF_TEXTDRAWS];//dont need the last dimension if its just 1
i also strongly recommand you to use
PlayerTextdraws
so it'd look like
pawn Код:
new PlayerText:speedo[MAX_PLAYERS][NUMBER_OF_TEXTDRAWS];
edit:
Quote:
Originally Posted by Riddick94
I am pretty sure, that Player TextDraws don't need to be an array anymore (unless you want to specify more than one textdraw for that category, not needed to create for each player anymore).
|
dang it! correct, i was still thiking of normal textdraws
Re: AW: a problem help^ -
Riddick94 - 03.01.2015
Quote:
Originally Posted by CutX
well well.
these are the types of textdraws that need to be assigned to the clients individually
for the textdraw-id it should look similar to:
pawn Код:
new Text:speedo[MAX_PLAYERS][NUMBER_OF_TEXTDRAWS];//dont need the last timension if its just 1
i also strongly recommand you to use PlayerTextdraws
so it'd look like
pawn Код:
new PlayerText:speedo[MAX_PLAYERS][NUMBER_OF_TEXTDRAWS];
|
I am pretty sure, that Player TextDraws don't need to be an array anymore (unless you want to specify more than one textdraw for that category, not needed to create for each player anymore).
Re: a problem help^ -
Rabea - 03.01.2015
just give me full code :c