TonyVk

Untitled

Jun 16th, 2017
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. getPlayerNearFarmerPlant2(playerid)
  2. {
  3. new Float:objectPos[3];
  4. foreach(new playerID : Player)
  5. {
  6. if(pInfo[playerid][Posao] != 4) return 1;
  7. for(new j = 0; j <= PosadioSjemenki[playerID]; j++)
  8. {
  9. if (FarmObjekt[playerID][j] != INVALID_OBJECT_ID && IsValidDynamicObject(FarmObjekt[playerID][j]))
  10. {
  11. GetDynamicObjectPos(FarmObjekt[playerID][j], objectPos[0], objectPos[1], objectPos[2]);
  12. if (IsPlayerInRangeOfPoint(playerid, 5.0, objectPos[0], objectPos[1], objectPos[2]))
  13. {
  14. return j;
  15. }
  16. }
  17. }
  18. }
  19. return (-1);
  20. }
Advertisement
Add Comment
Please, Sign In to add comment