How to store old value?
#1

I want to display old cooldown time

Код:
CMD:setnuke(playerid, params[])
{
	if(PInfo[playerid][Level] < 5)
    return SendClientMessage(playerid,STEALTH_BLUE,"You need to be level 5 to set nuke cooldown.");
	new string[128];
	new oldlimit;
	new newlimit;
	if(sscanf(params,"i",newlimit))
	return SendClientMessage(playerid, COLOR_RED, "USAGE: /setnuke [Cooldown]");
	OldNukeTimer = oldlimit;
 	NukeTimer = newlimit;
 	new pName[MAX_PLAYER_NAME];
 	CMDMessageToAdmins(playerid,"SETNUKE");
    GetPlayerName(playerid, pName, sizeof(pName));
    format(string,sizeof(string),"Administrator %s(%d) has changed the nuke cooldown from %i to %i seconds.",pName,playerid,oldlimit,newlimit);
	SendClientMessageToAll(COLOR_DARKORCHID, string);
	return 1;
}
Reply


Messages In This Thread
How to store old value? - by Nabster - 21.02.2015, 13:20
Re: How to store old value? - by mahdi499 - 21.02.2015, 13:34
Re: How to store old value? - by CalvinC - 21.02.2015, 13:44
Re: How to store old value? - by Nabster - 21.02.2015, 13:45
Re: How to store old value? - by mahdi499 - 21.02.2015, 13:47
Re: How to store old value? - by CalvinC - 21.02.2015, 13:49
Re: How to store old value? - by Nabster - 21.02.2015, 13:51
Re: How to store old value? - by CalvinC - 21.02.2015, 13:53
Re: How to store old value? - by Nabster - 21.02.2015, 13:57

Forum Jump:


Users browsing this thread: 1 Guest(s)