Kill timer help.
#2

Code:
new Timer[MAX_PLAYERS];

public OnPlayerSpawn(playerid)
{
    Timer[playerid] = SetTimerEx("TiempoCompra", 20000, false, "i", playerid); //Time to buy weapons.
    SendClientMessage(playerid,Verde,"[Informaciуn] {FFFFFF}Tienes un periodo de tiempo para equiparte, usa la tecla (H) para desplegar el menъ.");
}
public OnPlayerDeath(playerid, killerid, reason)
{
	KillTimer(Timer[playerid]);
	return 1;
}
forward TiempoCompra(playerid);
public TiempoCompra(playerid)
{
    TextDrawHideForPlayer(playerid, Carrito[0]); //Textdraws
    TextDrawHideForPlayer(playerid, Carrito[1]); // ""
    TextDrawHideForPlayer(playerid, Carrito[2]); // ""
    TextDrawHideForPlayer(playerid, Carrito[3]); // ""
    TextDrawHideForPlayer(playerid, Carrito[4]); // ""
    PuedeComprar[playerid] = 0; //Make the player cannot buy anything.
    SendClientMessage(playerid,Rojo,"[Informaciуn] {FFFFFF}El periodo de tiempo para equiparte ha expirado.");
    return 1;
}
@EDIT

This timer does not need KillTimer!
Reply


Messages In This Thread
Kill timer help. - by karoliko - 20.05.2016, 17:15
Re: Kill timer help. - by F1N4L - 20.05.2016, 17:23
Re: Kill timer help. - by karoliko - 20.05.2016, 17:37
Re: Kill timer help. - by F1N4L - 20.05.2016, 17:52
Re: Kill timer help. - by karoliko - 20.05.2016, 18:51

Forum Jump:


Users browsing this thread: 1 Guest(s)