[DONE]DUDB : Made Admin System & Everything is working this time withdraw isnt
#2

Pawn -> case sensitive.

You create a new array: Amout[255] and later on write it without a capital `A`.

You also got one curly brace too much.

Note that you could have seen that yourself by just reading the error messages.

Here`s the correct code:

Код:
dcmd_withdraw(playerid,params[])
{
	if (!udb_Exists(PlayerName(playerid))) 
		return PlayerMsg(playerid,red,"You Must Be Registerd!");
	if (udb_UserInt(PlayerName(playerid),"LoggedIn")== 0) 
		return PlayerMsg(playerid,red,"You Must Be Logged In!");
	if (strlen(params)==0) 
		return PlayerMsg(playerid,red,"USAGE : '/withdraw howmuch'");
	new Amout[255];
	Amout = strval(params);
	if (Amout > udb_UserInt(PlayerName(playerid)"BankMoney")) 
		return PlayerMsg(playerid,red,"Invalid Amout!");
	else {
		PlayerMsg(playerid,red,"THX For Useing The Bank!");
		GivePlayerMoney(playerid,strval(params));
		udb_UserSetInt(PlayerName(playerid),"BankMoney",udb_UserInt(PlayerName(playerid),"BankMoney")-strval(params));
		return 0;
	}
	return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)