SA-MP Forums Archive
SendClientMessage and sscanf - 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: SendClientMessage and sscanf (/showthread.php?tid=449554)



SendClientMessage and sscanf - dominik523 - 09.07.2013

Hey! I have no idea why my code won't show these two lines of text
Код:
   	if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
	// SFPD
	if(IsACop(playerid)) SendClientMessage(playerid, COLOR_YELLOW, "SFPD: {FFFFFF}/r /d /m /tazer /cuff /legcuff /drunktest /uncuff /detain /track /door /gate /locker /showbadge /frisk /createspike /removespike /removespikes");
    if(IsACop(playerid)) SendClientMessage(playerid, COLOR_YELLOW, "SFPD: {FFFFFF}/bk /cbk /checkload /siren /ticket /flashlights /wanted /mdc /drag /su /arrest /members /quitfaction");
My code only shows the first SendClientMessage
And is this [32] in the code length of string?
Код:
if(sscanf(params, "s[32]", params))



Re: SendClientMessage and sscanf - dominik523 - 09.07.2013

well, on the top of the command is:
Код:
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
	// SFPD
and its not returning "You need to login first..."


Re: SendClientMessage and sscanf - dominik523 - 09.07.2013

I also tried this, and it wont work:
Код:
if(IsACop(playerid))
	{
		SendClientMessage(playerid, COLOR_YELLOW, "SFPD: {FFFFFF}/r /d /m /tazer /cuff /legcuff /drunktest /uncuff /detain /track /door /gate /locker /showbadge /frisk /createspike /removespike /removespikes");
    	SendClientMessage(playerid, COLOR_YELLOW, "SFPD: {FFFFFF}/bk /cbk /checkload /siren /ticket /flashlights /wanted /mdc /drag /su /arrest /members /quitfaction");
	}



Re: SendClientMessage and sscanf - dominik523 - 09.07.2013

FIXED
Text in sendclientmessage was too long.