Advertisement
Guest User

Untitled

a guest
Oct 10th, 2015
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. CMD:withdraw(playerid, params[])
  2. {
  3. if(!IsPlayerInRangeOfPoint(playerid, 3.0, 1436.5366,-966.1215,1003.3478))
  4. {
  5. format(ErrorTextS,sizeof(ErrorTextS),"Nisi na salteru za uredjivanje bankovnog racuna.");
  6. SCM(playerid,GRAD2,ErrorTextS);
  7. return 1;
  8. }
  9. if(PlayerInfo[playerid][pKKartica] == 0)
  10. {
  11. format(ErrorTextS,sizeof(ErrorTextS),"Ti nemas kreditnu karticu.");
  12. SCM(playerid,GRAD2,ErrorTextS);
  13. return 1;
  14. }
  15. new kolicina;
  16. if(sscanf(params, "i", kolicina)) return SCM(playerid, -1, "{FFBA1A}{FFFFFF}/withdraw [kolicina]");
  17. if(kolicina < 1) return SCM(playerid,GRAD2,"Ne mozete podici manje od $1.");
  18. if(PlayerInfo[playerid][pBanka] < kolicina) return SCM(playerid, -1,"Nemate toliko novca na bankovnom racunu!");
  19. new stari = PlayerInfo[playerid][pBanka];
  20. GivePlayerMoneyEx(playerid, kolicina);
  21. PlayerInfo[playerid][pBanka] -= kolicina;
  22. SCM(playerid,-1,"|___ IZVESTAJ BANKE ___|");
  23. format(ErrorTextS,sizeof(ErrorTextS)," Stari Iznos: %d$",stari);
  24. SCM(playerid,GRAD2, ErrorTextS);
  25. format(ErrorTextS,sizeof(ErrorTextS)," Ulozeno: -%d$",kolicina);
  26. SCM(playerid,GRAD2, ErrorTextS);
  27. SCM(playerid,-1,"|------------------------------------------|");
  28. format(ErrorTextS,sizeof(ErrorTextS)," Novi iznos: %d$",PlayerInfo[playerid][pBanka]);
  29. SCM(playerid,GRAD2, ErrorTextS);
  30. SacuvajIgraca(playerid);
  31. return 1;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement