//OnGameModeInit
TimeLeft = TextDrawCreate(496.000000, 0.000000, "Time left: ~b~10:00");
TextDrawBackgroundColor(TimeLeft, 255);
TextDrawFont(TimeLeft, 1);
TextDrawLetterSize(TimeLeft, 0.400000, 2.099999);
TextDrawColor(TimeLeft, -1);
TextDrawSetOutline(TimeLeft, 0);
TextDrawSetProportional(TimeLeft, 1);
TextDrawSetShadow(TimeLeft, 1);
TextDrawHideForAll(TimeLeft);
//OnPlayerConnect
MyKills[playerid] = TextDrawCreate(538.000000, 406.000000, "Kills: ~g~99 ~n~~w~Deaths: ~g~99");
TextDrawBackgroundColor(MyKills[playerid], 255);
TextDrawFont(MyKills[playerid], 1);
TextDrawLetterSize(MyKills[playerid], 0.509999, 1.700000);
TextDrawColor(MyKills[playerid], -1);
TextDrawSetOutline(MyKills[playerid], 0);
TextDrawSetProportional(MyKills[playerid], 1);
TextDrawSetShadow(MyKills[playerid], 1);
TextDrawUseBox(MyKills[playerid], 1);
TextDrawBoxColor(MyKills[playerid], 120);
TextDrawTextSize(MyKills[playerid], 630.000000, 0.000000);
TextDrawHideForPlayer(playerid, MyKills[playerid]);
TextDrawShowForPlayer( playerid, TimeLeft );
//OnPlayerSpawn
TextDrawShowForPlayer( playerid, MyKills[playerid] );
pawn Код:
|
MyKills[playerid] = TextDrawCreate(538.000000, 406.000000, "Kills: ~g~99 ~n~~w~Deaths: ~g~99");
TextDrawBackgroundColor(MyKills[playerid], 255);
TextDrawFont(MyKills[playerid], 1);
TextDrawLetterSize(MyKills[playerid], 0.509999, 1.700000);
TextDrawColor(MyKills[playerid], -1);
TextDrawSetOutline(MyKills[playerid], 0);
TextDrawSetProportional(MyKills[playerid], 1);
TextDrawSetShadow(MyKills[playerid], 1);
TextDrawUseBox(MyKills[playerid], 1);
TextDrawBoxColor(MyKills[playerid], 120);
TextDrawTextSize(MyKills[playerid], 630.000000, 0.000000);
TextDrawHideForPlayer(playerid, MyKills[playerid]);
I think that
pawn Код:
|
new Timer,message1[50],message2[50];
// OnGameModeInit
TimeLeft = TextDrawCreate(496.000000, 0.000000, "Time left: ~b~10:00");
TextDrawBackgroundColor(TimeLeft, 255);
TextDrawFont(TimeLeft, 1);
TextDrawLetterSize(TimeLeft, 0.400000, 2.099999);
TextDrawColor(TimeLeft, -1);
TextDrawSetOutline(TimeLeft, 0);
TextDrawSetProportional(TimeLeft, 1);
TextDrawSetShadow(TimeLeft, 1);
MyKills[playerid] = TextDrawCreate(538.000000, 406.000000, "Kills: ~g~99 ~n~~w~Deaths: ~g~99");
TextDrawBackgroundColor(MyKills[playerid], 255);
TextDrawFont(MyKills[playerid], 1);
TextDrawLetterSize(MyKills[playerid], 0.509999, 1.700000);
TextDrawColor(MyKills[playerid], -1);
TextDrawSetOutline(MyKills[playerid], 0);
TextDrawSetProportional(MyKills[playerid], 1);
TextDrawSetShadow(MyKills[playerid], 1);
TextDrawUseBox(MyKills[playerid], 1);
TextDrawBoxColor(MyKills[playerid], 120);
TextDrawTextSize(MyKills[playerid], 630.000000, 0.000000);
// OnPlayerConnect
Timer=SetTimerEx("Textdrawtimer", 200, true, "i", playerid);
forward Textdrawtimer(playerid);
stock Textdrawtimer(playerid)
{
format(message1, sizeof(message1),"Time left: ~b~%i", Your Count Down Timer);
format(message2, sizeof(message2),"Kills: ~g~%i ~n~~w~Deaths: ~g~%i", Your Kills variable, Your Deaths variable);
TextDrawSetString(TimeLeft,message1);
TextDrawSetString(MyKills[playerid],message2);
return 1;
}
// It's your choice where to put these. OnPlayerConnect or OnPlayerSpawn.
TextDrawHideForAll(TimeLeft);
TextDrawHideForPlayer(playerid, MyKills[playerid]);
TextDrawShowForPlayer( playerid, TimeLeft );
TD1 TD2