Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- getPlayerNearFarmerPlant2(playerid)
- {
- new Float:objectPos[3];
- foreach(new playerID : Player)
- {
- if(pInfo[playerid][Posao] != 4) return 1;
- for(new j = 0; j <= PosadioSjemenki[playerID]; j++)
- {
- if (FarmObjekt[playerID][j] != INVALID_OBJECT_ID && IsValidDynamicObject(FarmObjekt[playerID][j]))
- {
- GetDynamicObjectPos(FarmObjekt[playerID][j], objectPos[0], objectPos[1], objectPos[2]);
- if (IsPlayerInRangeOfPoint(playerid, 5.0, objectPos[0], objectPos[1], objectPos[2]))
- {
- return j;
- }
- }
- }
- }
- return (-1);
- }
Advertisement
Add Comment
Please, Sign In to add comment