how to make this cmd.....
#1

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?
Reply
#2

Use string & SendClientMessageToAll?
Reply
#3

So basically it's like /announce?
GameTextForAll
Reply
#4

basicly but only with SendclientMessagetoall

i tried few things but i got errors can you give me examples?
Reply
#5

You use dcmd?
Reply
#6

Код:
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;
}
Reply
#7

Thnx
Reply
#8

No problem, simple stuff
Reply
#9

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
Reply
#10

if(!IsPlayerInRangeOfPoint(playerid, 7.0, 322.0290,1121.3148,1083.882) return SendClientMessage(playerid,0xFFFFFFAA,"You can't use this here!");
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)