announce command - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: announce command (
/showthread.php?tid=96486)
announce command -
[SOB]Chris - 08.09.2009
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();
}
Re: announce command -
saiberfun - 08.09.2009
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.
Re: announce command -
Correlli - 08.09.2009
Or search around.
Re: announce command -
[SOB]Chris - 08.09.2009
i want one idea for put the
command in a variable, for print in the screen.
if (strcmp(
"/area51", cmdtext, true, 10) == 0)
{
announcecmd();
}
Re: announce command -
saiberfun - 08.09.2009
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.");
}
Re: announce command -
[SOB]Chris - 08.09.2009
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.
Re: announce command -
Giacomand - 08.09.2009
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);
}
Re: announce command -
ilikepie2221 - 08.09.2009
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