SA-MP Forums Archive
Idea? - 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: Idea? (/showthread.php?tid=617760)



Idea? - StR_MaRy - 26.09.2016

hey guys i need to make this command to give like every single message that the owner type in after /anunt text

not like 1 row i need 1-2 more if the text is longer but in a dialog if you see i want to give everyone a message on a dialog

Код HTML:
CMD:anunt(playerid,params[])
{
	if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login pin.");
    if(IsPlayerConnected(playerid))
    {
		if (PlayerInfo[playerid][pAdmin] >= 6)
		{
			new string[250], result[250], sendername[25],string2[1000], coordsstring[1000];
			if(sscanf(params, "s[250]",result)) return SendClientMessage(playerid, COLOR_WHITE, "{FFFFFF}Syntax: {FFFFFF}/o <Message>");
	   		GetPlayerName(playerid, sendername, sizeof(sendername));
	    	if(PlayerInfo[playerid][pAdmin] >= 6)
			{
				format(coordsstring, sizeof(coordsstring), "{FF0000}%s: {FFFFFF}%s\n\n", sendername, result));
	    		strcat(string2,coordsstring);
				ShowPlayerDialog(giveplayerid, 543423423434, DIALOG_STYLE_MSGBOX, "Anunt de ultima ora", string2, "OK", "" );
			}
			OBroadCast(COLOR_RED2,string,1);
        }
		else return SendClientMessage(playerid, COLOR_ERROR, AdminOnly);
	}
	return 1;
}
some idea's ?