Help with /Announce. - 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: Help with /Announce. (
/showthread.php?tid=253321)
Help with /Announce. -
Type-R - 05.05.2011
Hi, i created a command /announce in which you say something and it appears as gametext. It works fine, but the problem i can't fix is it shows Unknown Command even that it is working fine. Here's the script:
Код:
COMMAND:announce(playerid, params[])
{
new announce1, string[150];
if(ALygis[playerid] >= 5)
{
if(sscanf(params,"s",announce1))
{
SendClientMessage(playerid,orandzine,"{FBDF89}[FunZoneLT]>> /announce [pranesimas]");
}
format( string, sizeof(string), "~g~%s", announce1);
GameTextForAll( string, 6000, 3 );
}
else
{
SendClientMessage(playerid,raudona,"[FunZoneLT]>> Jus negalite naudoti sitos komandos.");
}
return 1;
}
Does anyone know how to fix this?
Re: Help with /Announce. - Deskoft - 05.05.2011
Mhm, that should work, are you sure you typed "gmx" on the server console a.k.a. did you restart your server?
Re: Help with /Announce. -
Type-R - 06.05.2011
Everthing works just fine, but the problem is that it shows me a message Unknown Command even though it works fine. If i type /announce a its fine, but if there's more characters like /announce aaaaaaaaaaaaaaaaaaaa it shows the game text, but it shows unknown command to...
Respuesta: Help with /Announce. -
Alex_Obando - 06.05.2011
pawn Код:
CMD:announce(playerid, params[])
{
if(!IsPlayerAdminEx(playerid)) return NotAdmin(playerid);
new text[256];
if(sscanf(params, "s[256]",text))
{
return SendClientMessage(playerid, COLOR_YELLOW, "Usage: /announce [text]");
}
GameTextForAll(text,3000,5);
return 1;
}
Respuesta: Help with /Announce. -
Alex_Obando - 06.05.2011
Or Just add a
Re: Help with /Announce. -
Type-R - 06.05.2011
Thank you it works!