ZCMD Problem
#1

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
Reply
#2

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
Reply
#3

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
Reply
#4

Someone??
Reply
#5

FAIL i misread sorry.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)