command in command
#1

for example :
when player write /Full
its will do the commands /Life+/Armor
tnx
Reply
#2

https://sampwiki.blast.hk/wiki/SetPlayerHealth
https://sampwiki.blast.hk/wiki/SetPlayerArmour
Reply
#3

Quote:
Originally Posted by noamch1997
Посмотреть сообщение
for example :
when player write /Full
its will do the commands /Life+/Armor
tnx
so what you want is a command which executes 2 other commands?
easy, we use Command_ReProcess

pawn Код:
#include "a_samp"
#include "YSI\y_commands"

YCMD:life(playerid,params[],help)
{
    SendClientMessage(playerid,-1,"LIFE");
    return 1;
}

YCMD:armor(playerid,params[],help)
{
    SendClientMessage(playerid,-1,"ARMOR");
    return 1;
}

YCMD:full(playerid,params[],help)
{
    Command_ReProcess(playerid, "/life", false);
    Command_ReProcess(playerid, "/armor", false);
    return 1;
}
now once you tyspe /full you will see both messages.
tested & works.
Reply
#4

You can do what @CutX said.

Tell me that they make their commands.

pawn Код:
#include <a_samp>
#include <zcmd>

command(full, playerid, params[])
{
    #pragma unused params
    SetPlayerHealth(playerid, 100.0);
    SetPlayerArmour(playerid, 100.0);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)