Can you help me
#5

Here you go
Код HTML:
#include <a_samp>
#include <foreach>
#include <zcmd>

CMD:readcmds(playerid,params[])
{
	if(!GetPVarInt(playerid,"ReadCmds"))
	{
		SetPVarInt(playerid,"ReadCmds",true);
		SendClientMessage(playerid,0x00FF00FF,"- >>ReadCmds<< - Command Reading turned >>ON<<!");
	}
	else
	{
		DeletePVar(playerid,"ReadCmds");
		SendClientMessage(playerid,0xFF0000FF,"- >>ReadCmds<< - Command Reading turned >>OFF<<!");
	}
	return 1;
}
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
	new str[144];
	format(str, sizeof(str),"- ReadCmds - %s Used: %s", pName(playerid), cmdtext);
	
	foreach(Player,i)
	{
		if(GetPVarInt(i,"ReadCmds") && i!= playerid /*&& PInfo[playerid][pAdmin] > 2*/) //The commented line is to check if a player is admin too
			SendClientMessage(i,-1,str);// then send a message
	}
	return 1;
}
stock pName(playerid)
{
    new Name[128];
    GetPlayerName(playerid, Name, sizeof(Name));
	new string[64];
	format(string, 64, "%s (%d)", Name, playerid);
	return string;
}
Reply


Messages In This Thread
Can you help me - by CrazyPerry - 14.11.2015, 05:11
Re: Can you help me - by DarkScimitar - 14.11.2015, 10:43
Re: Can you help me - by JamieR - 14.11.2015, 12:28
Re: Can you help me - by CrazyPerry - 17.11.2015, 11:53
Re: Can you help me - by gurmani11 - 17.11.2015, 12:10
Re: Can you help me - by jlalt - 17.11.2015, 13:45
Re: Can you help me - by CrazyPerry - 17.11.2015, 13:47

Forum Jump:


Users browsing this thread: 1 Guest(s)