02.04.2011, 12:55
Has someone made/could make a include of function to return command parameters? I always have and always will find sscanf to confusing!
I'm not really sure how to explain this, but here is a example!
Where p1 stands for the first parameter, and p2 stands for the seconds parameter.
And you can add it to your script using something like this, or whatever the include is called!
I'm not really sure how to explain this, but here is a example!
pawn Код:
CMD:healplayer(playerid, params[])
{
SetPlayerHealth(p1, 100.0); //so you type "/healplayer 2" and it heals player 2...
return 1;
}
pawn Код:
CMD:sethealth(playerid, params[])
{
SetPlayerHealth(p1, p2); //so you type "/healplayer 2 50" and it sets player 2's health to 50%
return 1;
}
pawn Код:
#include <params>