SA-MP Forums Archive
how to make a Force Cmd? - 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: how to make a Force Cmd? (/showthread.php?tid=422686)



how to make a Force Cmd? - Maftaca - 14.03.2013

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?


Re: how to make a Force Cmd? - Bakr - 14.03.2013

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?).


AW: how to make a Force Cmd? - Blackazur - 14.03.2013

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.


Re: how to make a Force Cmd? - Maftaca - 15.03.2013

YCMD. No zCMD


Re: how to make a Force Cmd? - Ballu Miaa - 15.03.2013

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;
}



Re: how to make a Force Cmd? - Maftaca - 15.03.2013

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?


Re: how to make a Force Cmd? - Ballu Miaa - 15.03.2013

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.


Re: how to make a Force Cmd? - Denying - 15.03.2013

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


Re: how to make a Force Cmd? - Maftaca - 15.03.2013

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


Re: how to make a Force Cmd? - kamzaf - 15.03.2013

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...