Help with sscanf again .
#1

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.
Reply
#2

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?
Reply
#3

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..
Reply
#4

Did you type /skin or /skinn ?
Reply
#5

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)