zcmd issue
#1

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

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

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

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.
Reply
#5

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

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

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

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!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)