SA-MP Forums Archive
Can you help me - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Can you help me (/showthread.php?tid=594144)



Can you help me - CrazyPerry - 14.11.2015

im looking for a command like /showcommand

Function: it show's command that when you type an command it show the command that player type in the admin of the server

(Sorry for my bad english)

:3 :V


Re: Can you help me - DarkScimitar - 14.11.2015

Looking for somebody to start a roleplaying community with me will be medium roleplay if interested contact me on samp forums or skype Deadlyroller14 (Tommy)


Re: Can you help me - JamieR - 14.11.2015

Hello,

You mean a command like /help ? /cmd ??


Re: Can you help me - CrazyPerry - 17.11.2015

like this

Example:
Perry has use command /cmds


Re: Can you help me - gurmani11 - 17.11.2015

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;
}



Re: Can you help me - jlalt - 17.11.2015

Quote:
Originally Posted by gurmani11
Посмотреть сообщение
Here you go
Код HTML:
stock pName(playerid)
{
    new Name[128];
    GetPlayerName(playerid, Name, sizeof(Name));
	new string[64];
	format(string, 64, "%s (%d)", Name, playerid);
	return string;
}
https://sampforum.blast.hk/showthread.php?tid=570635


Re: Can you help me - CrazyPerry - 17.11.2015

thank you gurnami11!!