SA-MP Forums Archive
help with business - 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)
+--- Thread: help with business (/showthread.php?tid=652536)



help with business - scripter112 - 13.04.2018

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


Re: help with business - Mugala - 13.04.2018

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


Re: help with business - Nyzenic - 14.04.2018

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

example:
/createbiz 2 5 100