How to make this Rcon Admin only
#6

Код:
dcmd_setcash(playerid, params[])
{
	new
		giveplayerid,
		amount;
  if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,color,"You must be admin to use this command");
	if (sscanf(params, "ud", giveplayerid, amount)) SendClientMessage(playerid, 0xFF0000AA, "Usage: /givecash [playerid/partname] [amount]");
	else if (giveplayerid == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found");
	else
	{
	  ResetPlayerMoney(playerid);
		GivePlayerMoney(giveplayerid, amount);
		new name[MAX_PLAYER_NAME], string[48];
  	GetPlayerName(playerid, name, sizeof(name));
  	format(string, sizeof(string), "Admin %s has set your cash to %d", name, amount);
  	SendClientMessage(giveplayerid, 0xFFFF00AA, string);
	}
	return 1;
}
Is much less work..
Reply


Messages In This Thread
How to make this Rcon Admin only - by JoeDaDude - 01.01.2010, 15:36
Re: How to make this Rcon Admin only - by SpiderPork - 01.01.2010, 15:53
Re: How to make this Rcon Admin only - by JoeDaDude - 01.01.2010, 15:58
Re: How to make this Rcon Admin only - by SpiderPork - 01.01.2010, 16:00
Re: How to make this Rcon Admin only - by Correlli - 01.01.2010, 16:01
Re: How to make this Rcon Admin only - by _Vortex - 01.01.2010, 16:02
Re: How to make this Rcon Admin only - by RyDeR` - 01.01.2010, 17:57
Re: How to make this Rcon Admin only - by JoeDaDude - 01.01.2010, 19:07

Forum Jump:


Users browsing this thread: 1 Guest(s)