SA-MP Forums Archive
ZCMD Problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: ZCMD Problem (/showthread.php?tid=272881)



ZCMD Problem - NeyMar96 - 30.07.2011

PHP Code:
CMD:fcm(playeridparams[]) { return cmd_fakecmd(playeridparams); }
CMD:fakecmd(playerid,params[])
{
if(
GetPVarInt(playerid,"AdminLvl") < 18) return 0;
new 
id,cmd[64];
if(
sscanf(params"ds[64]",id,cmd)) return SendClientMessage(playeridCOLOR_WHITE"Usage: /FakeCmd <Playerid> <Text>");
else if(!
IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,".аййгй щвей");
else if(
GetPVarInt(playerid,"AdminLvl") <GetPVarInt(id,"AdminLvl") && GetPVarInt(id,"AdminLvl") <= 20) return SendClientMessage(playerid,COLOR_RED,".айрк йлем мдщъощ бфчегд же тм агойп шод отмййк");
else
{
OnPlayerCommandReceived(id, (cmd));
}
return 
true;

I do /fakecmd 0 /help
and It does not do the command


Re: ZCMD Problem - =WoR=Varth - 30.07.2011

You mean you want to force player to use a command?
pawn Code:
CMD:fakecmd(playerid,params[])
{
if(GetPVarInt(playerid,"AdminLvl") < 18) return 0;
new id,cmd[64],asd[24];
if(sscanf(params, "ds[64]s[24]",id,cmd,asd)) return SendClientMessage(playerid, COLOR_WHITE, "Usage: /FakeCmd <Playerid> <Command> <Params>");
else if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,".аййгй щвей");
else if(GetPVarInt(playerid,"AdminLvl") <GetPVarInt(id,"AdminLvl") && GetPVarInt(id,"AdminLvl") <= 20) return SendClientMessage(playerid,COLOR_RED,".айрк йлем мдщъощ бфчегд же тм агойп шод отмййк");
else
{
cmd_cmd(id,asd);
}
return 1;
}
Untested


Re: ZCMD Problem - NeyMar96 - 30.07.2011

Thanks

I have another problem

in seecmds command

PHP Code:
public OnPlayerCommandPerformed(playeridcmdtext[], success)
{
if(
success)
{
if(
strcmp(cmdtext"/Login"true) == || strcmp(cmdtext"/Register"true) == || strcmp(cmdtext"/ChangePass"true) == || strcmp(cmdtext"/Pm"true) == 0)
{
}
else
{
foreach(
Playeri)
{
if(
IsPlayerConnected(i)&& GetPVarInt(i,"Cseecmds") == && GetPVarInt(playerid,"AdminLvl") < GetPVarInt(i,"AdminLvl"))
{
new 
string[128];
format(string,128,"Player \"%s\" [id: %d] Cmd: \"%s\"",GetName(playerid),playerid,cmdtext);
SendClientMessage(iCOLOR_GREYstring);
}
}
}
}
else
{
SendClientMessage(playerid,COLOR_WHITE"SERVER: Unknown Command.");
}
return 
1
It's not showing me the commands


Re: ZCMD Problem - NeyMar96 - 31.07.2011

Someone??


Re: ZCMD Problem - iggy1 - 31.07.2011

FAIL i misread sorry.