19.03.2012, 10:49
Hey, i have make some one textDraw and its is bugged in 0.3d:S
Script
Script
pawn Код:
public OnGameModeInit()
{
TextDraws[TDSpeedClock][0] = TextDrawCreate(496.000000,400.000000,"~b~20");
TextDraws[TDSpeedClock][1] = TextDrawCreate(487.000000,388.000000,"~b~40");
TextDraws[TDSpeedClock][2] = TextDrawCreate(483.000000,375.000000,"~g~60");
TextDraws[TDSpeedClock][3] = TextDrawCreate(488.000000,362.000000,"~g~80");
TextDraws[TDSpeedClock][4] = TextDrawCreate(491.000000,349.000000,"~g~100");
TextDraws[TDSpeedClock][5] = TextDrawCreate(508.000000,336.500000,"~y~120");
TextDraws[TDSpeedClock][6] = TextDrawCreate(536.000000,332.000000,"~y~140");
TextDraws[TDSpeedClock][7] = TextDrawCreate(567.000000,337.000000,"~y~160");
TextDraws[TDSpeedClock][8] = TextDrawCreate(584.000000,348.000000,"~y~180");
TextDraws[TDSpeedClock][9] = TextDrawCreate(595.000000,360.000000,"~r~200");
TextDraws[TDSpeedClock][10] = TextDrawCreate(603.000000,374.000000,"~r~220");
TextDraws[TDSpeedClock][11] = TextDrawCreate(594.000000,386.000000,"~r~240");
TextDraws[TDSpeedClock][14] = TextDrawCreate(585.000000,399.000000,"~r~260");
TextDraws[TDSpeedClock][12] = TextDrawCreate(534.000000,396.000000,"~r~/ \\");
TextDraws[TDSpeedClock][13] = TextDrawCreate(548.000000,401.000000,".");
TextDrawLetterSize(TextDraws[TDSpeedClock][13], 0.73, -2.60);
TextDrawSetOutline(TextDraws[TDSpeedClock][13], 0);
TextDrawSetShadow(TextDraws[TDSpeedClock][13], 1);
TextDrawSetShadow(TextDraws[TDSpeedClock][14], 0);
TextDrawLetterSize(TextDraws[TDSpeedClock][12], 1.059999, 2.100000);
for(new i; i < 13; i++)
{
TextDrawSetShadow(TextDraws[TDSpeedClock][i], 0);
}
}
pawn Код:
enum td
{
Text:TDSpeedClock[15]
}
new TextDraws[td];
new Text:TextDrawsd[MAX_PLAYERS][4];
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new string[256];
new pveh = GetVehicleModel(GetPlayerVehicleID(playerid));
new vehicle = GetPlayerVehicleID(playerid);
if(newstate == PLAYER_STATE_DRIVER)
{
for(new i; i < 15; i++)
TextDrawShowForPlayer(playerid, TextDraws[TDSpeedClock][i]);
for(new i; i < 4; i++)
TextDrawsd[playerid][i] = TextDrawCreate(555.0, 402.0, "~b~.");
}
else
{
TextDrawHideForPlayer(playerid, SpidoText0[playerid]);
TextDrawHideForPlayer(playerid, SpidoText1[playerid]);
TextDrawHideForPlayer(playerid, SpidoText2[playerid]);
TextDrawHideForPlayer(playerid, SpidoText3[playerid]);
TextDrawHideForPlayer(playerid, SpidoText4[playerid]);
TextDrawHideForPlayer(playerid, SpidoText5[playerid]);
TextDrawHideForPlayer(playerid, SpidoText6[playerid]);
TextDrawHideForPlayer(playerid, SpidoText7[playerid]);
for(new i; i < 4; i++)
TextDrawHideForPlayer(playerid, TextDrawsd[playerid][i]);
for(new i; i < 15; i++)
TextDrawHideForPlayer(playerid, TextDraws[TDSpeedClock][i]);
}
}