Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local mapTimer;
- function updateMap()
- {
- // clear map
- webRequest( HTTP_TYPE_GET, "http://www.mafia2-multiplayer.com", "/livemap2.php?password=coolesau&clear=1", function(type,data,time) { });
- local query;
- // tag vehicles without driver (engine is off)
- // for (local i = 0; i < 256; i++)
- // {
- // if( getVehicleModel (i) != 1001)
- // {
- // if( !getVehicleEngineState(i) )
- // {
- // local pos = getVehiclePosition(i);
- // query = "/livemap2.php?password=coolesau&Cx[]=" + pos[0] + "&Cy[]=" + pos[1] + "&blip=2";
- // webRequest( HTTP_TYPE_GET, "http://www.mafia2-multiplayer.com", query, function(type,data,time) { });
- // }
- // }
- // }
- // tag players
- for (local i = 0; i < getMaxPlayers(); i++)
- {
- if (isPlayerConnected(i))
- {
- if (isPlayerSpawned(i))
- {
- local pos = getPlayerPosition(i);
- query = "/livemap.php?password=coolesau&Px[]=" + pos[0] + "&Py[]=" + pos[1] + "&blip=1";
- webRequest( HTTP_TYPE_GET, "http://www.mafia2-multiplayer.com", query, function(type,data,time) { });
- }
- }
- }
- }
- function scriptInit()
- {
- mapTimer = timer( updateMap, 60000, -1);
- }
- addEventHandler( "onScriptInit", scriptInit );
Advertisement
Add Comment
Please, Sign In to add comment