Admin log.
#3

How would I add that to an command like this for example:

Код:
if(strcmp(cmd, "/givemoney", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /givemoney [playerid/PartOfName] [money]");
				return 1;
			}
			new playa;
			new money;
			playa = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			money = strval(tmp);
			if (PlayerInfo[playerid][pAdmin] >= 1337)
			{
			  if(IsPlayerConnected(playa))
			  {
			    if(playa != INVALID_PLAYER_ID)
			    {
			      //ConsumingMoney[playa] = 1;
						SafeGivePlayerMoney(playa, money);
						GetPlayerName(playa, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						format(string, 256, "AdmWarning: %s has admin-given %s $%d.", sendername,giveplayer,money);
						ABroadCast(COLOR_YELLOW,string,1);
					}
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "  you are not authorized to use that command!");
			}
		}
		return 1;
	}
Reply


Messages In This Thread
Admin log. - by -eXo - 02.06.2009, 19:57
Re: Admin log. - by Weirdosport - 02.06.2009, 20:29
Re: Admin log. - by -eXo - 02.06.2009, 21:01
Re: Admin log. - by Luka P. - 02.06.2009, 21:03
Re: Admin log. - by Weirdosport - 02.06.2009, 21:03
Re: Admin log. - by meegan1 - 08.06.2009, 15:30
Re: Admin log. - by DrDeath - 08.06.2009, 15:49
Re: Admin log. - by lol2112 - 08.06.2009, 15:56
Re: Admin log. - by DrDeath - 08.06.2009, 16:02
Re: Admin log. - by lol2112 - 08.06.2009, 16:12

Forum Jump:


Users browsing this thread: 1 Guest(s)