[POMOC] Atm Sistem

Započeo Pabloo, Februar 03, 2017, 00:04:11 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: Athalone
Detaljan opis problema: Nije problem vec jebiga nema nikog od skriptera , svi traze pare i moram da se snadjem, u pitanju je ATM sistem , atm sistem ima 2 opcije /atm withdraw i /atm doposit , a ja ne zelim da imam tako neko zelim da imam /bwithdraw komandu koja dize pare iz banke i /bbank komandu koja vraca pare u banku,ko uradi ima nagradu od mene zagarantovanu
Dio skripte:
CMD:atm( playerid, params[] ) {
    if( !PlayerInfo[ playerid ][ xImaBRacun ] ) return GRESKA( playerid, "Prvo moras da otvoris racun u banci i uzmes karticu za bankomat." );
    if( IsPlayerInAnyVehicle( playerid ) ) return GRESKA( playerid, "Ne mozes koristiti ovu komandu dok si u vozilu." );
   if( GetNearestAtm( playerid ) == -1 ) return GRESKA( playerid, "Moras biti blizu bankomata." );
   new item[32];
   if( sscanf( params, "s[32] ", item)) {
      SCM( playerid, SVETLOPLAVA, "___________________________________________________________________");
      SendUsageMessage( playerid, "/atm [opcija]");
        SCM( playerid, BELA, "[Opcije] status, withdraw");
      SCM( playerid, SVETLOPLAVA, "___________________________________________________________________");
      return 1;
   }
   if( strcmp( item, "status",true) == 0) {
       format( globalstring, sizeof( globalstring ), "Imate $%d na vasem bankovnom racunu.", PlayerInfo[ playerid ][ xBRacun ] );
      SendClientMessage( playerid, ZUTA, globalstring );
      return 1;
   }
   else if( strcmp( item, "withdraw",true) == 0) {
       new cashdeposit;
      if( sscanf( params, "s[32]i", item, cashdeposit ) ) {
         SendUsageMessage( playerid, "/atm withdraw [ iznos ]");
         return 1;
      }
      if( cashdeposit > PlayerInfo[ playerid ][ xBRacun ] || cashdeposit < 1 ) return GRESKA( playerid, "Nemate toliko novca !");
      DajIgracuNovac( playerid, cashdeposit );
      UpdateDzepTD( playerid );
      PlayerInfo[ playerid ][ xBRacun ] -= cashdeposit ;
      format( globalstring, sizeof( globalstring ), "Podigli ste $%d s vaseg racuna. Na racunu ima: $%d ", cashdeposit, PlayerInfo[ playerid ][ xBRacun ] );
      SCM( playerid, ZUTA, globalstring); UpdateBankTD( playerid );
      return 1;
   }
   else {
       SCM( playerid, SVETLOPLAVA, "___________________________________________________________________");
      SendUsageMessage( playerid, "/atm [opcija]");
        SCM( playerid, BELA, "[Opcije] status, withdraw");
      SCM( playerid, SVETLOPLAVA, "___________________________________________________________________");
   }
   return 1;
}


Neke slike/video za lakse dobivanje pomoci(neobavezno):

Izvoli /bwithdraw, a za bbank napravis samo suprotno od ove da igracu oduzme novac i dodaga u banku
[pawn]CMD:bwithdraw(playerid,params[])
{
    if( !PlayerInfo[ playerid ][ xImaBRacun ] ) return GRESKA( playerid, "Prvo moras da otvoris racun u banci i uzmes karticu za bankomat." );
    if( IsPlayerInAnyVehicle( playerid ) ) return GRESKA( playerid, "Ne mozes koristiti ovu komandu dok si u vozilu." );
      if( GetNearestAtm( playerid ) == -1 ) return GRESKA( playerid, "Moras biti blizu bankomata." );
    new cashdeposit;
      if( sscanf( params, "d",cashdeposit ) )
   {
         SendUsageMessage( playerid, "/bwithdraw [ iznos ]");
         return 1;
   }
     if( cashdeposit > PlayerInfo[ playerid ][ xBRacun ] || cashdeposit < 1 ) return GRESKA( playerid, "Nemate toliko novca !");
      DajIgracuNovac( playerid, cashdeposit );
    UpdateDzepTD( playerid );
    PlayerInfo[ playerid ][ xBRacun ] -= cashdeposit ;
    format( globalstring, sizeof( globalstring ), "Podigli ste $%d s vaseg racuna. Na racunu ima: $%d ", cashdeposit, PlayerInfo[ playerid ][ xBRacun ] );
    SCM( playerid, ZUTA, globalstring); UpdateBankTD( playerid );
   return 1;
}[/pawn]