announce command
#1

i want a public wich announce the command if any user type something like this
forward announcecmd(cmd);
public (cmd)
{
//something wich announce the command
SendCliendMessageToAll(//announce the cmd in this case "/area51")
}

if (strcmp("/area51", cmdtext, true, 10) == 0)
{
announcecmd();
}
Reply
#2

Quote:
Originally Posted by [SOB
Chris ]
i want a public wich announce the command if any user type something like this
forward announcecmd(cmd);
public (cmd)
{
//something wich announce the command
SendCliendMessageToAll(//announce the cmd in this case "/area51")
}

if (strcmp("/area51", cmdtext, true, 10) == 0)
{
announcecmd();
}
ask in script request thread if u just want it.
Reply
#3

Or search around.
Reply
#4

i want one idea for put the command in a variable, for print in the screen.

if (strcmp("/area51", cmdtext, true, 10) == 0)
{
announcecmd();
}
Reply
#5

Quote:
Originally Posted by [SOB
Chris ]
i want one idea for put the command in a variable, for print in the screen.

if (strcmp("/area51", cmdtext, true, 10) == 0)
{
announcecmd();
}
omg
if (strcmp("/area51", cmdtext, true, 10) == 0)
{
SendClientMessageToAll(0x21DD00FF,"/area51 got used.");
}
Reply
#6

D = yes but I want to say the name of the person who use to do that would have to use 3 lines of code for getplayername, format and finally for the sendcliendmessage, if I had 100 commands that would do 300 lines of code and by it want to do alone in a announcecmd (); for that the forward, and so I want to save these 300 lines of code.
Reply
#7

pawn Код:
if (strcmp("/area51", cmdtext, true, 10) == 0)
{
new playername = GetPlayerName(playerid, playername, sizeof(playername));
new stringg[30];
for(stringg, sizeof(stringg), "/area51 was used by %s", playername);
SendClientMessageToAll(0x21DD00FF, stringg);
}
Reply
#8

Quote:
Originally Posted by Giacomand
pawn Код:
if (strcmp("/area51", cmdtext, true, 10) == 0)
{
new playername = GetPlayerName(playerid, playername, sizeof(playername));
new stringg[30];
for(stringg, sizeof(stringg), "/area51 was used by %s", playername);
SendClientMessageToAll(0x21DD00FF, stringg);
}
do you mean "format" instead of "for"? lol
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)