ZCMD Problem
#1

PHP Code:
CMD:fcm(playerid, params[]) { return cmd_fakecmd(playerid, params); }
CMD:fakecmd(playerid,params[])
{
if(
GetPVarInt(playerid,"AdminLvl") < 18) return 0;
new 
id,cmd[64];
if(
sscanf(params, "ds[64]",id,cmd)) return SendClientMessage(playerid, COLOR_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(playerid, cmdtext[], success)
{
if(
success)
{
if(
strcmp(cmdtext, "/Login", true) == 0 || strcmp(cmdtext, "/Register", true) == 0 || strcmp(cmdtext, "/ChangePass", true) == 0 || strcmp(cmdtext, "/Pm", true) == 0)
{
}
else
{
foreach(
Player, i)
{
if(
IsPlayerConnected(i)&& GetPVarInt(i,"Cseecmds") == 1 && GetPVarInt(playerid,"AdminLvl") < GetPVarInt(i,"AdminLvl"))
{
new 
string[128];
format(string,128,"Player \"%s\" [id: %d] Cmd: \"%s\"",GetName(playerid),playerid,cmdtext);
SendClientMessage(i, COLOR_GREY, string);
}
}
}
}
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)