SA-MP Forums Archive
Little problem :) - 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: Little problem :) (/showthread.php?tid=598613)



Little problem :) - Mikeydoo - 15.01.2016

Hey guys I was just wondering what my mistake was.. I created a command that somehow gives the player random amount items as gifts and I want the player to know how much he got by sending him a sentence.

The one with the giftmoneygold works it says exactly how much it gives.

The one with the giftplankgold doesnt work. It gives the right random amount but the sentence just doesnt show up.

Here are the defines
Код:
new string[128];
	new giftmoneysilver = random(999) + 1;//silver vip gift
	new giftplankgold = random(1999) + 1;//gold vip gift
	new giftmoneygold = random(1999) + 1;//gold vip gift
	new giftmoneyplat = random(2999) + 1;//plat vip gift
	new giftplankplat = random(2999) + 1;//plat vip gift
	new giftmats = random(2999) + 1;//plat vip gift
Код:
   		GivePlayerMoney(playerid, giftmoneygold);
   		format(string,sizeof string,"You opened the Gold VIP gift and found %d $", giftmoneygold);
   		PlayerInfo[playerid][pPlanks] += giftplankgold;
   		format(string,sizeof string,"You opened the Gold VIP gift and found %d planks", giftplankgold);
Any help is highly appreciated !


Re: Little problem :) - d1git - 15.01.2016

Код:
new string2[128];
format(string2, sizeof(string2), "You opened the Gold VIP gift and found %d planks", giftplankgold);
SendClientMessage(playerid, -1, string2);



Re: Little problem :) - Mikeydoo - 15.01.2016

oh really ? that simple ?... Should'have thought 'bout it ..Thanks a lot , rep !