[Pomoc]Spremanje para


Započeo [BC]spiele, Jul 11, 2011, 00:00:23 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: GF
Detaljan opis problema: Kako kad igrac kad kuca komandu /spremi  da mu se svi novci koji su kod njega spreme u banku.
Dio skripte: nezz sza da stavim ali evo vam /deposit komanda.
if( strcmp(cmd, "/deposit", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(PlayerInfo[playerid][pLocal] != 103)
	        {
	            SendClientMessage(playerid, COLOR_GREY, "   Niste u banci !");
	            return 1;
	        }
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "KORISTITE: /bank [kolicina]");
				format(string, sizeof(string), " Imate $%d na bankovnom racunu.", PlayerInfo[playerid][pAccount]);
				SendClientMessage(playerid, COLOR_GRAD3, string);
				return 1;
			}
			new cashdeposit = strval(tmp);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "KORISTITE: /bank [kolicina]");
				format(string, sizeof(string), "  Imate $%d na bankovnom racunu.", PlayerInfo[playerid][pAccount]);
				SendClientMessage(playerid, COLOR_GRAD3, string);
				return 1;
			}
			if (cashdeposit > GetPlayerMoney(playerid) || cashdeposit < 1)
			{
				SendClientMessage(playerid, COLOR_GRAD2, "   Nemate toliko novaca");
				return 1;
			}
			GivePlayerMoney(playerid,-cashdeposit);
			new curfunds = PlayerInfo[playerid][pAccount];
			PlayerInfo[playerid][pAccount]=cashdeposit+PlayerInfo[playerid][pAccount];
			SendClientMessage(playerid, COLOR_WHITE, "|___ BANKOVNA IZJAVA ___|");
			format(string, sizeof(string), "  Staro stanje: $%d", curfunds);
			SendClientMessage(playerid, COLOR_GRAD2, string);
			format(string, sizeof(string), "  Uplaceno: $%d",cashdeposit);
			SendClientMessage(playerid, COLOR_GRAD4, string);
			SendClientMessage(playerid, COLOR_GRAD6, "|-----------------------------------------|");
			format(string, sizeof(string), "  Novcano stanje: $%d", PlayerInfo[playerid][pAccount]);
			SendClientMessage(playerid, COLOR_WHITE, string);
			return 1;
		}
		return 1;
	}

Neke slike/video za lakse dobivanje pomoci(neobavezno):/
Poslednja Izmena: Jul 11, 2011, 00:00:46 PRE PODNE od [BC]spiele


slika by NaNx


www.balkan-city.info
vidi vise i osjeti razliku