ZitatAlles anzeigenif(strcmp(cmd,"/balance",true) == 0)
{
new playername[24];
GetPlayerName(playerid,playername,sizeof(playername));
new file[256];
format(file,sizeof(file),"/bank/%s.ini",udb_encode(playername));
if(!dini_Exists(file))
{
SendClientMessage(playerid,DarkGreen,"Du Besitz kein Bank Konto , Frag nach ein Bänker");
return 1;
}
if(!BankLogged[playerid])
{
SendClientMessage(playerid,DarkGreen,"Du bist in Kein Bank Acc eingelogt! Nutze /banklogin [password]");
return 1;
}
new balance=dini_Int(file,"balance");
format(file,sizeof(file),"Bank Startus : $%d",balance);
SendClientMessage(playerid,DarkGreen,file);
return 1;
}
if(strcmp(cmd,"/bankregister",true)==0)
{
new file[256];
new playername[24];
tmp=strtok(cmdtext,idx);
// if(PlayerInfo[playerid][pJob]==Bänker ||PlayerInfo[playerid][pJob2]==Bänker ||PlayerInfo[playerid][pJob3]==Bänker ||PlayerInfo[playerid][pJob4]==Bänker ||PlayerInfo[playerid][pJob5]==Bänker)
if(!strlen(tmp))
{
SendClientMessage(playerid,DarkGreen,"Nutze: /bankregister [password]");
return 1;
}
GetPlayerName(playerid,playername,sizeof(playername));
format(file,sizeof(file),"/bank/%s.ini",udb_encode(playername));
if(dini_Exists(file))
{
SendClientMessage(playerid,DarkGreen,"Die Bank Name/id ist beraits Vorhanden Bitte nemme ein anderenen");
return 1;
}
dini_Create(file);
dini_IntSet(file,"password",udb_hash(tmp));
dini_IntSet(file,"balance",-100);
BankLogged[playerid]=false;
SendClientMessage(playerid,DarkGreen,"Das Bank Konto Wurde Erfolgreich erstellt");
return 1;
}
if(strcmp(cmd,"/banklogin",true)==0)
{
tmp = strtok(cmdtext, idx);
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),"/bank/%s.ini",udb_encode(playername));
if(!dini_Exists(file))
{
SendClientMessage(playerid,DarkGreen,"Du hast kein Bank Konto , Frag nach einen Bänker Nach");
return 1;
}
if(BankLogged[playerid])
{
SendClientMessage(playerid,DarkGreen,"Du bist bereits in ein Bank Konto eingellogt");
return 1;
}
dini_IntSet(file,"password",udb_hash(tmp));
if(udb_hash(tmp))
{
BankLogged[playerid]=true;
SendClientMessage(playerid,DarkGreen,"Du bist Erfolgreich eingelogt!");
return 1;
}
else
{
SendClientMessage(playerid,DarkGreen,"Falsches Password!");
return 1;
}
}
if(strcmp(cmd,"/deposit",true)==0)
{
tmp = strtok(cmdtext, idx);
new playername[24];
new file[256];
new amount;
if(!strlen(tmp))
{
SendClientMessage(playerid,DarkGreen,"Nutze : /deposit [amount]");
return 1;
}
amount=strval(tmp);
GetPlayerName(playerid,playername,sizeof(playername));
format(file,sizeof(file),"/bank/%s.ini",udb_encode(playername));
if(!dini_Exists(file))
{
SendClientMessage(playerid,DarkGreen,"Du hast Kein Bank Konto , Frag nache einen Bänker");
return 1;
}
if(!BankLogged[playerid])
{
SendClientMessage(playerid,DarkGreen,"Du bist in Kein Bank Konto eingellogt,Nutze: /banklogin [password]");
return 1;
}
if(GetPlayerMoney(playerid) < amount amount <= 0)
{
SendClientMessage(playerid,DarkGreen,"Falsche Betrag");
return 1;
}
GivePlayerMoney(playerid,-amount);
new famount=dini_Int(file,"balance");
dini_IntSet(file,"balance",famount+amount);
format(file,sizeof(file),"Du Überweist $%d auf dein Bank Konto!",amount);
SendClientMessage(playerid,DarkGreen,file);
return 1;
}
if(strcmp(cmd,"/withdraw",true)==0)
{
tmp = strtok(cmdtext, idx);
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),"/bank/%s.ini",udb_encode(playername));
if(!dini_Exists(file))
{
SendClientMessage(playerid,DarkGreen,"Du hast Kein Bank Konto , Frag nache einen Bänker");
return 1;
}
if(!BankLogged[playerid])
{
SendClientMessage(playerid,DarkGreen,"Du bist in Kein Bank Konto eingellogt,Nutze: /banklogin [password]");
return 1;
}
new balance=dini_Int(file,"balance");
if(balance < amount amount <= 0)
{
SendClientMessage(playerid,DarkGreen,"Falscher Betrag!");
return 1;
}
GivePlayerMoney(playerid,amount);
dini_IntSet(file,"balance",balance-amount);
format(file,sizeof(file),"Du hast dir $%d von dein Konto abgebucht und bekommst es bar!",amount);
SendClientMessage(playerid,DarkGreen,file);
return 1;
}
if(strcmp(cmd,"/transfer",true)==0)
{
new playername[24];
new file[256];
new amount;
new victimid;
new victimname[24];
tmp=strtok(cmdtext,idx);
if(!strlen(tmp))
{
SendClientMessage(playerid,DarkGreen,"Nutze : /transfer [playerid] [amount]");
return 1;
}
victimid=strval(tmp);
tmp=strtok(cmdtext,idx);
if(!strlen(tmp))
{
SendClientMessage(playerid,DarkGreen,"Nutze : /transfer [playerid] [amount]");
return 1;
}
if(!IsPlayerConnected(victimid) playerid == victimid)
{
SendClientMessage(playerid,DarkGreen,"Ungültige Playerid!");
return 1;
}
amount=strval(tmp);
GetPlayerName(playerid,playername,sizeof(playername));
format(file,sizeof(file),"/bank/%s.ini",udb_encode(playername));
GetPlayerName(victimid,victimname,sizeof(victimname));
format(tmp,sizeof(tmp),"/bank/%s.ini",udb_encode(victimname));
if(!dini_Exists(file))
{
SendClientMessage(playerid,DarkGreen,"Du hast kein Bank Konto , frag nach ein Bänker Nach");
return 1;
}
if(!dini_Exists(tmp))
{
SendClientMessage(playerid,DarkGreen,"Die Spiele besitz kein Bank Konto!");
return 1;
}
if(!BankLogged[playerid])
{
SendClientMessage(playerid,DarkGreen,"Du bist in kein bank Konto eingellogt! Nutze /banklogin [password]");
return 1;
}
new pbalance=dini_Int(file,"balance");
new vbalance=dini_Int(tmp,"balance");
if(pbalance < amount amount <= 0)
{
SendClientMessage(playerid,DarkGreen,"Falscher Betrag!");
return 1;
}
dini_IntSet(file,"balance",pbalance-amount);
dini_IntSet(tmp,"balance",vbalance+amount);
format(file,sizeof(file),"Du überweist erfolgreich %d zu %s's Bank Konto!",amount,victimname);
SendClientMessage(playerid,DarkGreen,file);
format(file,sizeof(file),"%s hat dir %d auf dein Bank Konto überwisen!",playername,amount);
SendClientMessage(victimid,DarkGreen,file);
return 1;
C:\Users\King Refards\Desktop\Grand Theft Auto Server\gamemodes\RL.pwn(1146) : warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg")
C:\Users\King Refards\Desktop\Grand Theft Auto Server\gamemodes\RL.pwn(3591) : error 021: symbol already defined: "strtok"
C:\Users\King Refards\Desktop\Grand Theft Auto Server\gamemodes\RL.pwn(3606) : error 047: array sizes do not match, or destination array is too small
C:\Users\King Refards\Desktop\Grand Theft Auto Server\gamemodes\RL.pwn(3609) : warning 235: public function lacks forward declaration (symbol "OnPlayerInfoChange")
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.