Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - MEGAMIND

#706
Support / Re: readinistring
Jul 21, 2018, 06:32 PM
Quote from: Athanatos on Jul 21, 2018, 06:26 PMTo create the object:
for(local i =0 ; i < 3000; i++)
{
try{
compilestring("objects.ini","autosaved",i.tostring())
}
catch(e) { }
}
y compile autosave i just want to read objects.ini so that wahtsoever object is present in objects.ini so when i join game the object should be present at its location + that for thing didnt worked too
#707
Support / readinistring
Jul 21, 2018, 06:18 PM
actually im new to ini and using this first time so how do i read ini

my WriteIniString is
WriteIniString("objects.ini","autosaved",i.tostring(), "CreateObject("+o.Model+","+o.World+",Vector"+o.Pos+","+o.Alpha+").RotateToEuler(Vector"+o.RotationEuler+",1);"); }

and my output to that is

[objects]
0                           = CreateObject(636,17,Vector(-1399.7, -650.131, 15.8679),255).RotateToEuler(Vector(3.0996, 3.0871, -1.26476),1);

how would i be able t read it

so far i have tried this but it wont work
if (ReadIniString( "objects.ini", "objects", i.tostring() )==null);
{
         print("objects reloaded");
    }
#708
Servers / Re: [0.4]Top Down City Server
Jul 21, 2018, 03:59 PM


15/7/2018 -> Update:-
Added approve system (to become a real citizen of TDCS)
Added /wepcmds (get weps at ammunations)
Fixed healing system
Added custom pickups
Website Updated
Added Webstats to website
Added Lights to vehicles
Added few higer prices to stuff

16/7/2018 -> Update:-
Added passport & visa system

19/7/2018
Added mapping system
Added Spec system
Admin cmds updated
bugs fixed
Some minor lags still occur when mapping ("Will get it fixed soon")

20/7/2018
Website Updated

21/7/2018
Website stabled
Webstats added
TAC stabled
Server:
Mapping world lag issue fixed
Server lagging after 10 sec fix
added vehicle system in world
Removed bad codes, which made server lagged and heavy
#709
Support / lock a world
Jul 19, 2018, 08:45 AM
as the topic says can we lock a specific wolr and then open it our selves too?
#710
Support / Re: player.world
Jul 18, 2018, 06:22 PM
Quote from: Doom_Kill3R on Jul 18, 2018, 06:18 PMfunction onPlayerComand(player, cmd, args) {
    if(cmd == "world") {
        if(!IsNum(args)) return false;
        player.World = args.tointeger()
    }
}
awsome thanks alot..
#711
Support / player.world
Jul 18, 2018, 06:14 PM
does anyone know that how can we make a cmd in which if a player does /goto world of his own choice like

/world 15 upto so on

if anyone know how to do it, ill be gratefull
#712
Support / Re: ini object n lag!
Jul 18, 2018, 04:19 PM
anyone else there or could some one convert this shit to db or something else
#713
Support / ini object n lag!
Jul 18, 2018, 03:28 PM
hello everyone i have an issue, well it works fine i can save load objects but the problem is it lags as hell

well heres the code

autosave <- NewTimer("SaveObjects",10000,0);
LoadAllObjects();

and in functions

function LoadAllObjects()
{ local i = 0;
  while(true)
  {
    local str = ReadIniString( "objects.ini", "objects", i.tostring() );
    if(!str) break;
    else
    {
      local a = compilestring(str);
      a();

      i++;
    }
  }
  for(local a=0;a<GetObjectCount();a++)
  {
      FindObject(a).TrackingShots = true;
  }
}

function SaveObjects()
{ local n = GetObjectCount();
  for(local i=0;i<n;i++)
  {
    local o = FindObject(i);
    if(o) {
    WriteIniString("objects.ini","autosaved",i.tostring(), "CreateObject("+o.Model+","+o.World+",Vector"+o.Pos+","+o.Alpha+").RotateToEuler(Vector"+o.RotationEuler+",1);"); }
  }
}

function LoadAutoSaved()
{
  local i = 0;
    while(true)
    {
      local str = ReadIniString( "objects.ini", "autosaved", i.tostring() );
      if(!str) break;
      else
      {
        local a = compilestring(str);
        a();

        i++;
      }
    }
    for(local a=0;a<GetObjectCount();a++)
    {
        FindObject(a).TrackingShots = true;
    }
}
it lags alot when a second player either joins or not while creating object it lags too

so is there a better way to do it
#714
Quote from: Sebastian on Jul 16, 2018, 07:10 AMhmmm. I would like to try it out. Are there servers online ?
yup only in citizen iv
#715
Support / Re: Connect lw ( all server )
Jul 16, 2018, 04:40 AM
*bump*
#716
Off-Topic General / Re: php signature
Jul 16, 2018, 04:37 AM
*bump*
#717
Support / Re: weapons are not readable
Jul 15, 2018, 05:52 PM
Quote from: Xmair on Jul 15, 2018, 05:23 PMIt's from 2015..
still urs ofc XD
#718
Support / Re: weapons are not readable
Jul 15, 2018, 03:42 PM
Quote from: Athanatos on Jul 15, 2018, 03:29 PM else if ( cmd == "wep" )
 {
 if (!text) MessagePlayer("/wep <Wep Name>", player);
 else
 {
 local Pos = player.Pos, checkpoly = InPoly( Pos.x, Pos.y, -682.612488, 1201.854736,  -682.759827, 1208.136597, -666.613953, 1211.414185,  -666.614258, 1202.456909);
 local wep = GetWeaponName(GetWeaponID(text));
 if( checkpoly == false ) MessagePlayer("You need to be at the ammunation shop in Downtown to buy weapons!", player);
 else if (wep == "M60")
 {
 if ( player.Cash <= 49999) MessagePlayer("You need to have atleast 50000$!", player);
 player.SetWeapon(32,9999)
 player.Cash-=50000;
 MessagePlayer("Successfully Received An [#ffffff]"+wep+"", player);
 }
 else if (wep == "M4")
 {
 if ( player.Cash <= 49999) MessagePlayer("You need to have atleast 50000$!", player);
 player.SetWeapon(26,9999)
 player.Cash-=50000;
 MessagePlayer("Successfully Received An [#ffffff]"+wep+"", player);
 }
 else if ((wep == "Ruger")||(wep == "ruger"))
 {
 if ( player.Cash <= 49999) MessagePlayer("You need to have atleast 50000$!", player);
 player.SetWeapon(27,9999)
 player.Cash-=50000;
 MessagePlayer("Successfully Received An [#ffffff]"+wep+"", player);
 }
 else if (wep.tolower() == "mp5")
 {
 if ( player.Cash <= 49999) MessagePlayer("You need to have atleast 50000$!", player);
 player.SetWeapon(25,9999)
 player.Cash-=50000;
 MessagePlayer("Successfully Received An [#ffffff]"+wep+"", player);
 }
 else if (wep.tolower() == "uzi")
 {
 if ( player.Cash <= 49999) MessagePlayer("You need to have atleast 50000$!", player);
 player.SetWeapon(23,9999)
 player.Cash-=50000;
 MessagePlayer("Successfully Received An [#ffffff]"+wep+"", player);
 }
 else MessagePlayer("Sorry we don't have that type of model of the weapon "+text+" here.", player);
 }
 }
Tested on my server. This one works. PM me if it dosen't.

Quote from: Xmair on Jul 15, 2018, 03:24 PMI don't have any system like that. It's scripted too badly.
:/ I know. Took me few minutes to find out how to fix that.
#719
Support / Re: weapons are not readable
Jul 15, 2018, 03:36 PM
Quote from: Xmair on Jul 15, 2018, 03:24 PMI don't have any system like that. It's scripted too badly.

https://forum.vc-mp.org/?topic=1875.msg13905#msg13905 ur system
#720
Support / weapons are not readable
Jul 15, 2018, 12:18 PM
i just made the poly the rest of it is XMAIRS wep system probably idk

so what the problem, its not reading some of the weps name

else if ( cmd == "wep" )
 {
 if (!text) MessagePlayer("/wep <Wep Name>", player);
 else
 {
 local Pos = player.Pos, checkpoly;
 checkpoly = InPoly( Pos.x, Pos.y, -682.612488, 1201.854736,  -682.759827, 1208.136597, -666.613953, 1211.414185,  -666.614258, 1202.456909);
 local wep = GetWeaponName(GetWeaponID(text));
 if( checkpoly == false ) MessagePlayer("You need to be at the ammunation shop in Downtown to buy weapons!", player);
 else if (wep == "M60")
 {
 if ( player.Cash <= 49999) MessagePlayer("You need to have atleast 50000$!", player);
 player.SetWeapon(32,9999)
 player.Cash-=50000;
 MessagePlayer("Successfully Received An [#ffffff]"+wep+"", player);
 }
 else if (wep == "M4")
 {
 if ( player.Cash <= 49999) MessagePlayer("You need to have atleast 50000$!", player);
 player.SetWeapon(26,9999)
 player.Cash-=50000;
 MessagePlayer("Successfully Received An [#ffffff]"+wep+"", player);
 }
 else if ((wep == "Ruger")||(wep == "ruger"))
 {
 if ( player.Cash <= 49999) MessagePlayer("You need to have atleast 50000$!", player);
 player.SetWeapon(27,9999)
 player.Cash-=50000;
 MessagePlayer("Successfully Received An [#ffffff]"+wep+"", player);
 }
 else if (wep == "MP5")
 {
 if ( player.Cash <= 49999) MessagePlayer("You need to have atleast 50000$!", player);
 player.SetWeapon(25,9999)
 player.Cash-=50000;
 MessagePlayer("Successfully Received An [#ffffff]"+wep+"", player);
 }
 else if ((wep == "UZI")||(wep == "uzi"))
 {
 if ( player.Cash <= 49999) MessagePlayer("You need to have atleast 50000$!", player);
 player.SetWeapon(23,9999)
 player.Cash-=50000;
 MessagePlayer("Successfully Received An [#ffffff]"+wep+"", player);
 }
 else MessagePlayer("Sorry we don't have that type of model of the weapon "+text+" here.", player);
 }
 }

so i have checked it so far its not reading the wep uzi i also added a wep flamethrower but didnt read the too


any help would be appreciable