SA-MP Forums Archive
Real time issues - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Real time issues (/showthread.php?tid=532446)



Real time issues - Inquisitive - 18.08.2014

Hello scripters or whoever,

It's my first time posting a thread over here, so I'm sorry if i've posted in the wrong section.


Alright, so can anyone tell me how to remove real time from my server? I can't figure out a script where when an administrator from the server sets the time for players and the time will just freeze there forever until the player itself or admin changed the time again. This is what happen when i set the time for a player.

[ame="http://www.youtube.com/watch?v=H_ArBy_KhyY&list=UUcj9pYzXqrYoUQxNEJ0LU-g"]http://www.youtube.com/watch?v=H_ArBy_KhyY&list=UUcj9pYzXqrYoUQxNEJ0LU-g[/ame]


Best regards,
Inquisitive


Re: Real time issues - Threshold - 18.08.2014

Hey there, first off we'll need to see the code that you're using to do this, so we can fix it up for you.


Re: Real time issues - Inquisitive - 18.08.2014

Sure, here it is.

PHP код:
//----------------------------------------------------------
//
//  GRAND LARCENY  1.0
//  A freeroam gamemode for SA-MP 0.3
//
//----------------------------------------------------------
#include <a_samp>
#include <zcmd>
#include <core>
#include <float>
#include "../include/gl_common.inc"
#include "../include/gl_spawns.inc"
#pragma tabsize 0
//----------------------------------------------------------
#define COLOR_PINK          0xFF0099
#define COLOR_RED           0xCC0000
#define COLOR_WHITE         0xFFFFFFFF
#define COLOR_NORMAL_PLAYER 0xFFBB7777
#define CITY_LOS_SANTOS  0
#define CITY_SAN_FIERRO     1
#define CITY_LAS_VENTURAS     2
#define pTextdraw
new total_vehicles_from_files=0;
// Class selection globals
new gPlayerCitySelection[MAX_PLAYERS];
new 
gPlayerHasCitySelected[MAX_PLAYERS];
new 
gPlayerLastCitySelectionTick[MAX_PLAYERS];
new 
Text:txtClassSelHelper;
new 
Text:txtLosSantos;
new 
Text:txtSanFierro;
new 
Text:txtLasVenturas;
new 
thisanimid=0;
new 
lastanimid=0;
//----------------------------------------------------------
main()
{
    print(
"\n---------------------------------------");
    print(
"Running Grand Larceny - by the SA-MP team\n");
    print(
"---------------------------------------\n");
}
//----------------------------------------------------------
public OnPlayerConnect(playerid)
{
    
GameTextForPlayer(playerid,"~w~Stunt Planet V1",3000,4);
      
SendClientMessage(playerid,COLOR_PINK,"Welcome to Stunt Planet V1");
      
      
// class selection init vars
      
gPlayerCitySelection[playerid] = -1;
    
gPlayerHasCitySelected[playerid] = 0;
    
gPlayerLastCitySelectionTick[playerid] = GetTickCount();
   
//Santa Maria Beach remove building code
   
RemoveBuildingForPlayer(playerid6415154.2109, -1950.195326.40630.25);
   
RemoveBuildingForPlayer(playerid1461147.9453, -1927.72663.55470.25);
   
RemoveBuildingForPlayer(playerid6295154.2109, -1950.195326.40630.25);
   
RemoveBuildingForPlayer(playerid1461148.0938, -1887.28133.54690.25);
   
RemoveBuildingForPlayer(playerid1231154.4531, -1887.24225.48440.25);
   
RemoveBuildingForPlayer(playerid1280150.6641, -1870.31253.10160.25);
   
RemoveBuildingForPlayer(playerid1280158.6641, -1908.32033.17190.25);
   
RemoveBuildingForPlayer(playerid1461161.5703, -1921.31253.53910.25);
   
RemoveBuildingForPlayer(playerid1461161.6563, -1893.64063.54690.25);
   
RemoveBuildingForPlayer(playerid1461148.0938, -1847.71093.54690.25);
   
RemoveBuildingForPlayer(playerid1461148.8125, -1820.04693.53910.25);
   
RemoveBuildingForPlayer(playerid1280150.6641, -1835.35943.10940.25);
   
RemoveBuildingForPlayer(playerid1231154.6641, -1839.42975.47660.25);
   
RemoveBuildingForPlayer(playerid1280159.1953, -1842.58593.14060.25);
   
RemoveBuildingForPlayer(playerid1461161.6563, -1854.07813.54690.25);
   
RemoveBuildingForPlayer(playerid1461161.8125, -1813.63283.55470.25);
   
RemoveBuildingForPlayer(playerid1280150.6641, -1809.35943.08590.25);
   
RemoveBuildingForPlayer(playerid1461148.8125, -1799.93753.53910.25);
   
RemoveBuildingForPlayer(playerid1231154.5469, -1799.64065.46880.25);
   
RemoveBuildingForPlayer(playerid1280159.3359, -1794.58593.17190.25);
   
RemoveBuildingForPlayer(playerid1280150.6641, -1784.33593.46880.25);
   
RemoveBuildingForPlayer(playerid16375387.60162525.546915.66410.25);
   
RemoveBuildingForPlayer(playerid16790425.46882531.000022.55470.25);
    
//SetPlayerColor(playerid,COLOR_NORMAL_PLAYER);
    //Kick(playerid);
    
    /*
    Removes vending machines
    RemoveBuildingForPlayer(playerid, 1302, 0.0, 0.0, 0.0, 6000.0);
    RemoveBuildingForPlayer(playerid, 1209, 0.0, 0.0, 0.0, 6000.0);
    RemoveBuildingForPlayer(playerid, 955, 0.0, 0.0, 0.0, 6000.0);
    RemoveBuildingForPlayer(playerid, 1775, 0.0, 0.0, 0.0, 6000.0);
    RemoveBuildingForPlayer(playerid, 1776, 0.0, 0.0, 0.0, 6000.0);
    */
    
    /*
    new ClientVersion[32];
    GetPlayerVersion(playerid, ClientVersion, 32);
    printf("Player %d reports client version: %s", playerid, ClientVersion);*/
     
return 1;
}
//----------------------------------------------------------
public OnPlayerSpawn(playerid)
{
    if(
IsPlayerNPC(playerid)) return 1;
    
    new 
randSpawn 0;
    
    
SetPlayerInterior(playerid,0);
    
TogglePlayerClock(playerid,0);
     
ResetPlayerMoney(playerid);
    
GivePlayerMoney(playerid30000);
    if(
CITY_LOS_SANTOS == gPlayerCitySelection[playerid]) {
         
randSpawn random(sizeof(gRandomSpawns_LosSantos));
         
SetPlayerPos(playerid,
         
gRandomSpawns_LosSantos[randSpawn][0],
         
gRandomSpawns_LosSantos[randSpawn][1],
         
gRandomSpawns_LosSantos[randSpawn][2]);
        
SetPlayerFacingAngle(playerid,gRandomSpawns_LosSantos[randSpawn][3]);
    }
    else if(
CITY_SAN_FIERRO == gPlayerCitySelection[playerid]) {
         
randSpawn random(sizeof(gRandomSpawns_SanFierro));
         
SetPlayerPos(playerid,
         
gRandomSpawns_SanFierro[randSpawn][0],
         
gRandomSpawns_SanFierro[randSpawn][1],
         
gRandomSpawns_SanFierro[randSpawn][2]);
        
SetPlayerFacingAngle(playerid,gRandomSpawns_SanFierro[randSpawn][3]);
    }
    else if(
CITY_LAS_VENTURAS == gPlayerCitySelection[playerid]) {
         
randSpawn random(sizeof(gRandomSpawns_LasVenturas));
         
SetPlayerPos(playerid,
         
gRandomSpawns_LasVenturas[randSpawn][0],
         
gRandomSpawns_LasVenturas[randSpawn][1],
         
gRandomSpawns_LasVenturas[randSpawn][2]);
        
SetPlayerFacingAngle(playerid,gRandomSpawns_LasVenturas[randSpawn][3]);
    }
    
//SetPlayerColor(playerid,COLOR_NORMAL_PLAYER);
    
    
SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL,100);
    
SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL_SILENCED,200);
    
SetPlayerSkillLevel(playerid,WEAPONSKILL_DESERT_EAGLE,200);
    
SetPlayerSkillLevel(playerid,WEAPONSKILL_SHOTGUN,200);
    
SetPlayerSkillLevel(playerid,WEAPONSKILL_SAWNOFF_SHOTGUN,100);
    
SetPlayerSkillLevel(playerid,WEAPONSKILL_SPAS12_SHOTGUN,200);
    
SetPlayerSkillLevel(playerid,WEAPONSKILL_MICRO_UZI,100);
    
SetPlayerSkillLevel(playerid,WEAPONSKILL_MP5,200);
    
SetPlayerSkillLevel(playerid,WEAPONSKILL_AK47,200);
    
SetPlayerSkillLevel(playerid,WEAPONSKILL_M4,200);
    
SetPlayerSkillLevel(playerid,WEAPONSKILL_SNIPERRIFLE,200);
    
    
GivePlayerWeapon(playerid,WEAPON_COLT45,200);
    
//GivePlayerWeapon(playerid,WEAPON_MP5,100);
    
TogglePlayerClock(playerid0);
    return 
1;
}
//----------------------------------------------------------
public OnPlayerDeath(playeridkilleridreason)
{
    new 
playercash;
    
    
// if they ever return to class selection make them city
    // select again first
    
gPlayerHasCitySelected[playerid] = 0;
    
    if(
killerid == INVALID_PLAYER_ID) {
        
ResetPlayerMoney(playerid);
    } else {
        
playercash GetPlayerMoney(playerid);
        if(
playercash 0)  {
            
GivePlayerMoney(killeridplayercash);
            
ResetPlayerMoney(playerid);
        }
    }
       return 
1;
}
//----------------------------------------------------------
ClassSel_SetupCharSelection(playerid)
{
       if(
gPlayerCitySelection[playerid] == CITY_LOS_SANTOS) {
        
SetPlayerInterior(playerid,11);
        
SetPlayerPos(playerid,508.7362,-87.4335,998.9609);
        
SetPlayerFacingAngle(playerid,0.0);
        
SetPlayerCameraPos(playerid,508.7362,-83.4335,998.9609);
        
SetPlayerCameraLookAt(playerid,508.7362,-87.4335,998.9609);
    }
    else if(
gPlayerCitySelection[playerid] == CITY_SAN_FIERRO) {
        
SetPlayerInterior(playerid,3);
        
SetPlayerPos(playerid,-2673.8381,1399.7424,918.3516);
        
SetPlayerFacingAngle(playerid,181.0);
        
SetPlayerCameraPos(playerid,-2673.2776,1394.3859,918.3516);
        
SetPlayerCameraLookAt(playerid,-2673.8381,1399.7424,918.3516);
    }
    else if(
gPlayerCitySelection[playerid] == CITY_LAS_VENTURAS) {
        
SetPlayerInterior(playerid,3);
        
SetPlayerPos(playerid,349.0453,193.2271,1014.1797);
        
SetPlayerFacingAngle(playerid,286.25);
        
SetPlayerCameraPos(playerid,352.9164,194.5702,1014.1875);
        
SetPlayerCameraLookAt(playerid,349.0453,193.2271,1014.1797);
    }
}
//----------------------------------------------------------
// Used to init textdraws of city names
ClassSel_InitCityNameText(Text:txtInit)
{
      
TextDrawUseBox(txtInit0);
    
TextDrawLetterSize(txtInit,1.25,3.0);
    
TextDrawFont(txtInit0);
    
TextDrawSetShadow(txtInit,0);
    
TextDrawSetOutline(txtInit,1);
    
TextDrawColor(txtInit,0xEEEEEEFF);
    
TextDrawBackgroundColor(txtClassSelHelper,0x000000FF);
}
//----------------------------------------------------------
ClassSel_InitTextDraws()
{
    
// Init our observer helper text display
    
txtLosSantos TextDrawCreate(10.0380.0"Los Santos");
    
ClassSel_InitCityNameText(txtLosSantos);
    
txtSanFierro TextDrawCreate(10.0380.0"San Fierro");
    
ClassSel_InitCityNameText(txtSanFierro);
    
txtLasVenturas TextDrawCreate(10.0380.0"Las Venturas");
    
ClassSel_InitCityNameText(txtLasVenturas);
    
// Init our observer helper text display
    
txtClassSelHelper TextDrawCreate(10.0415.0,
       
" Press ~b~~k~~GO_LEFT~ ~w~or ~b~~k~~GO_RIGHT~ ~w~to switch cities.~n~ Press ~r~~k~~PED_FIREWEAPON~ ~w~to select.");
    
TextDrawUseBox(txtClassSelHelper1);
    
TextDrawBoxColor(txtClassSelHelper,0x222222BB);
    
TextDrawLetterSize(txtClassSelHelper,0.3,1.0);
    
TextDrawTextSize(txtClassSelHelper,400.0,40.0);
    
TextDrawFont(txtClassSelHelper2);
    
TextDrawSetShadow(txtClassSelHelper,0);
    
TextDrawSetOutline(txtClassSelHelper,1);
    
TextDrawBackgroundColor(txtClassSelHelper,0x000000FF);
    
TextDrawColor(txtClassSelHelper,0xFFFFFFFF);
}
//----------------------------------------------------------
ClassSel_SetupSelectedCity(playerid)
{
    if(
gPlayerCitySelection[playerid] == -1) {
        
gPlayerCitySelection[playerid] = CITY_LOS_SANTOS;
    }
    if(
gPlayerCitySelection[playerid] == CITY_LOS_SANTOS) {
        
SetPlayerInterior(playerid,0);
           
SetPlayerCameraPos(playerid,1630.6136,-2286.0298,110.0);
        
SetPlayerCameraLookAt(playerid,1887.6034,-1682.1442,47.6167);
        
TextDrawShowForPlayer(playerid,txtLosSantos);
        
TextDrawHideForPlayer(playerid,txtSanFierro);
        
TextDrawHideForPlayer(playerid,txtLasVenturas);
    }
    else if(
gPlayerCitySelection[playerid] == CITY_SAN_FIERRO) {
        
SetPlayerInterior(playerid,0);
           
SetPlayerCameraPos(playerid,-1300.8754,68.0546,129.4823);
        
SetPlayerCameraLookAt(playerid,-1817.9412,769.3878,132.6589);
        
TextDrawHideForPlayer(playerid,txtLosSantos);
        
TextDrawShowForPlayer(playerid,txtSanFierro);
        
TextDrawHideForPlayer(playerid,txtLasVenturas);
    }
    else if(
gPlayerCitySelection[playerid] == CITY_LAS_VENTURAS) {
        
SetPlayerInterior(playerid,0);
           
SetPlayerCameraPos(playerid,1310.6155,1675.9182,110.7390);
        
SetPlayerCameraLookAt(playerid,2285.2944,1919.3756,68.2275);
        
TextDrawHideForPlayer(playerid,txtLosSantos);
        
TextDrawHideForPlayer(playerid,txtSanFierro);
        
TextDrawShowForPlayer(playerid,txtLasVenturas);
    }
}
//----------------------------------------------------------
ClassSel_SwitchToNextCity(playerid)
{
    
gPlayerCitySelection[playerid]++;
    if(
gPlayerCitySelection[playerid] > CITY_LAS_VENTURAS) {
        
gPlayerCitySelection[playerid] = CITY_LOS_SANTOS;
    }
    
PlayerPlaySound(playerid,1052,0.0,0.0,0.0);
    
gPlayerLastCitySelectionTick[playerid] = GetTickCount();
    
ClassSel_SetupSelectedCity(playerid);
}
//----------------------------------------------------------
ClassSel_SwitchToPreviousCity(playerid)
{
    
gPlayerCitySelection[playerid]--;
    if(
gPlayerCitySelection[playerid] < CITY_LOS_SANTOS) {
        
gPlayerCitySelection[playerid] = CITY_LAS_VENTURAS;
    }
    
PlayerPlaySound(playerid,1053,0.0,0.0,0.0);
    
gPlayerLastCitySelectionTick[playerid] = GetTickCount();
    
ClassSel_SetupSelectedCity(playerid);
}
//----------------------------------------------------------
ClassSel_HandleCitySelection(playerid)
{
    new 
Keys,ud,lr;
    
GetPlayerKeys(playerid,Keys,ud,lr);
    if(
gPlayerCitySelection[playerid] == -1) {
        
ClassSel_SwitchToNextCity(playerid);
        return;
    }
    
// only allow new selection every ~500 ms
    
if( (GetTickCount() - gPlayerLastCitySelectionTick[playerid]) < 500 ) return;
    if(
Keys KEY_FIRE) {
        
gPlayerHasCitySelected[playerid] = 1;
        
TextDrawHideForPlayer(playerid,txtClassSelHelper);
        
TextDrawHideForPlayer(playerid,txtLosSantos);
        
TextDrawHideForPlayer(playerid,txtSanFierro);
        
TextDrawHideForPlayer(playerid,txtLasVenturas);
        
TogglePlayerSpectating(playerid,0);
        return;
    }
    if(
lr 0) {
       
ClassSel_SwitchToNextCity(playerid);
    }
    else if(
lr 0) {
       
ClassSel_SwitchToPreviousCity(playerid);
    }
}
//----------------------------------------------------------
public OnPlayerRequestClass(playeridclassid)
{
    if(
IsPlayerNPC(playerid)) return 1;
    if(
gPlayerHasCitySelected[playerid]) {
        
ClassSel_SetupCharSelection(playerid);
        return 
1;
    } else {
        if(
GetPlayerState(playerid) != PLAYER_STATE_SPECTATING) {
            
TogglePlayerSpectating(playerid,1);
            
TextDrawShowForPlayer(playeridtxtClassSelHelper);
            
gPlayerCitySelection[playerid] = -1;
        }
      }
    return 
0;
}
//----------------------------------------------------------
public OnGameModeInit()
{
    
SetGameModeText("Grand Larceny");
    
ShowPlayerMarkers(PLAYER_MARKERS_MODE_GLOBAL);
    
ShowNameTags(1);
    
SetNameTagDrawDistance(40.0);
    
EnableStuntBonusForAll(0);
    
DisableInteriorEnterExits();
    
SetWeather(2);
    
SetWorldTime(11);
    
UsePlayerPedAnims();
    
//ManualVehicleEngineAndLights();
    //LimitGlobalChatRadius(300.0);
    
ClassSel_InitTextDraws();
    
// Player Class
    
AddPlayerClass(281,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(282,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(283,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(284,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(285,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(286,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(287,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(288,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(289,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(265,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(266,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(267,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(268,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(269,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(270,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(1,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(2,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(3,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(4,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(5,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(6,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(8,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(42,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(65,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
//AddPlayerClass(74,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(86,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(119,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
     
AddPlayerClass(149,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(208,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(273,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(289,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
    
AddPlayerClass(47,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(48,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(49,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(50,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(51,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(52,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(53,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(54,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(55,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(56,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(57,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(58,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
       
AddPlayerClass(68,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(69,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(70,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(71,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(72,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(73,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(75,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(76,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(78,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(79,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(80,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(81,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(82,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(83,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(84,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(85,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(87,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(88,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(89,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(91,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(92,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(93,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(95,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(96,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(97,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(98,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
AddPlayerClass(99,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    
    
    
    
// OTHER AREAS
    
    
total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/flint.txt");
    
total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/red_county.txt");
    
printf("Total vehicles from files: %d",total_vehicles_from_files);
   
//smb spawn map
   
CreateObject(18783154.58350, -1951.558960.33590,   0.000000.000000.00000);
   
CreateObject(19129154.57445, -1951.531132.79470,   0.000000.000000.00000);
   
CreateObject(8483153.48911, -1966.992808.39110,   0.000000.0000090.00000);
   
CreateObject(9076154.65559, -1975.585218.48860,   0.000000.00000, -90.00000);
   
CreateObject(7392168.70193, -1956.770636.79730,   0.000000.00000, -40.00000);
   
CreateObject(7392140.56345, -1957.581426.79730,   0.000000.0000040.00000);
   
CreateObject(3472144.76077, -1941.71301, -2.61270,   0.000000.0000085.00000);
   
CreateObject(3472164.41035, -1941.66431, -2.61270,   0.000000.00000, -30.00000);
   
CreateObject(8397149.00160, -1982.939090.00380,   0.00000, -25.000000.00000);
   
CreateObject(8397160.71667, -1983.287110.00380,   0.0000025.000000.00000);
   
CreateObject(3472147.02428, -1744.589113.16310,   0.000000.000000.00000);
   
CreateObject(3472160.44016, -1748.336063.16310,   0.000000.000000.00000);
   
   
//aa spawn map
   
CreateObject(5716371.678502546.6379428.70470,   0.000000.400000.00000);
   
CreateObject(19129383.793822539.1499015.68420,   0.000000.000000.00000);
   
CreateObject(19129351.361542539.1118215.70420,   0.000000.000000.00000);
   
CreateObject(19129367.578282539.1174315.69420,   0.000000.000000.00000);
   
CreateObject(7073386.617742542.4001521.31110,   0.000000.0000050.00000);
   
CreateObject(7073348.586612541.1943421.31110,   0.000000.00000, -50.00000);
   
CreateObject(3528366.085022539.8881831.50020,   0.000000.00000, -90.00000);
   
CreateObject(3437381.689822545.2978530.15230,   0.000000.000000.00000);
   
CreateObject(3437375.060332545.2871128.77230,   0.000000.000000.00000);
   
CreateObject(3437352.263702545.0395530.13230,   0.000000.000000.00000);
   
CreateObject(3437378.403442545.2907726.57230,   0.000000.000000.00000);
   
CreateObject(3437355.376952545.0451726.57230,   0.000000.000000.00000);
   
CreateObject(3437358.623902545.0515128.77230,   0.000000.000000.00000);
   
CreateObject(3472337.601902529.5676320.91090,   0.000000.00000, -90.00000);
   
CreateObject(3472349.046052529.5014618.61090,   0.000000.0000030.00000);
   
CreateObject(3472384.772522529.5661618.61090,   0.000000.0000030.00000);
   
CreateObject(3472396.215242529.5293020.91090,   0.000000.00000, -90.00000);
   
//sfa spawn map
   
CreateObject(9076, -1386.94348, -226.9240118.93600,   0.000000.00000, -160.00000);
   
CreateObject(9076, -1369.69214, -254.0463018.93600,   0.000000.00000, -135.00000);
   
CreateObject(9076, -1342.61292, -271.3752418.93600,   0.000000.00000, -110.00000);
   
CreateObject(8483, -1380.81995, -223.7881518.88040,   0.000000.0000020.00000);
   
CreateObject(8483, -1342.01270, -265.9989918.88040,   0.000000.0000070.00000);
   
CreateObject(8483, -1367.32336, -249.9731018.88040,   0.000000.0000045.00000);
   
CreateObject(18783, -1367.93823, -224.7710010.92850,   0.000000.0000045.00000);
   
CreateObject(8397, -1361.63513, -270.7078617.22520,   0.000000.00000, -20.00000);
   
CreateObject(8397, -1386.58386, -243.8082017.22520,   0.000000.0000020.00000);
   
CreateObject(7073, -1358.85681, -265.9937424.94760,   0.000000.00000, -110.00000);
   
CreateObject(7073, -1380.59558, -242.8373024.94760,   0.000000.0000020.00000);
   
CreateObject(7392, -1323.64709, -273.7937017.17470,   0.000000.00000, -85.00000);
   
CreateObject(7392, -1389.95972, -205.9968017.17470,   0.000000.000000.00000);
   
CreateObject(18783, -1340.03186, -252.6605110.92850,   0.000000.0000045.00000);
   
CreateObject(18783, -1353.96521, -238.7392310.91850,   0.000000.0000045.00000);
   
CreateObject(19129, -1339.73071, -252.9960913.38730,   0.000000.0000045.00000);
   
CreateObject(19129, -1367.94287, -224.7681013.38730,   0.000000.0000045.00000);
   
CreateObject(19129, -1353.84827, -238.8786013.38730,   0.000000.0000045.00000);
   
//Derby Airstrike
   
CreateObject(51853890.36670, -1860.249272.59000,   0.000000.00000300.00000);
CreateObject(51853943.17114, -1846.834232.62000,   0.000000.00000357.99500);
CreateObject(51853959.19995, -1795.699952.64000,   0.000000.0000060.00000);
CreateObject(51853922.02905, -1754.875242.62000,   0.000000.00000115.75000);
CreateObject(51853855.19995, -1820.900022.58000,   0.000000.00000235.00000);
CreateObject(47263906.84546, -1809.797240.00000,   0.000000.000000.00000);
CreateObject(16553924.25928, -1802.053342.44000,   0.000000.00000112.99900);
CreateObject(16553911.01709, -1788.675052.38000,   0.000000.00000170.00000);
CreateObject(16553893.24805, -1796.236822.36000,   0.000000.00000231.00000);
CreateObject(16553923.07935, -1819.566532.36000,   0.000000.0000053.00000);
CreateObject(16553904.47827, -1827.663332.36000,   0.000000.00000350.99500);
CreateObject(16553890.04834, -1816.274052.36000,   0.000000.00000292.00000);
CreateObject(51853871.41699, -1767.629882.60000,   0.000000.00000182.00000);
CreateObject(27803897.23047, -1811.251831.30272,   0.000000.000000.00000);
CreateObject(27803913.35962, -1794.359861.30272,   0.000000.000000.00000);
CreateObject(27803924.14917, -1812.236211.30272,   0.000000.000000.00000);
CreateObject(27803894.66992, -1821.924191.30272,   0.000000.000000.00000);
CreateObject(27803891.72070, -1801.288571.30272,   0.000000.000000.00000);
CreateObject(27803909.24585, -1816.280031.30272,   0.000000.000000.00000);
CreateObject(27803901.06274, -1800.965701.30272,   0.000000.000000.00000);
CreateObject(27803914.87915, -1805.348021.30272,   0.000000.000000.00000);
CreateObject(12323949.86182, -1767.487180.13870,   0.000000.000000.00000);
CreateObject(12323894.04102, -1747.197390.13870,   0.000000.000000.00000);
CreateObject(12323852.33740, -1790.432860.13870,   0.000000.000000.00000);
CreateObject(12323861.79614, -1849.811280.13870,   0.000000.000000.00000);
CreateObject(12323919.20361, -1865.779790.13870,   0.000000.000000.00000);
CreateObject(12323963.77002, -1825.368410.13870,   0.000000.000000.00000);
    
//SPderby
    
CreateObject(63424180.09033, -1558.231328.54030,   0.000000.00000317.79999);
CreateObject(63424100.58740, -1608.075328.56030,   0.000000.000000.00000);
CreateObject(63424075.97534, -1707.587778.55030,   0.000000.0000046.00000);
CreateObject(63424130.46533, -1794.423348.56030,   0.000000.0000092.00000);
CreateObject(63424230.79834, -1815.560428.57030,   0.000000.00000138.00000);
CreateObject(63424315.72217, -1758.049938.57030,   0.000000.00000184.00000);
CreateObject(63424333.31396, -1657.132458.57030,   0.000000.00000230.00000);
CreateObject(63424272.90674, -1574.321788.56030,   0.000000.00000276.00000);
CreateObject(137254206.91260, -1687.262948.62860,   0.000000.0000045.00000);
CreateObject(34584248.98633, -1709.6637014.72840,   0.000000.0000090.00000);
CreateObject(34584143.37598, -1727.308359.53030,   0.00000, -15.000000.00000);
CreateObject(34584182.68701, -1626.4781521.78600,   0.000000.000000.00000);
CreateObject(34584165.03906, -1664.3858614.70840,   0.000000.0000090.00000);
CreateObject(34584206.88721, -1664.3831814.70840,   0.000000.0000090.00000);
CreateObject(34584270.66260, -1646.767469.53300,   0.0000015.000000.00000);
CreateObject(34584289.47949, -1709.660895.21950,   0.000000.0000090.00000);
CreateObject(34584231.35254, -1686.9075914.71840,   0.000000.000000.00000);
CreateObject(34584207.04492, -1709.6596714.70840,   0.000000.0000090.00000);
CreateObject(34584165.05908, -1709.6644314.70840,   0.000000.0000090.00000);
CreateObject(34584185.48584, -1727.2867414.69840,   0.000000.000000.00000);
CreateObject(34584182.68555, -1687.1126714.70840,   0.000000.000000.00000);
CreateObject(34584187.40430, -1646.7564714.69840,   0.000000.000000.00000);
CreateObject(34584143.36523, -1646.752209.53030,   0.00000, -15.000000.00000);
CreateObject(34584143.36719, -1687.125249.53030,   0.00000, -15.000000.00000);
CreateObject(34584182.68799, -1747.0933821.62050,   0.000000.000000.00000);
CreateObject(34584270.66162, -1727.303599.55300,   0.0000015.000000.00000);
CreateObject(34584270.66797, -1686.902229.54300,   0.0000015.000000.00000);
CreateObject(34584165.05908, -1646.6971413.39300,   0.00000, -25.0000090.00000);
CreateObject(34584124.50537, -1709.647095.21000,   0.000000.0000090.00000);
CreateObject(34584289.46631, -1704.694955.20950,   0.000000.0000090.00000);
CreateObject(34584289.46875, -1664.398565.20910,   0.000000.0000090.00000);
CreateObject(34584124.50488, -1664.390015.20910,   0.000000.0000090.00000);
CreateObject(34584124.50537, -1704.161875.19990,   0.000000.0000090.00000);
CreateObject(34584248.99121, -1664.3991714.70840,   0.000000.0000090.00000);
CreateObject(34584248.99072, -1646.6988513.38840,   0.00000, -25.0000090.00000);
CreateObject(34584226.61914, -1646.7545214.69840,   0.000000.000000.00000);
CreateObject(34584231.34961, -1626.4864521.77840,   0.000000.000000.00000);
CreateObject(34584191.34619, -1626.4824221.78840,   0.000000.000000.00000);
CreateObject(34584248.98389, -1726.8726813.22840,   0.0000025.0000090.00000);
CreateObject(34584165.05078, -1726.8680413.22840,   0.0000025.0000090.00000);
CreateObject(34584226.59619, -1727.2990714.69840,   0.000000.000000.00000);
CreateObject(34584231.34277, -1747.0949721.62080,   0.000000.000000.00000);
CreateObject(34584191.71289, -1747.0930221.61990,   0.000000.000000.00000);
CreateObject(35154206.76172, -1686.9273717.65340,   0.000000.000000.00000);
CreateObject(84934191.37891, -1794.0882616.43911,   0.000000.0000090.00000);
CreateObject(84934193.35547, -1580.1141416.43911,   0.000000.0000090.00000);
CreateObject(115564153.06494, -1588.666994.39458,   0.000000.0000027.00971);
CreateObject(115564253.63232, -1595.356814.39458,   0.000000.00000328.56906);
CreateObject(161394182.55078, -1561.04272, -5.29340,   0.000000.00000353.96121);
CreateObject(161394216.02734, -1560.11707, -5.29340,   0.000000.00000346.20602);
CreateObject(115564141.18457, -1778.693123.99402,   0.000000.00000151.41264);
CreateObject(115564243.76465, -1791.458623.68061,   0.000000.00000206.28796);
CreateObject(161394213.89014, -1809.43909, -8.15714,   0.000000.00000350.69391);
CreateObject(161394188.74512, -1808.44995, -4.47967,   0.000000.00000331.59430);
CreateObject(35054237.59131, -1805.619638.24140,   30.000000.00000167.54311);
CreateObject(35054135.42871, -1783.630628.24140,   20.000000.00000167.54311);
CreateObject(35054178.00928, -1804.3415512.12140,   20.0000020.00000167.54311);
CreateObject(35054256.05811, -1789.094248.24140,   0.000000.00000167.54311);
CreateObject(12154123.35449, -1781.5256314.98137,   0.000000.000000.00000);
CreateObject(12154139.79736, -1785.4928010.80119,   0.000000.000000.00000);
    return 
1;
}
//----------------------------------------------------------
public OnPlayerUpdate(playerid)
{
    if(!
IsPlayerConnected(playerid)) return 0;
    if(
IsPlayerNPC(playerid)) return 1;
    
// changing cities by inputs
    
if( !gPlayerHasCitySelected[playerid] &&
        
GetPlayerState(playerid) == PLAYER_STATE_SPECTATING ) {
        
ClassSel_HandleCitySelection(playerid);
        return 
1;
    }
    
    
// No weapons in interiors
    
if(GetPlayerInterior(playerid) != && GetPlayerWeapon(playerid) != 0) {
        
SetPlayerArmedWeapon(playerid,0); // fists
        
return 0// no syncing until they change their weapon
    
}
    
    
    
    
/* No jetpacks allowed
    if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK) {
        Kick(playerid);
        return 0;
    }*/
    /* For testing animations
    new msg[128+1];
    new animlib[32+1];
    new animname[32+1];
    thisanimid = GetPlayerAnimationIndex(playerid);
    if(lastanimid != thisanimid)
    {
        GetAnimationName(thisanimid,animlib,32,animname,32);
        format(msg, 128, "anim(%d,%d): %s %s", lastanimid, thisanimid, animlib, animname);
        lastanimid = thisanimid;
        SendClientMessage(playerid, 0xFFFFFFFF, msg);
    }*/
    
return 1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
     {
     return 
1;
     }
CMD:smb(playeridparams[])
{
    
SetPlayerPos(playerid,  154.2825,-1954.7573,4.7508);
    
SetPlayerFacingAngle(playerid0);
    
SendClientMessage(playeridCOLOR_PINK"Santa Maria Beach");
    return 
1;
}
CMD:aa(playeridparams[])
{
    
SetPlayerPos(playerid366.6012,2536.2109,17.6443);
    
SetPlayerFacingAngle(playerid180);
    
SendClientMessage(playeridCOLOR_PINK"Abandoned Airport");
    return 
1;
}
CMD:sfa(playeridparams[])
{
   
SetPlayerPos(playerid, -1357.3173,-241.3204,15.2904);
   
SetPlayerFacingAngle(playerid318);
   
SendClientMessage(playeridCOLOR_PINK"San Ferrio Airport");
   return 
1;
}
CMD:derby(playeridparams[])
{
   
SetPlayerPos(playerid4070.8362,-1690.5979,29.8003);
   
SendClientMessage(playeridCOLOR_PINK"Derby(Under Construction)");
   return 
1;
}
   
//---------------------------------------------------------- 



Re: Real time issues - Jessyy - 18.08.2014

actually the time system is from a filterscripts, so check them...


Re: Real time issues - Inquisitive - 18.08.2014

Quote:
Originally Posted by Jessyy
Посмотреть сообщение
actually the time system is from a filterscripts, so check them...
I know, but is there any script to disable it so when i set the time to night for all players, it stays night all the way?

P.S, im just a newbie :3


Re: Real time issues - Jessyy - 18.08.2014

you need to rewrite the actual script to do that... and to do that first you will need to find the code whit time system...


Re: Real time issues - Inquisitive - 18.08.2014

Quote:
Originally Posted by Jessyy
Посмотреть сообщение
you need to rewrite the actual script to do that... and to do that first you will need to find the code whit time system...
I found it, It'll be great if i know how to rewrite the script. Anyone knows the script for it?