31.08.2015, 13:03
(
Последний раз редактировалось Ercha; 31.08.2015 в 21:13.
)
SOLVED
symbol is assigned a value that is never used: "jtime"
C:\ZL\gamemodes\zma.pwn(338) : warning 219: local variable "jtime" shadows a variable at a preceding level C:\ZL\gamemodes\zma.pwn(339) : warning 204: symbol is assigned a value that is never used: "jtime" C:\ZL\gamemodes\zma.pwn(4846) : warning 203: symbol is never used: "jtime"
to call a function after some time. Can be set to repeat. |
//Call 'function' after 1000 milliseconds
public OnGameModeInit()
{
SetTimer("function", 1000, false); // Set a timer of 1000 miliseconds (1 second), non repeatable
}
forward function();
public function()
{
print("1 second has passed.");
}
//Instantly call the public
public OnGameModeInit()
{
function();
}
forward function();
public function()
{
print("game mode has started");
}
#define MAX_MAPTIME 250
#define MAX_MAPUPDATE_TIME 1450
function OnMapUpdate(playerid)
{
time -= 1;
TextDrawSetString(TimeLeft,whatevername(time));//this will change
if(time <= 0) TextDrawSetString(TimeLeft," ..."),KillTimer(mapvar),KillTimer(balvar),SetTimer("ShowCheckpoint",MAX_SHOW_CP_TIME,false);
if(time <= 0) GameTextForPlayer(playerid,"~b~Humans~n~ ~w~Go To Evacuation!",5000,6);//
return 1;
}
whatevername(seconds)
{
new vstr[8], minutes = floatround(seconds / 60, floatround_floor);
format(vstr, sizeof(vstr), "%02d:%02d", minutes, seconds - (minutes * 60));
return vstr;
}
He doesn't want to make a timer, he wants to display on the string the time on minutes and not in milliseconds.
|
EDIT: after rereading I understood you wanna change the format itself, not the timer so I apologize and here you go.
pawn Код:
|