SA-MP Forums Archive
Help with sscanf again . - 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 sscanf again . (/showthread.php?tid=122412)



Help with sscanf again . - actiwe - 21.01.2010

I can't think any good title for this topic. So what i need...is to make command that does one thing if i use parameter and another thing if i dont use any of them.
I think you don't get what I mean..

lets say command
Код:
CMD:skinn(playerid, params[])
{
new otherid, skin;
if(sscanf(params, "ui", otherid, skin)) return //USAGE
If I enter the both paramaters it sets skin to some player.
But if I enter nothing..just only /skin and press enter he'll teleport me to somewhere.

This is just ugly example.



Re: Help with sscanf again . - MadeMan - 21.01.2010

Not related to sscanf. You probably have a wrong strcmp line somewhere in your OnPlayerCommandText. Do you have many commands with strcmp there? If you don't, post the code.

Also, are you using any filterscripts?


Re: Help with sscanf again . - actiwe - 21.01.2010

Ehm..I think you do not get me... I don't have any example to post also..so I do not have any commands in my gm couse i don't know how to do it and i don't know how to explain..


Re: Help with sscanf again . - MadeMan - 21.01.2010

Did you type /skin or /skinn ?


Re: Help with sscanf again . - actiwe - 21.01.2010

Ohow, i have mistake in my explanation.
Command is skin
It has optional paramters, if i do not enter them command just do something else.