How to make a simple 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)
+--- Thread: How to make a simple announce command ? (
/showthread.php?tid=490396)
How to make a simple announce command ? -
Le3aT - 26.01.2014
Hey, I want to know how to make a simple announce command like when i make /a [Text]
It shows to all players a text on their screen
Like /a Hello.
It will show them Hello.
Re: How to make a simple announce command ? -
rakshith122 - 26.01.2014
pawn Код:
dcmd_a(playerid,params[])
{
new string[128];
if(!strlen(params))
{
SendClientMessage(playerid,COLOR_ERROR,"USAGE: /a [Text]";)
return 1;
}
format(string,sizeof(string),"%s",params);
GameTextForAll(string,7000,3);
return 1;
}
Re: How to make a simple announce command ? -
gtaplayer1 - 26.01.2014
Quote:
Originally Posted by rakshith122
pawn Код:
dcmd_a(playerid,params[]) { new string[128]; if(!strlen(params)) { SendClientMessage(playerid,COLOR_ERROR,"USAGE: /a) [Text]";) return 1; } format(string,sizeof(string),"%s",params); GameTextForAll(string,7000,3); return 1; }
|
Won't this only catch the first word after /a?
Re: How to make a simple announce command ? -
rakshith122 - 26.01.2014
oops, Looks like I added an ")".
Edited, Thanks.
Re: How to make a simple announce command ? -
Le3aT - 26.01.2014
Can i make it for only 1 Score players ? How can i edit the score though
Re: How to make a simple announce command ? -
Konstantinos - 26.01.2014
It can be slightly improved.
pawn Код:
CMD:a(playerid, params[])
{
if (!IsPlayerAdmin(playerid)) return 1;
if (isnull(params)) return SendClientMessage(playerid, -1, "Usage: /a <text>");
GameTextForAll(params, 4000, 4);
return 1;
}
Quote:
Originally Posted by Le3aT
Can i make it for only 1 Score players ? How can i edit the score though
|
I don't get what you mean.
Re: How to make a simple announce command ? -
Le3aT - 26.01.2014
Thanks
Re: How to make a simple announce command ? -
Beckett - 26.01.2014
You want when the player is Score 1 and above can do it? or only score 1?