Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.19 KB | None | 0 0
  1. if(strcmp(cmd, "/atmwithdraw", true) == 0)
  2. {
  3. if(IsPlayerConnected(playerid))
  4. {
  5. if(IsPlayerInRangeOfPoint(playerid, 3, -32.276363,-57.995586,1003.139953) || IsPlayerInRangeOfPoint(playerid, 3, 374.718902,167.128982,1007.987304) || IsPlayerInRangeOfPoint(playerid, 3, -1748.5145,15.4453,180.8316) || IsPlayerInRangeOfPoint(playerid, 3, -915.1777,43.0257,97.9856) || IsPlayerInRangeOfPoint(playerid, 3, -931.1852,42.1797,358.6672) || IsPlayerInRangeOfPoint(playerid, 3, -1248.6656,18.3522,203.4427)
  6. || IsPlayerInRangeOfPoint(playerid, 3, 374.6863,167.7920,1008.3828) || IsPlayerInRangeOfPoint(playerid, 3, 2116.0210,-1117.7926,25.2971))
  7. {
  8. tmp = strtok(cmdtext, idx);
  9. if(!strlen(tmp))
  10. {
  11. SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /atmwithdraw [amount]");
  12. format(string, sizeof(string), " Imas $%d na svoj racunu.", PlayerInfo[playerid][pAccount]);
  13. SendClientMessage(playerid, COLOR_GRAD3, string);
  14. return 1;
  15. }
  16. new cashdeposit = strval(tmp);
  17. if(!strlen(tmp))
  18. {
  19. SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /atmwithdraw [amount]");
  20. format(string, sizeof(string), " Imas $%d na racunu.", PlayerInfo[playerid][pAccount]);
  21. SendClientMessage(playerid, COLOR_GRAD3, string);
  22. return 1;
  23. }
  24. if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1)
  25. {
  26. SendClientMessage(playerid, COLOR_GRAD2, " Nemas toliko kod sebe !");
  27. return 1;
  28. }
  29. //ConsumingMoney[playerid] = 1;
  30. SafeGivePlayerMoney(playerid,cashdeposit);
  31. PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;
  32. format(string, sizeof(string), " Podigao si $%d za svog racuna Ukupno: $%d ", cashdeposit,PlayerInfo[playerid][pAccount]);
  33. SendClientMessage(playerid, COLOR_YELLOW, string);
  34.  
  35. new y, m, d;
  36. new h,mi,s;
  37. getdate(y,m,d);
  38. gettime(h,mi,s);
  39. format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /atmwithdraw ($%d)",d,m,y,h,mi,s,sendername, cashdeposit);
  40. PayLog(string);
  41. return 1;
  42. }
  43. else
  44. {
  45. SendClientMessage(playerid, COLOR_GREY, " Nisi kod bankomata !");
  46. return 1;
  47. }
  48. }
  49. return 1;
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement