hii,
leute ich brauch ein Bank script
wo mann sein geld legen
kann
z.b. /ein summe
/aus summe
/konto
wo kann ich das finden
hii,
leute ich brauch ein Bank script
wo mann sein geld legen
kann
z.b. /ein summe
/aus summe
/konto
wo kann ich das finden
Ich brauche auch sowas, aber in JEDEM 24/7 shop.
OHNE bugs man sollte darein gehen und dann sollte man die befehle:
/einzahlen [SUMME]
/abheben [SUMME]
/konto (SUMME die auf dem KONTO ist sollte man dann sehen)
Das geld sollte da gespeichert werden und nach einem RC gmx server neustart immernoch drauf sein!
bitte um hilfe
ich hab eins von g_Admin da ist ein bank in jedem shop
musst zum automat gehen
und wo bekomme ich das bank system her?
Ich will eine Bank in einem laden
keine automaten^^
Zitat von MaSSaKag_Admin
Falsch gescrieben, kann man aber ohne dieses "-" einfach in die Sufu eingeben -.-
Ergebnis:
FILTERSCRIPT gAdmin 0.9b | 92(+25) Commands | Many Features | Update: 18th March
Übrigens:
Goldkiller ist der Autor, somit müssen Credits drinne beliebn
Maxx
und wie finde ich in den ganzen befehlen das bank sytem?^^
Pawn Code durchlesen FTW
Falls du jetzt noch auf die Idee kommen solltest, mich zu fragen, was denn FTW heisst:
for the win, zu Deutsch Für den Gewinn.
Maxx
habe jezz n banscript gefunden, jetzt eine frage:
if(GetPlayerInterior(playerid) == interiorid && PlayerToPoint(...)
wo muss ich das hinmachen wenn ich nur in diesem interrior diese befehle machen kann:
if(strcmp(cmd,"/balance",true) == 0)
{
new playername[24];
GetPlayerName(playerid,playername,sizeof(playername));
new file[256];
format(file,sizeof(file),"/XcBankAccs/%s.xcu",udb_encode(playername));
if(!dini_Exists(file))
{
SendClientMessage(playerid,DarkGreen,"You don't have a bank account! Use /bankregister [password]");
return 1;
}
if(!BankLogged[playerid])
{
SendClientMessage(playerid,DarkGreen,"You are not logged in! Use /banklogin [password]");
return 1;
}
new balance=dini_Int(file,"balance");
format(file,sizeof(file),"Bank Balance : $%d",balance);
SendClientMessage(playerid,DarkGreen,file);
return 1;
}
if(strcmp(cmd,"/bankregister",true)==0)
{
new tmp[256];
new file[256];
new playername[24];
tmp=strtok(cmdtext,idx);
if(!strlen(tmp))
{
SendClientMessage(playerid,DarkGreen,"USAGE : /bankregister [password]");
return 1;
}
GetPlayerName(playerid,playername,sizeof(playername));
format(file,sizeof(file),"/XcBankAccs/%s.xcu",udb_encode(playername));
if(dini_Exists(file))
{
SendClientMessage(playerid,DarkGreen,"A bank account is already registered under this name! Use /banklogin [password]");
return 1;
}
dini_Create(file);
dini_IntSet(file,"password",udb_hash(tmp));
dini_IntSet(file,"balance",-100);
BankLogged[playerid]=false;
SendClientMessage(playerid,DarkGreen,"You have successfully registered a bank account! Use /banklogin [password] to login into the bank account!");
return 1;
}
if(strcmp(cmd,"/banklogin",true)==0)
{
new tmp[256];
new playername[24];
new file[256];
tmp=strtok(cmdtext,idx);
if(!strlen(tmp))
{
SendClientMessage(playerid,DarkGreen,"USAGE : /banklogin [password]");
return 1;
}
GetPlayerName(playerid,playername,sizeof(playername));
format(file,sizeof(file),"/XcBankAccs/%s.xcu",udb_encode(playername));
if(!dini_Exists(file))
{
SendClientMessage(playerid,DarkGreen,"You do not have a bank account! Use /bankregister [password]");
return 1;
}
if(BankLogged[playerid])
{
SendClientMessage(playerid,DarkGreen,"You are already banklogged, dummy!");
return 1;
}
new fpass;
fpass=dini_Int(file,"password");
if(fpass == udb_hash(tmp))
{
BankLogged[playerid]=true;
SendClientMessage(playerid,DarkGreen,"You have successfully logged in!");
return 1;
}
else
{
SendClientMessage(playerid,DarkGreen,"Invalid password!");
return 1;
}
}
if(strcmp(cmd,"/deposit",true)==0)
{
new tmp[256];
new playername[24];
new file[256];
new amount;
tmp=strtok(cmdtext,idx);
if(!strlen(tmp))
{
SendClientMessage(playerid,DarkGreen,"USAGE : /deposit [amount]");
return 1;
}
amount=strval(tmp);
GetPlayerName(playerid,playername,sizeof(playername));
format(file,sizeof(file),"/XcBankAccs/%s.xcu",udb_encode(playername));
if(!dini_Exists(file))
{
SendClientMessage(playerid,DarkGreen,"You do not have a bank account! Use /bankregister [password]");
return 1;
}
if(!BankLogged[playerid])
{
SendClientMessage(playerid,DarkGreen,"You are not banklogged! USe /banklogin [password]");
return 1;
}
if(GetPlayerMoney(playerid) < amount || amount <= 0)
{
SendClientMessage(playerid,DarkGreen,"Invalid transaction amount!");
return 1;
}
GivePlayerMoney(playerid,-amount);
new famount=dini_Int(file,"balance");
dini_IntSet(file,"balance",famount+amount);
format(file,sizeof(file),"You have deposited $%d in your bank account!",amount);
SendClientMessage(playerid,DarkGreen,file);
return 1;
}
if(strcmp(cmd,"/withdraw",true)==0)
{
new tmp[256];
new playername[24];
new file[256];
new amount;
tmp=strtok(cmdtext,idx);
if(!strlen(tmp))
{
SendClientMessage(playerid,DarkGreen,"USAGE : /withdraw [amount]");
return 1;
}
amount=strval(tmp);
GetPlayerName(playerid,playername,sizeof(playername));
format(file,sizeof(file),"/XcBankAccs/%s.xcu",udb_encode(playername));
if(!dini_Exists(file))
{
SendClientMessage(playerid,DarkGreen,"You do not have a bank account! Use /bankregister [password]");
return 1;
}
if(!BankLogged[playerid])
{
SendClientMessage(playerid,DarkGreen,"You are not banklogged! USe /banklogin [password]");
return 1;
}
new balance=dini_Int(file,"balance");
if(balance < amount || amount <= 0)
{
SendClientMessage(playerid,DarkGreen,"Invalid transaction amount!");
return 1;
}
GivePlayerMoney(playerid,amount);
dini_IntSet(file,"balance",balance-amount);
format(file,sizeof(file),"You have withdrew $%d from your bank account!",amount);
SendClientMessage(playerid,DarkGreen,file);
return 1;
}
if(strcmp(cmd,"/transfer",true)==0)
{
new tmp[256];
new playername[24];
new file[256];
new amount;
new victimid;
new victimname[24];
tmp=strtok(cmdtext,idx);
if(!strlen(tmp))
{
SendClientMessage(playerid,DarkGreen,"USAGE : /transfer [playerid] [amount]");
return 1;
}
victimid=strval(tmp);
tmp=strtok(cmdtext,idx);
if(!strlen(tmp))
{
SendClientMessage(playerid,DarkGreen,"USAGE : /transfer [playerid] [amount]");
return 1;
}
if(!IsPlayerConnected(victimid) || playerid == victimid)
{
SendClientMessage(playerid,DarkGreen,"Invalid Player ID!");
return 1;
}
amount=strval(tmp);
GetPlayerName(playerid,playername,sizeof(playername));
format(file,sizeof(file),"/XcBankAccs/%s.xcu",udb_encode(playername));
GetPlayerName(victimid,victimname,sizeof(victimname));
format(tmp,sizeof(tmp),"/XcBankAccs/%s.xcu",udb_encode(victimname));
if(!dini_Exists(file))
{
SendClientMessage(playerid,DarkGreen,"You do not have a bank account! Use /bankregister [password]");
return 1;
}
if(!dini_Exists(tmp))
{
SendClientMessage(playerid,DarkGreen,"The specified player ID doesn't have a bank account!");
return 1;
}
if(!BankLogged[playerid])
{
SendClientMessage(playerid,DarkGreen,"You are not banklogged! USe /banklogin [password]");
return 1;
}
new pbalance=dini_Int(file,"balance");
new vbalance=dini_Int(tmp,"balance");
if(pbalance < amount || amount <= 0)
{
SendClientMessage(playerid,DarkGreen,"Invalid transaction amount!");
return 1;
}
dini_IntSet(file,"balance",pbalance-amount);
dini_IntSet(tmp,"balance",vbalance+amount);
format(file,sizeof(file),"You have successfully tranfered %d to %s's bank account!",amount,victimname);
SendClientMessage(playerid,DarkGreen,file);
format(file,sizeof(file),"%s has sent %d in your bank account!",playername,amount);
SendClientMessage(victimid,DarkGreen,file);
return 1;
}
ich weiß echt nicht weiter
Du musst PlayerToPoint erst definieren, und benutze einen Expander bitte
ehm..
Du weißt doch was ich von diesen "fachausdrücken" halte xD
danke für die atms .... qehen perfekt
Wenn mir einer helfen wil mit dem 24/7 shop und der bank kann mir ne PN schreiben.