Guest User

Untitled

a guest
Feb 10th, 2017
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. forward TimerTrava(playerid);
  2. public TimerTrava(playerid)
  3. {
  4. new Float:Pos[3];
  5. new pokoseno = 0;
  6. for(new i = 0; i < sizeof(Trava); i++)
  7. {
  8. GetPlayerObjectPos(playerid, Trava[i][playerid], Pos[0], Pos[1], Pos[2]);
  9. if(IsPlayerInRangeOfPoint(playerid, 3.5, Pos[0], Pos[1], Pos[2]) && KosenjeVozila(GetPlayerVehicleID(playerid)))
  10. {
  11. DestroyPlayerObject(playerid, Trava[i][playerid]);
  12. Trava[i][playerid] = 999;
  13. }
  14. if(Trava[i][playerid] == 999)
  15. {
  16. pokoseno++;
  17. }
  18. }
  19. if(pokoseno == 28)
  20. {
  21. new bonus = random(100), string[200];
  22. g_NovacPlus(playerid, 229+bonus);
  23. format(string,sizeof(string),""CRVENA"KOSAC TRAVE:\n"BIJELA"Zavrsili ste posao bez i jedne greske,\ncestitamo vam na uspjesnom zavrsetku.\nI uplaceno vam je...\n\n"CRVENA"PLATA: "BIJELA"$229, a vas je "CRVENA"BONUS: "BIJELA"$%d", bonus);
  24. ShowPlayerDialog(playerid,DIALOG_ISPLATA,DIALOG_STYLE_MSGBOX,"GAZDA",string,"Uredu","");
  25. KosacPosao[playerid] = 0;
  26. KillTimer(TravaTimer[playerid]);
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment