/cmds command?
#1

hey guys... i wana make a /cmds command that shows cmds... anyone know how? cause im noob on scripting ^^
Reply
#2

use
https://sampwiki.blast.hk/wiki/ShowPlayerDialog
or
https://sampwiki.blast.hk/wiki/SendClientMessage
and read some tutorial about "how to create commands".
https://sampwiki.blast.hk/wiki/Creating_Commands
good luck
Reply
#3

pawn Код:
CMD:commands(playerid, params[])
{
    SendClientMessage(playerid, 0xFFFFFFFF, "Rule 1");
    SendClientMessage(playerid, 0xFFFFFFFF, "Rule 2");
    // Go on
    return 1;
}
You need ZCMD for this
Reply
#4

https://sampwiki.blast.hk/wiki/ShowPlayerDialog - showing dialog IMO looks the best, mainly because you don't get shit spamming your chat. my personal view only.
Reply
#5

just one thing...where should i paste this script? i mean in which line of my gamemode?
Код:
CMD:commands(playerid, params[])
{
    SendClientMessage(playerid, 0xFFFFFFFF, "Rule 1");
    SendClientMessage(playerid, 0xFFFFFFFF, "Rule 2");
    // Go on
    return 1;
}
Reply
#6

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
return 0;
}
Reply
#7

i got the script to make /cmds command but i want to know where should i write this script...i mean which line of gamemode
Reply
#8

inside this callback
https://sampwiki.blast.hk/wiki/OnPlayerCommandText
Reply
#9

between return 1 and return 0?
Reply
#10

its better read this:
https://sampwiki.blast.hk/wiki/Creating_Commands
it helps a lot
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)