/withdraw sets -Moneys.. Help plx
#2

pawn Код:
dcmd_withdraw(playerid, params[])
{
  if(PlayerToPoint(3.0,playerid,822.5534,4.1383,1004.1797) || PlayerToPoint(3.0,playerid,-269.332855, 2643.274414, 61.681332)
  || PlayerToPoint(3.0,playerid,-246.366257, 2604.845703, 61.696018) || PlayerToPoint(3.0,playerid,-551.660522, 2599.094727, 52.833538)
  || PlayerToPoint(3.0,playerid,-780.411743, 2744.200195, 44.809681) || PlayerToPoint(3.0,playerid,-1317.879761, 2699.827637, 49.156090)
  || PlayerToPoint(3.0,playerid,-1435.860718, 2614.272461, 54.778828) || PlayerToPoint(3.0,playerid,-1505.444580, 2583.840576, 54.753826)
  || PlayerToPoint(3.0,playerid,-1505.501831, 2630.620605, 54.753826))
  {
    new Moneys;
    if(sscanf(params, "d", Moneys))
      return SendClientMessage(playerid,COLOR_DARKRED,"Usage: /withdraw [amount]");
           
    new pName[MAX_PLAYER_NAME],string[256],string2[256];
    GetPlayerName(playerid,pName,sizeof(pName));
    format(string,sizeof(string),"EQRP/Players/%s.ini",pName);

    if(dini_Int(string,"Bank") < params[0])
      return SendClientMessage(playerid,COLOR_DARKRED,"You don't have that mutch in your bank");
           
    format(string2,sizeof(string2),"$%s Withdrawed",params[0]);
    SendClientMessage(playerid,COLOR_YELLOW,string2);
    GivePlayerMoney(playerid,Moneys);

    new bankbalance = dini_Int(string,"Bank") - Moneys;
   
    dini_IntSet(string,"Bank",bankbalance );
    return 1;
       
  }
  return SendClientMessage(playerid,COLOR_DARKRED,"Not at the Bank or at a ATM");
}
Reply


Messages In This Thread
/withdraw sets -Moneys.. Help plx - by introzen - 09.03.2009, 15:08
Re: /withdraw sets -Moneys.. Help plx - by [RP]Rav - 09.03.2009, 15:18
Re: /withdraw sets -Moneys.. Help plx - by introzen - 09.03.2009, 15:22
Re: /withdraw sets -Moneys.. Help plx - by introzen - 09.03.2009, 16:35
Re: /withdraw sets -Moneys.. Help plx - by [RP]Rav - 09.03.2009, 16:45
Re: /withdraw sets -Moneys.. Help plx - by introzen - 09.03.2009, 16:49

Forum Jump:


Users browsing this thread: 1 Guest(s)