Text Draw help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Text Draw help (
/showthread.php?tid=291074)
Text Draw help -
shady001 - 18.10.2011
Hi,
so i have a fuel system :
pawn Код:
public CheckGas()
{
new string[256];
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
{
new vehicle = GetPlayerVehicleID(i);
if(Gas[vehicle] >= 1)
{
if(Gas[vehicle] <= 10) { PlayerPlaySound(i, 1085, 0.0, 0.0, 0.0); }
if(gGas[i] == 1)
{
format(string, sizeof(string), "~b~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Benzina:~w~ %d%",Gas[vehicle]);
GameTextForPlayer(i,string,15500,3);
}
if(IsAPlane(vehicle) || IsABoat(vehicle)) { Gas[vehicle]++; }
Gas[vehicle]--;
}
else
{
NoFuel[i] = 1;
TogglePlayerControllable(i, 0);
GameTextForPlayer(i,"~w~~n~~n~~n~~n~~n~~n~~n~~n~No fuel in Vehicle~n~Use /exit to leave the vehicle",1500,3);
}
}
}
}
return 1;
}
pawn Код:
if(strcmp(cmd, "/fuel", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (gGas[playerid] == 0)
{
gGas[playerid] = 1;
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~p~Fuel Info on", 5000, 5);
TextDrawShowForPlayer(playerid,text199);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
}
else if (gGas[playerid] == 1)
{
gGas[playerid] = 0;
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~b~Fuel Info off", 5000, 5);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
}
return 1;
}
}
And i want the fuel to be showd in TextDraw format not GameText. I have tried to change it but no succes ... i'm not so good at TextDraw
If someone know how to to it please help me .
Sorry for my bad english.
Re: Text Draw help -
Pharrel - 18.10.2011
find some text draw editor and make your own text draw...
Re: Text Draw help -
shady001 - 18.10.2011
what do you mean ? sorry but i'm still a beginer
. Can you explain it in a diferent way ?
Re: Text Draw help -
shady001 - 18.10.2011
i have downloaded Zamaroht's Textdraw Editor v1.0 but can i make it show me the fuel ?