how to make a Force Cmd?
#1

I need help in 2 things.
First, i want /cmds to make it says all what /commands also says.

I can copy and paste. but also i want to know how to be perfect in scripting.
And also. i want to know something else.

I want to make my Bot do a command. Once he connect or Spawn.
Is there is a way to make the bot be forced to write /farce?
Reply
#2

Are you using ZCMD? If so, the first question is on the main post of the thread.

As for the second, apparently there is a SendCommand function for NPCs (but no documentation on the wiki?).
Reply
#3

With /cmds you can write a Dialog or in a SendClientMessage like:

Код:
COMMAND:cmds(playerid,params[])
{
  SendClientMessage(playerid,yourcolor,"List all cmds here:");
  return 1;
]
Or wanna repeat you it from your /cmds command? then:

Код:
COMMAND:cmds(playerid,params[])
{
  return cmd_commands(playerid,params);
}
with ZCMD.
Reply
#4

YCMD. No zCMD
Reply
#5

Coded by: ******.
pawn Код:
YCMD:cmds(playerid, params[], help)
{
    if (help)
    {
        SendClientMessage(playerid, 0xFF0000AA, "Lists all the commands a player can use.");
    }
    else
    {
        new count = Command_GetPlayerCommandCount(playerid);
        for (new i = 0; i != count; ++i)
        {
            SendClientMessage(playerid, 0xFF0000AA, Command_GetNext(i, playerid));
        }
    }
    return 1;
}
Reply
#6

Ok Nevermind that for now, right now i need to know something else. real important. :O
My NPC Atleast should reply to someone who says 'Yo NickNPC'

it replies with 'Hello %s', And it is working nice. IF i add another text like 'Yo NickNPC, Anything awesome?'
He answers with 'Updates: blablabla'.

But right now, he replies with what YoNickNPC says and Yo NickNPC, Anything Awesome?', 2 in the same. Any help?
Reply
#7

Quote:
Originally Posted by Maftaca
Посмотреть сообщение
Ok Nevermind that for now, right now i need to know something else. real important. :O
My NPC Atleast should reply to someone who says 'Yo NickNPC'

it replies with 'Hello %s', And it is working nice. IF i add another text like 'Yo NickNPC, Anything awesome?'
He answers with 'Updates: blablabla'.

But right now, he replies with what YoNickNPC says and Yo NickNPC, Anything Awesome?', 2 in the same. Any help?
That made no sense at all.
Reply
#8

Quote:
Originally Posted by Ballu Miaa
Посмотреть сообщение
That made no sense at all.
This.
Reply
#9

How it doesn't? lol, It is just this.
Reply
#10

Quote:
Originally Posted by Maftaca
Посмотреть сообщение
How it doesn't? lol, It is just this.
Quote:
Originally Posted by Maftaca
Посмотреть сообщение
it replies with 'Hello %s', And it is working nice. IF i add another text like 'Yo NickNPC, Anything awesome?'
He answers with 'Updates: blablabla'.

But right now, he replies with what YoNickNPC says and Yo NickNPC, Anything Awesome?', 2 in the same. Any help?
^^ that made no sense.. Your first saying if the player says: "Yo NickNPC, anything awesome?" the npc responds with:"'Updates: blablabla'." but then at the end your saying if the player says "Yo nicknpc" or "yo nicknpc anything awesome?" he replys with the same thing as "Hello %s".

^ that made no sense...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)