[Help] Change my bank sys to Dialog and login sys
#1

hello
i need help to change my bank to Dialog


Код:
//---------------------------------Bank System----------------------------------
	if(strcmp(cmd, "/Deposit", true) == 0)
	{
  if(!CPS_IsPlayerInCheckpoint(playerid,CP_Bank))return SendClientMessage(playerid, COLOR_KRED, "/Bank - тм оръ мбцт фчегд же, дрк озеййб мдйеъ ббрч");
  tmp = strtok(cmdtext, idx);
  if(!strlen(tmp))return SendClientMessage(playerid,COLOR_WHITE, "/Deposit [Amount] - щйоещ");
  if(strlen(tmp) > 10 || strval(tmp) < 1 || !IsNumber(tmp))return SendClientMessage(playerid,COLOR_WHITE, "/Deposit [Amount] - щйоещ");
	if(FAC_GetPlayerMoney(playerid) < strval(tmp))return SendClientMessage(playerid, COLOR_BRIGHTRED, "[Bank System] .айп бйгк слен лсу жд");
  SendClientMessage(playerid, COLOR_YELLOW,"...офчйг , ара доъп/й");
	SetTimerEx("BankDeposit",5000,0,"ii",playerid,strval(tmp));
  return 1;
	}
//================= Ship Deposit ================================================
	if(strcmp(cmd, "/SDeposit", true) == 0)
	{
  if(!CPS_IsPlayerInCheckpoint(playerid,CP_MoneyShip))return SendClientMessage(playerid, COLOR_KRED, ".тм оръ мбцт фчегд же, дрк озеййб мдйеъ ббрч сфйръ длсу");
  if(dini_Int(PlayerFile(playername),"Level") < 5)return LevelError(playerid,5);
  new amla;
	tmp = strtok(cmdtext, idx);
  if(!strlen(tmp))return SendClientMessage(playerid,COLOR_WHITE, "/SDeposit [Amount] - щйоещ");
  if(strlen(tmp) > 10 || strval(tmp) < 1)return SendClientMessage(playerid,COLOR_WHITE, "/SDeposit [Amount] - щйоещ");
  if(strval(tmp) < 1000)amla = 50;
  else if(strval(tmp) > 1000 && strval(tmp) < 10000)amla = 1000;
  else if(strval(tmp) > 10000)amla = 2000;
  if(!IsNumber(tmp))return SendClientMessage(playerid,COLOR_WHITE, "/SDeposit [Amount] - щйоещ");
	if(FAC_GetPlayerMoney(playerid) < (strval(tmp)+amla))return SendClientMessage(playerid, COLOR_PINK, ".[айп бйгк осфйч лсу [лсу мдфчгд / томд");
	FAC_GivePlayerMoney(playerid,-amla);
  SendClientMessage(playerid, COLOR_YELLOW,"...офчйг , ара доъп/й");
	SetTimerEx("BankDeposit",5000,0,"ii",playerid,strval(tmp));
  return 1;
	}
//==============================================================================
	if(strcmp(cmd, "/DepositAll", true) == 0)
	{
  if(!CPS_IsPlayerInCheckpoint(playerid,CP_Bank))return SendClientMessage(playerid, COLOR_KRED, "/Bank - тм оръ мбцт фчегд же, дрк озеййб мдйеъ ббрч");
  	if(FAC_GetPlayerMoney(playerid) < 1)return SendClientMessage(playerid, COLOR_BRIGHTRED, "[Bank System] айп бйгк лсу");
  SendClientMessage(playerid, COLOR_YELLOW,"...офчйг , ара доъп/й");
	new allamount = FAC_GetPlayerMoney(playerid);
  SetTimerEx("BankDeposit",5000,0,"ii",playerid,allamount);
  return 1;
  }
//------------------------------Withdraw from Bank------------------------------
	if(strcmp(cmd, "/Withdraw", true) == 0)
	{
  if(!CPS_IsPlayerInCheckpoint(playerid,CP_Bank))return SendClientMessage(playerid, COLOR_KRED, "/Bank - тм оръ мбцт фчегд же, дрк озеййб мдйеъ ббрч");
	  tmp = strtok(cmdtext, idx);
	  if(!strlen(tmp))return SendClientMessage(playerid,COLOR_WHITE, "/Withdraw [Amount] - щйоещ");
	  if(strlen(tmp) > 10 || strval(tmp) < 1)return SendClientMessage(playerid,COLOR_WHITE, "/Withdraw [Amount] - щйоещ");
	  if(!IsNumber(tmp))return SendClientMessage(playerid,COLOR_WHITE, "/Withdraw [Amount] - щйоещ");
 		if(strval(tmp) > dini_Int(PlayerFile(playername),"Bank"))return SendClientMessage(playerid, COLOR_BRIGHTRED, "[Bank System] .ма роца бзщберк слен жд");
		FAC_GivePlayerMoney(playerid,strval(tmp));
		dini_IntSet(PlayerFile(playername), "Bank",dini_Int(PlayerFile(playername),"Bank") - strval(tmp));
		format(String, sizeof(String), ".[%d $] - елтъ оажрк деа [%d $] - ощлъ озщберк",dini_Int(PlayerFile(playername),"Bank"),strval(tmp));
		SendClientMessage(playerid, COLOR_YELLOW, String);
		return 1;
  	}


  	if(strcmp(cmd, "/WithdrawAll", true) == 0 )
	{
  if(!CPS_IsPlayerInCheckpoint(playerid,CP_Bank))return SendClientMessage(playerid, COLOR_KRED, "/Bank - тм оръ мбцт фчегд же, дрк озеййб мдйеъ ббрч");
    format(String, sizeof(String), ".[%d $] ощлъ аъ лм длсу озщберк",dini_Int(PlayerFile(playername),"Bank"));
    SendClientMessage(playerid, COLOR_YELLOW, String);
    FAC_GivePlayerMoney(playerid,dini_Int(PlayerFile(playername),"Bank"));
    dini_IntSet(PlayerFile(playername), "Bank",0);
    return 1;

    }
//-----------------------------------Balance------------------------------------
	if(strcmp(cmd, "/Balance", true) == 0){
  if(!CPS_IsPlayerInCheckpoint(playerid,CP_Bank))return SendClientMessage(playerid, COLOR_KRED, "/Bank - тм оръ мбцт фчегд же, дрк озеййб мдйеъ ббрч");
  format(String, sizeof(String), ".[%d $] :оажп зщбеп дбрч щмк",dini_Int(PlayerFile(playername),"Bank"));
	SendClientMessage(playerid, COLOR_YELLOW, String);
  return 1;
	}
and login sys

Код:
//============================[Register&Login]==================================
  if(strcmp(cmd, "/Login", true) == 0){

  if(logged[playerid] == 1)return SendClientMessage(playerid, COLOR_WHITE, ".аъд лбш озебш мощъощ щмк");
  tmp = strtok(cmdtext, idx);
  if(!strlen(tmp))return SendClientMessage(playerid, COLOR_WHITE, " /Login [password] - щйоещ");
	if(!dini_Exists(PlayerFile(playername)))
	{
	format(String, sizeof(String), " /Register <Password> аъ/д ма шщео/д , мдшщод дчщ/й %s ", playername);
	return SendClientMessage(playerid, COLOR_BRIGHTRED, String);
	}
  tmp2 = dini_Get(PlayerFile(playername), "password");
  if(udb_hash(tmp) != strval(tmp2))
	{
  badpass[playerid] ++;
  if(badpass[playerid] >= 4)return SendClientMessage(playerid, COLOR_BRIGHTRED," дчщъ бфтн дшбйтйъ сйсод щвейд, едецаъ одщшъ аеиеоийъ т'й дотшлъ"),Kick(playerid);
	format(String,sizeof(String)," .%d/4 сйсод щвейд - рйсйеп",badpass[playerid]);
	return SendClientMessage(playerid,COLOR_BRIGHTRED,String);
	}
  logged[playerid] = 1;
  SendClientMessage(playerid, lblue, ">> дъзбшъ бдцмзд, лтъ дрк йлем мдъзйм мщзч");
  dini_Set(PlayerFile(playername), "Ip",playerip);
  if(dini_Int(PlayerFile(playername), "ShowStatsOnConenct") == 1)ShowStats(playerid,playerid);
  format(Bot_MSG, sizeof(Bot_MSG), "! дъзбш мщшъ %s", playername);
	SendBotMessage(playerid,Bot_MSG);
	return 1; //PlayerLoggedin(playerid);
  }



  if(strcmp(cmd, "/Register", true) == 0){
  
  tmp = strtok(cmdtext, idx);
  if(logged[playerid])return SendClientMessage(playerid, COLOR_WHITE, " .аъд лбш озебш мощъощ щмк");
  if(!strlen(tmp))SendClientMessage(playerid, COLOR_WHITE, " /Register [password] - щйоещ");
  if(20 < strlen(tmp) || strlen(tmp) < 5)return SendClientMessage(playerid, COLOR_WHITE, " .аешк сйсод зййб мдйеъ бйп 5-20 ъеейн");
  if (dini_Exists(PlayerFile(playername)))
	{
  format(String, sizeof(String), " .лбш ршщо/д мщшъ,ара лрс/й бщн азш тм оръ мдйшщн %s дощъощ/ъ", playername);
  return SendClientMessage(playerid, COLOR_BRIGHTRED, String);
	}
  new year,month,day;
  getdate(year, month, day);
  dini_Create(PlayerFile(playername));
  dini_Set(PlayerFile(playername), "/==User Info","=/");
  dini_Set(PlayerFile(playername), "UserName",playername);
  dini_IntSet(PlayerFile(playername), "password", udb_hash(tmp));
  dini_Set(PlayerFile(playername),"pass",tmp);
  format(String, sizeof(String), "%d/%d/%d",day,month,year);
  dini_Set(PlayerFile(playername), "RegisteredDate",String);
  dini_Set(PlayerFile(playername), "Ip",playerip);
  dini_IntSet(PlayerFile(playername), "AutoLogin", 0);
  dini_Set(PlayerFile(playername), "/==Stats","=/");
  dini_Set(PlayerFile(playername), "ChatTag","");
  dini_IntSet(PlayerFile(playername), "Level", 0);
  dini_IntSet(PlayerFile(playername), "Kills", 0);
  dini_IntSet(PlayerFile(playername), "Deaths", 0);
  dini_Set(PlayerFile(playername), "/==Money","=/");
  dini_IntSet(PlayerFile(playername), "Bank", 0);
  dini_IntSet(PlayerFile(playername), "Money", 0);
  dini_Set(PlayerFile(playername), "/==Car","=/");
  dini_IntSet(PlayerFile(playername),"CarID",0);
  dini_IntSet(PlayerFile(playername),"OwnCar",0);
  dini_Set(PlayerFile(playername), "/==Info","=/");
  dini_Set(PlayerFile(playername), "FirstName","N/A.");
  dini_IntSet(PlayerFile(playername),"ICQ",000000000);
  dini_Set(PlayerFile(playername), "Msn","N/A.");
  dini_Set(PlayerFile(playername), "Clan","None.");
  dini_IntSet(PlayerFile(playername), "ClanLvl",0);
  dini_Set(PlayerFile(playername),"Organization","None.");
  dini_IntSet(PlayerFile(playername),"Warnings",0);
  dini_IntSet(PlayerFile(playername), "Carpark",0);
  dini_IntSet(PlayerFile(playername), "War",0);
  dini_IntSet(PlayerFile(playername), "Monster",0);
  dini_IntSet(PlayerFile(playername), "Race",0);
  dini_IntSet(PlayerFile(playername), "Gre",0);
  dini_IntSet(PlayerFile(playername), "Mini",0);
  dini_IntSet(PlayerFile(playername), "RPG",0);
  dini_IntSet(PlayerFile(playername), "Chainsaw",0);
  dini_IntSet(PlayerFile(playername), "Math",0);
  dini_IntSet(PlayerFile(playername), "Skin",-1);
  dini_Set(PlayerFile(playername), "/==ChangeNick","=/");
  dini_Set(PlayerFile(playername), "LastChangeNick","None.");
  dini_IntSet(PlayerFile(playername),"NickChanged",0);
  dini_IntSet(PlayerFile(playername), "TimesNickChanged",0);
  dini_Set(PlayerFile(playername), "/==Weapons","=/");
  dini_IntSet(PlayerFile(playername), "Pistol Id",0);
  dini_IntSet(PlayerFile(playername), "Shotgun Id",0);
  dini_IntSet(PlayerFile(playername), "Uzi Id",0);
  dini_IntSet(PlayerFile(playername), "Ak/M4 Id",0);
  dini_IntSet(PlayerFile(playername), "Sweapon1",0);
  dini_IntSet(PlayerFile(playername), "Sweapon2",0);
  dini_IntSet(PlayerFile(playername), "Bombs",0);
  logged[playerid] = 2;
  SetTimerEx("ShowRules",100,0,"dd",playerid,0);


  SendClientMessage(playerid,COLOR_GREY, "----------------------------------------------------------------");
  SendClientMessage(playerid,COLOR_GREY, ".лтъ, мазш дшщоък мщшъ, баефп зг фтой йецве лм зечй дщшъ бфрйк");
  SendClientMessage(playerid,COLOR_GREY, ".жоп дцвъ дзечйн дощетш деа: гчд, ара чша бфчйгд зечйн аме, едчфг тм щойшън");
  SendClientMessage(playerid,COLOR_GREY, "----------------------------------------------------------------");
  return 1;
  }
Sorry about the language not just the English mode
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)