SA-MP Forums Archive
zcmd issue - 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)
+--- Thread: zcmd issue (/showthread.php?tid=347918)



zcmd issue - [KSF]WARLOCK - 03.06.2012

The simplest zcmd command won't work on my server if I put it in my game mode. It is always ignored. It works when I put it in my FS (LuxAdmin).

For example, /tele in my GM:

pawn Код:
COMMAND:tele(playerid, params[]) return SetPlayerPos(playerid, 1175.50000000,-1174.90002441,101.59999847);
It always returns the invalid commands message which is given in my FS.

pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success)    SendClientMessage(playerid, red, "Invalid command! Type /cmds for a list of commands you can use!");

return 1;
}



Re: zcmd issue - Edward156 - 03.06.2012

pawn Код:
CMD:teleport(playerid, params[])
{
    SetPlayerPos(playerid,1175.50000000,-1174.90002441,101.59999847);
    return 1;
}



Re: zcmd issue - [KSF]WARLOCK - 03.06.2012

Quote:
Originally Posted by Edward156
Посмотреть сообщение
pawn Код:
CMD:teleport(playerid, params[])
{
    SetPlayerPos(playerid,1175.50000000,-1174.90002441,101.59999847);
    return 1;
}
Nope, still doesn't work.


Re: zcmd issue - Edward156 - 03.06.2012

Quote:
Originally Posted by [KSF]WARLOCK
Посмотреть сообщение
Nope, still doesn't work.
I will guarantee you that it works. I've tested it and it worked perfectly.


Re: zcmd issue - newbienoob - 03.06.2012

pawn Код:
if(!success) return SendClientMessage(........);



Re: zcmd issue - Jonny5 - 03.06.2012

well filterscripts are ran first AFAIK so i would put that OnPlayerCommandPerformed function into your mode


Re: zcmd issue - Mark™ - 03.06.2012

Remove public OnPlayerCommandPerformed, you don't need to use it if you're using zcmd as your command processor in your script.


Re: zcmd issue - [KSF]WARLOCK - 03.06.2012

Thank you for helping me guys. It works now.

Quote:
Originally Posted by newbienoob
Посмотреть сообщение
pawn Код:
if(!success) return SendClientMessage(........);
I've done the same.

Quote:
Originally Posted by Jonny5
Посмотреть сообщение
well filterscripts are ran first AFAIK so i would put that OnPlayerCommandPerformed function into your mode
This worked. Thanks a lot.

Quote:
Originally Posted by Xtreme_playa
Посмотреть сообщение
Remove public OnPlayerCommandPerformed, you don't need to use it if you're using zcmd as your command processor in your script.
I need it to display the "Invalid Command" message.

Thanks all!