#1

can i make a command without this "/" xD ?
Reply
#2

yes.
Reply
#3

Yes, if you only use this callback OnPlayerText.
Reply
#4

i use zcmd
Reply
#5

pawn Код:
COMMAND:mycommand(playerid, params[]) // or CMD:mycommand(playerid, params[])
{
  // Do something
  return 1;
}
Reply
#6

Superhot, that's what not he asked..
OT: This should help you -> https://sampforum.blast.hk/showthread.php?tid=335123
pawn Код:
public OnPlayerText(playerid, text[])
{
    if(strfind(text, "help me up", true)) { //If the player types this 'command'
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
        SetPlayerPos(playerid, X, Y, Z + 10); //He will be slapped up
        SendClientMessage(playerid, -1, "I've set your position 10 meters higher - I hope you aren't stuck anymore!"); //And he will receive this message.
        return 0; //return 0; will not send his message to the players(They wont see that he typed the command/message)
    }
    return 1;
}
Another example:
pawn Код:
public OnPlayerText(playerid, text[])
{
    if(strfind(text, "commands", true)) { //If the player types 'commands'
        SendClientMessage(playerid, -1, "[COMMANDS] - /command1 - /command2 - /command3"); //he will receive this message.
        return 0; //And the other players again, won't be able to see what he typed.
    }
    return 1;
I did not test this.. just typed it xd
NOTE: If you want other players see him type the "commands", then remove the return 0;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)