how to make this 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: how to make this cmd..... (
/showthread.php?tid=147895)
how to make this cmd..... -
hardstop - 14.05.2010
i want to make a command like if you type /broadcast (your text)
then it will be shown to all players how can i do like that?
Re: how to make this cmd..... -
Assyria - 14.05.2010
Use string & SendClientMessageToAll?
Re: how to make this cmd..... -
ViruZZzZ_ChiLLL - 14.05.2010
So basically it's like /announce?
GameTextForAll
Re: how to make this cmd..... -
hardstop - 14.05.2010
basicly but only with SendclientMessagetoall
i tried few things but i got errors can you give me examples?
Re: how to make this cmd..... -
Killa_ - 14.05.2010
You use dcmd?
Re: how to make this cmd..... -
Assyria - 14.05.2010
Код:
dcmd_broadcast(playerid, params[])
{
if(!strlen(params)) return SendClientMessage(playerid, 0xFFFFFFAA, "/broadcast [text]");
new string[128];
format(string,sizeof(string),"%s",params);
SendClientMessageToAll(0xFFFFFFAA,string);
return 1;
}
Re: how to make this cmd..... -
hardstop - 14.05.2010
Thnx
Re: how to make this cmd..... -
Assyria - 14.05.2010
No problem, simple stuff
Re: how to make this cmd..... -
hardstop - 14.05.2010
i added this
Код:
dcmd_raadio(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, 322.0290,1121.3148,1083.8828))
if(!strlen(params)) return SendClientMessage(playerid, 0xFFFFFFAA, "/raadio [tekst]");
new string[128];
format(string,sizeof(string),"[Raadio] %s",params);
SendClientMessageToAll(ROHELINE,string);
return 1;
}
but still i can use this cmd everywhere :S
Re: how to make this cmd..... -
Assyria - 14.05.2010
if(!IsPlayerInRangeOfPoint(playerid, 7.0, 322.0290,1121.3148,1083.882

) return SendClientMessage(playerid,0xFFFFFFAA,"You can't use this here!");