SA-MP Forums Archive
[HELP]/announce problem (comes twice) - 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: [HELP]/announce problem (comes twice) (/showthread.php?tid=470442)



[HELP]/announce problem (comes twice) - lottoboy - 18.10.2013

so here's my code, everytime I do /announce it comes up twice! please fix it


Quote:

dcmd_announce(playerid,params[])
{
if(PlayerInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid))
{
if(!strlen(params)) return SendClientMessage(playerid,red,"USAGE: /announce <text>");
CMDMessageToAdmins(playerid,"ANNOUNCE");
new string[100];
format(string, sizeof(string), "~w~%s", params);
return GameTextForAll(string, 9000, 0);
} else return SendClientMessage(playerid,red,"Unknown command. Type /cmds to see a list of available commands.");
}




Re: [HELP]/announce problem (comes twice) - qazwsx - 18.10.2013

Quote:
Originally Posted by lottoboy
Посмотреть сообщение
so here's my code, everytime I do /announce it comes up twice! please fix it
Try this:

pawn Код:
dcmd_announce(playerid,params[])
{
if(PlayerInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid))
{
if(!strlen(params)) return SendClientMessage(playerid,red,"USAGE: /announce <text>");
CMDMessageToAdmins(playerid,"ANNOUNCE");
new string[100];
format(string, sizeof(string), "~w~%s", params);
GameTextForAll(string, 9000, 0);
} else return SendClientMessage(playerid,red,"Unknown command. Type /cmds to see a list of available commands.");
}



Re: [HELP]/announce problem (comes twice) - lottoboy - 18.10.2013

Quote:
Originally Posted by qazwsx
Посмотреть сообщение
Try this:

pawn Код:
dcmd_announce(playerid,params[])
{
if(PlayerInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid))
{
if(!strlen(params)) return SendClientMessage(playerid,red,"USAGE: /announce <text>");
CMDMessageToAdmins(playerid,"ANNOUNCE");
new string[100];
format(string, sizeof(string), "~w~%s", params);
GameTextForAll(string, 9000, 0);
} else return SendClientMessage(playerid,red,"Unknown command. Type /cmds to see a list of available commands.");
}
still getting the same problem.


Re: [HELP]/announce problem (comes twice) - Smally - 18.10.2013

What exactly happens? it appears then flashes then reappears?


Re: [HELP]/announce problem (comes twice) - Konstantinos - 18.10.2013

Change the text style (https://sampwiki.blast.hk/wiki/GameTextStyle).