Posts: 570
Threads: 55
Joined: Oct 2016
Hello guys, when i was testing a command Supported by sscanf it gives me
Unknown Command then i Checked Server.log i saw this
sscanf error: System not initialised.
What's problem and how do i can fix it?
Код:
Sorry For multi-asks
Posts: 570
Threads: 55
Joined: Oct 2016
Bump
Help
Posts: 928
Threads: 13
Joined: Feb 2016
Reputation:
0
Show the command at least.
Posts: 570
Threads: 55
Joined: Oct 2016
here it is:
PHP код:
#include <a_samp>
#include <zcmd>
#include <sscanf2>
#define grey 0x000FFFFF
#define lightred 0x00FFF0F
CMD:skin(playerid,params[])
{
new skin;
if(sscanf(params,"i",skin)) return SendClientMessage(playerid,grey,"Usage: /myskins (skinid)");
if(!IsValidSkin(skin)) return SendClientMessage(playerid,lightred,"[System]: Invalid skinID");
SetPlayerSkin(playerid,skin);
return 1;
}
stock IsValidSkin(SkinID)
{
if((SkinID >= 0 && SkinID <= 2)||(SkinID == 7)||(SkinID >= 9 && SkinID <= 41)||(SkinID >= 43 && SkinID <= 64)||(SkinID >= 66 && SkinID <= 73)||(SkinID >= 75 && SkinID <= 85)||(SkinID >= 87 && SkinID <= 118)||(SkinID >= 120 && SkinID <= 148)||(SkinID >= 150 && SkinID <= 207)||(SkinID >= 209 && SkinID <= 264)||(SkinID >= 274 && SkinID <= 288)||(SkinID >= 290 && SkinID <= 299)) return true;
else return false;
}
Posts: 570
Threads: 55
Joined: Oct 2016
Posts: 570
Threads: 55
Joined: Oct 2016
Dont tell me you did not had sscanf before & including it into script fixed the problem..............
Posts: 570
Threads: 55
Joined: Oct 2016
Quote:
Originally Posted by iLearner
Dont tell me you did not had sscanf before & including it into script fixed the problem..............
|
Nah bro, xd r you kidding me? i did already had sscanf Plugin and allthing but i don't why it wasn't working fine, but now after including this
PHP код:
#include <sscanf>
it's done.