Mastercz

Untitled

May 14th, 2013
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. local mapTimer;
  2.  
  3. function updateMap()
  4. {
  5. // clear map
  6. webRequest( HTTP_TYPE_GET, "http://www.mafia2-multiplayer.com", "/livemap2.php?password=coolesau&clear=1", function(type,data,time) { });
  7. local query;
  8. // tag vehicles without driver (engine is off)
  9. // for (local i = 0; i < 256; i++)
  10. // {
  11. // if( getVehicleModel (i) != 1001)
  12. // {
  13. // if( !getVehicleEngineState(i) )
  14. // {
  15. // local pos = getVehiclePosition(i);
  16. // query = "/livemap2.php?password=coolesau&Cx[]=" + pos[0] + "&Cy[]=" + pos[1] + "&blip=2";
  17. // webRequest( HTTP_TYPE_GET, "http://www.mafia2-multiplayer.com", query, function(type,data,time) { });
  18. // }
  19. // }
  20. // }
  21.  
  22. // tag players
  23. for (local i = 0; i < getMaxPlayers(); i++)
  24. {
  25. if (isPlayerConnected(i))
  26. {
  27. if (isPlayerSpawned(i))
  28. {
  29. local pos = getPlayerPosition(i);
  30. query = "/livemap.php?password=coolesau&Px[]=" + pos[0] + "&Py[]=" + pos[1] + "&blip=1";
  31. webRequest( HTTP_TYPE_GET, "http://www.mafia2-multiplayer.com", query, function(type,data,time) { });
  32. }
  33. }
  34. }
  35. }
  36.  
  37. function scriptInit()
  38. {
  39. mapTimer = timer( updateMap, 60000, -1);
  40. }
  41. addEventHandler( "onScriptInit", scriptInit );
Advertisement
Add Comment
Please, Sign In to add comment