SA-MP Forums Archive
[FIXED]Help with my /write 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: [FIXED]Help with my /write command (/showthread.php?tid=563367)



[FIXED]Help with my /write command - Nabster - 15.02.2015

Код:
CMD:write(playerid,params[])
{
	new pText[128],string[128];
	if(PInfo[playerid][Level] < 4)
        return SendClientMessage(playerid,STEALTH_BLUE,"You need to be level 4 to write messages.");
        if(sscanf(params,pText))
	return SendClientMessage(playerid,STEALTH_BLUE,"USAGE: /write [text]");
	format(string,sizeof(string),"INFO:%s",pText);
	SendClientMessageToAll(COLOR_DARKORCHID,string);
	return 1;
}
When i use it,it shows [INFO]:


Re: Help with my /write command - AndySedeyn - 15.02.2015

You didn't define a specifier in your sscanf if-statement.

pawn Код:
if(sscanf(params, "s[128]", pText))



Re: Help with my /write command - nezo2001 - 15.02.2015

PHP код:
if(sscanf(params,"s[128]",pText)) 
Edit: Late


Re: Help with my /write command - Nabster - 15.02.2015

Wew thank you both for helping me. D