How to store old value?
#6

Quote:
Originally Posted by Nabster
Посмотреть сообщение
eh,that is my question

how can i store value into oldnuketimer..
If you don't do anything with your OldNukeTimer, you can store the "NukeTimer" value in your "OldNukeTimer" value before you change it.
pawn Код:
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 OldNukeTimer = NukeTimer;
    new newlimit;
    if(sscanf(params,"i",newlimit))
    return SendClientMessage(playerid, COLOR_RED, "USAGE: /setnuke [Cooldown]");
    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,OldNukeTimer,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)