Yes but i dont know which code? They say sometimes at /pay
Sometimes at /bank
Hier is Code of /pay
if(strcmp(cmd, "/pay", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "Benutze: /pay [playerid/PartOfName] [Betrag]");
return 1;
}
//giveplayerid = strval(tmp);
giveplayerid = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "Benutze: /pay [playerid/PartOfName] [Betrag]");
return 1;
}
moneys = strval(tmp);
if(moneys > 1000 && PlayerInfo[playerid][pLevel] < 3)
{
SendClientMessage(playerid, COLOR_GRAD1, "Du musst Level 3 sein um mehr als 1000 zahlen zu kцnnen");
return 1;
}
if(moneys < 1 || moneys > 10000)
{
SendClientMessage(playerid, COLOR_GRAD1, "Nicht unter 1, oder ьber 10000.");
return 1;
}
if (IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(PlayerInfo[giveplayerid][pLocal] == 106)
{
SendClientMessage(playerid, COLOR_GRAD1, "Dieser Befehl ist hier nicht erlaubt");
return 1;
}
if (ProxDetectorS(5.0, playerid, giveplayerid))
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
playermoney = GetPlayerMoney(playerid);
if (moneys > 0 && playermoney >= moneys)
{
ConsumingMoney[giveplayerid] = 1;
GivePlayerMoney(playerid, (0 - moneys));
GivePlayerMoney(giveplayerid, moneys);
format(string, sizeof(string), " Du gibst %s(player: %d), $%d.", giveplayer,giveplayerid, moneys);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
SendClientMessage(playerid, COLOR_GRAD1, string);
format(string, sizeof(string), " Du erhдlst $%d von %s(player: %d).", moneys, sendername, playerid);
SendClientMessage(giveplayerid, COLOR_GRAD1, string);
format(string, sizeof(string), "%s bezahlt $%d an %s", sendername, moneys, giveplayer);
PayLog(string);
if(moneys >= 1000000)
{
ABroadCast(COLOR_YELLOW,string,1);
}
PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "* %s nimmt etwas Geld und gibt es %s.", sendername ,giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Ungьltige Transaktion Betrag.");
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Spieler nicht in der Nдhe.");
}
}//invalid id
}
else
{
format(string, sizeof(string), " %d ist kein aktiver Spieler.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}
Code of /bank
if(strcmp(cmd, "/bank", true) == 0 || strcmp(cmd, "/deposit", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pLocal] != 103)
{
SendClientMessage(playerid, COLOR_GREY, " Du bist in keiner Bank !");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /bank [Betrag]");
format(string, sizeof(string), " Du besitzt $%d auf dem Konto.", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new cashdeposit = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /bank [Betrag]");
format(string, sizeof(string), " Du besitzt $%d auf dem Konto.", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
if (cashdeposit > GetPlayerMoney(playerid) || cashdeposit < 1)
{
SendClientMessage(playerid, COLOR_GRAD2, " Du besitzt nicht soviel Geld");
return 1;
}
GivePlayerMoney(playerid,-cashdeposit);
new curfunds = PlayerInfo[playerid][pAccount];
PlayerInfo[playerid][pAccount]=cashdeposit+PlayerInfo[playerid][pAccount];
SendClientMessage(playerid, COLOR_WHITE, "|___ Kontoauszug ___|");
format(string, sizeof(string), " Alter Kontostand: $%d", curfunds);
SendClientMessage(playerid, COLOR_GRAD2, string);
format(string, sizeof(string), " Dazu gezahltes Geld: $%d",cashdeposit);
SendClientMessage(playerid, COLOR_GRAD4, string);
SendClientMessage(playerid, COLOR_GRAD6, "|-----------------------------------------|");
format(string, sizeof(string), " Neuer Kontostand: $%d", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_WHITE, string);
return 1;
}
return 1;
}
You see everything is okay... I dont know why...