help with business
#1

Hello guys i have problem with this command

Код:
if(strcmp(cmd,"/createbiz",true)==0)
	{
	    new type,price,payout;
	    new Float:pX,Float:pY,Float:pZ;
	    if(sscanf(params,"iii",type,price,payout)) return SendClientMessage(playerid,-1,"Използвай: /createbizz [type][price][payout]");
	    bizid += 1;
	    GetPlayerPos(playerid,pX,pY,pZ);
		new biz[256];
	    format(biz,sizeof(biz),"Businesses/%d.ini",bizid);
	    if(!dini_Exists(biz))
	    {
	        dini_Create(biz);
	        dini_Set(biz,"Owner","Няма");
		   	dini_BoolSet(biz,"Owned",0);
		   	dini_IntSet(biz,"Type",type);
		   	dini_IntSet(biz,"Price",price);
		   	dini_IntSet(biz,"PayOut",payout);
		   	dini_FloatSet(biz,"Xcoord",pX);
		   	dini_FloatSet(biz,"Ycoord",pY);
		   	dini_FloatSet(biz,"Zcoord",pZ);
		   	dini_BoolSet(biz,"Locked",0);
	        LoadEBizz(bizid);
	    }
		SendClientMessage(playerid,-1,"Bizz has been created");
	    return 1;
	}
Can someone help me ?
When i type /createbiz type price payout it returns "Използвай: /createbizz [type][price][payout]

Here is my code https://pastebin.com/Siud3qNr
Reply
#2

code is correct, check server logs for sscanf warnings or errors.
Reply
#3

Are your params all integers/whole numbers when you typed the command?

example:
/createbiz 2 5 100
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)