Custura

Untitled

Apr 11th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. public IsPlayerInTurf(playerid, turfid)
  2. {
  3. if(IsPlayerConnected(playerid))
  4. {
  5. if(turfid == -1)
  6. {
  7. return 0;
  8. }
  9. new Float:x, Float:y, Float:z;
  10. GetPlayerPos(playerid,x,y,z);
  11. if(x >= TurfInfo[turfid][zMinX] && x < TurfInfo[turfid][zMaxX] && y >= TurfInfo[turfid][zMinY] && y < TurfInfo[turfid][zMaxY])
  12. {
  13. return 1;
  14. }
  15. }
  16. return 0;
  17. }
Add Comment
Please, Sign In to add comment