/mymute miliseconds --> minutes?
#6

Код:
if(strcmp(cmd, "/mute", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
		    new string[456];
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "{00CCFF}(( {FFCC00}Exemplu folosire: {FF9930} /mute [id] [minute] {00CCFF}))");
				return 1;
			}
			new playa;
			new time;
			playa = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			time = strval(tmp);
			if (PlayerInfo[playerid][Administrator])
			{
			    if(IsPlayerConnected(playa))
			    {
			        if(playa != INVALID_PLAYER_ID)
			        {
				        GetPlayerName(playa, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						if (time > 1)
						{
						format(string, sizeof(string), "(LS-CP) {CC0033}Jucatorul %s a primit mute de la administratorul %s pentru %d minute!", giveplayer, sendername, time);
						SendClientMessageToAllEx(COLOR_GRAD1, string);		
                        }	
						if (time == 1)
						{
						format(string, sizeof(string), "(LS-CP) {CC0033}Jucatorul %s a primit mute de la administratorul %s pentru %d minut!", giveplayer, sendername, time);
						SendClientMessageToAllEx(COLOR_GRAD1, string);		
                        }							
						PlayerInfo[playa][pMute] = 1;
						PlayerInfo[playa][pMuteTime] = time*6000;
						format(string, sizeof(string), "(LS-CP) {00CCFF}(( {FFCC00}Informatie - {FF9930}scrie /mymute pentru a afla timpul ramas din mute {00CCFF}))");	
						SendClientMessage(playa, COLOR_GRAD1, string);
					}
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "{00CCFF}(( {FFCC00}Informatie -{FF9930} nu ai accces la aceasta comanda! {00CCFF}))");
			}
		}
		return 1;
	}
and the new
/mymute
Код:
if(strcmp(cmd, "/mymute", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
		{
		    if(PlayerInfo[playerid][pMute] == 1)
			{
			new string[256];
			new timpramas = PlayerInfo[playerid][pMuteTime] / 60000;
			format(string, sizeof(string), "~y~Timp ramas din mute ~n~~r~%d~y~ minute ramase",timpramas);
			GameTextForPlayer(playerid, string, 5000, 1);
			}
		}
		return 1;
	}
Reply


Messages In This Thread
/mymute miliseconds --> minutes? - by Metharon - 19.05.2014, 14:42
Re: /mymute miliseconds --> minutes? - by Dignity - 19.05.2014, 14:45
Re: /mymute miliseconds --> minutes? - by rumen98 - 19.05.2014, 14:47
Re: /mymute miliseconds --> minutes? - by Threshold - 19.05.2014, 15:02
Re: /mymute miliseconds --> minutes? - by NaClchemistryK - 19.05.2014, 15:09
Re: /mymute miliseconds --> minutes? - by Metharon - 19.05.2014, 15:13

Forum Jump:


Users browsing this thread: 2 Guest(s)