Jump to content
Posted
comment_1445981

Ik wou doen dat als je een item koopt dat er dn in een .txt word opgelsagen het vorige aantal -1.

Ik had dit maar het werkt niet. ook krijg ik de zin test niet die ik zonder dini_inset wel krijg:

if(strcmp(cmd, "/buylock", true) == 0)
{
	new str[128];
	new price1;
	price1 = dini_Int("/PropertySystem/Pricelist/247.txt", "Lockp");
	new amount1;
	amount1 = dini_Int("/PropertySystem/Pricelist/247.txt", "Locka");
if(PRID[playerid] == 1){
if (GetPlayerMoney(playerid) < price1){
if (amount1 == 0){SendClientMessage(playerid, 0x99FF66AA, "This item is out of stock");} else {

new it;
it = amount1-1;
dini_IntSet("/PropertySystem/Pricelist/247.txt", "Locka", it);
 SendClientMessage(playerid, 0xFF0000AA, "test!");
	}
}
}
	return 1;
}

Kan iemand me helpen om als je /buylock typt dat amount1 -1 gaat??

Featured Replies

comment_1447009

Ik wou doen dat als je een item koopt dat er dn in een .txt word opgelsagen het vorige aantal -1.

Ik had dit maar het werkt niet. ook krijg ik de zin test niet die ik zonder dini_inset wel krijg:

if(strcmp(cmd, "/buylock", true) == 0)
{
new price1;
price1 = dini_Int("PropertySystem/Pricelist/247.txt", "Lockp");
new amount1;
amount1 = dini_Int("PropertySystem/Pricelist/247.txt", "Locka");
if(PRID[playerid] == 1){
	if (GetPlayerMoney(playerid) < price1){
		if (amount1 == 0){
			SendClientMessage(playerid, 0x99FF66AA, "This item is out of stock");
		} 
		else {
			amount1--;
			dini_IntSet("/PropertySystem/Pricelist/247.txt", "Locka", it);
			SendClientMessage(playerid, 0xFF0000AA, "test!");
		}
}
}
return 1;
}

Probeer dit eens :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Recently Browsing 0

  • No registered users viewing this page.