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 - !

#76
Support / Re: connection issues
Jul 25, 2018, 10:55 AM
#77
Off-Topic General / Re: php signature
Jul 24, 2018, 12:54 PM
Is it necessary to lock this topic?
#78
Quote from: Pop360 on Jul 20, 2018, 09:50 PMI'm tired of seeing "systems" like that.
Those who have a different way of doing this are rare. More like a copy of the old Warchiefs Squirrel.

Hopefully one will be out soon GUI based by me. ;D
#79
Support / Re: readinistring
Jul 23, 2018, 08:41 AM
Okay after learning some stuff about ini
http://wiki.vc-mp.org/wiki/Scripting/Squirrel/Functions/WriteIniString
http://wiki.vc-mp.org/wiki/Scripting/Squirrel/Functions/ReadIniString

Quote from: MEGAMIND on Jul 21, 2018, 06:18 PMmy WriteIniString is
WriteIniString("objects.ini","autosaved",i.tostring(), "CreateObject("+o.Model+","+o.World+",Vector"+o.Pos+","+o.Alpha+").RotateToEuler(Vector"+o.RotationEuler+",1);"); }
Quote from: MEGAMIND on Jul 23, 2018, 08:04 AMumm anyone i did this too but i dont see anyobject

NewTimer("LoadAllObjects",10000,1);

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;
  }
}

Your mistake is the string section in both of these functions need to be same but you have used autosaved in WriteIniString while objects in ReadIniString
bool WriteIniString( string filename, string section, string var, string value )
string ReadIniString( string filename, string section, string var )

Since @Athanatos has already answered.
Use this and check console if it gives any message.
WriteIniString( "objects.ini", "autosaved", i.tostring(), "CreateObject( "+o.Model+", "+o.World+", Vector"+o.Pos+", "+o.Alpha+" ).RotateToEuler( Vector"+o.RotationEuler+", 1 );" );

function LoadAllObjects()
{
local i = 0;
while(true)
{
local str = ReadIniString( "objects.ini", "autosaved", i.tostring() );
if( !str ) break;
else
{
local eCompile = compilestring( str );
eCompile();
print( "Created Object: "+i );
i++;
}
}
for( local j = 0; j < GetObjectCount(); j++ )
{
FindObject(j).TrackingShots = true;
}
}
LoadAllObjects();
:edit:

#80
Support / Re: readinistring
Jul 21, 2018, 07:21 PM
Quote from: MEGAMIND on Jul 21, 2018, 06:32 PMy 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
Don't know about ini but after reading data from ini file you must have to compile it in order to create those objects at their locations.
#81
Support / Re: lock a world
Jul 19, 2018, 09:14 AM
Locked_Worlds -> [];

function onPlayerComand(player, cmd, args) {
if(cmd == "world") {
if(!IsNum(args)) return false;
if( Locked_Words.find( args.tointeger() ) != null ) return false;
player.World = args.tointeger()
}
else if( cmd == "lockworld" ) {
if(!IsNum(args)) return false;
if( Locked_Words.find( args.tointeger() ) != null ) return false;
Locked_Words.push( args.tointeger() );
}
else if( cmd == "unlockworld" ) {
if(!IsNum(args)) return false;
if( Locked_Words.find( args.tointeger() ) == null ) return false;
Locked_Words.remove( Locked_Words.find( args.tointeger() ) );
}
}
#82
ysc3839's VC:MP Launcher / Re: Preview 5
Jul 14, 2018, 10:40 AM
BUG: First click on one of the first three tabs ( Favorites, Internet, Official ) and then immediately click on Lan Tab the list of server from that tab will be loaded under Lan tab.
Proof:
#83
ysc3839's VC:MP Launcher / Re: Preview 5
Jul 11, 2018, 09:55 AM
The vcmp official browser didn't give this but this one do.


#84
Support / Re: Coonect php to server DB
Jul 08, 2018, 10:57 AM
Quote from: MEGAMIND on Jul 08, 2018, 09:16 AMive been using PHP  alot for search engines etc etc but never figured out how to connect it to vcmp server db

is there any snippet like thing for it
This link contains complete information of creating a connection to MySQL database using php
https://secure.php.net/manual/en/mysqli.quickstart.connections.php

$mysqli = new mysqli("localhost", "user", "password", "database");


You said you wants to connect to server database using php. Is it MySQL? Because the above will allow you to connect to MySQL database not SQL.
#85
Quote from: KrooB on Jul 07, 2018, 07:58 PMbro i try but not worked your code , sprites & message.nut everything right loc

Take these two lines out of your Script::ScriptLoad( ) to the top.
keyBIND_F1 <- KeyBind( 0x70 );
COLOR_BLUE   <- Colour( 0, 0, 255 );

Here's the sample file.

Quote from: ! on Aug 31, 2017, 12:50 PM[spoiler=Sample_Store_File]

[/spoiler]
#86
Quote from: KrooB on Jul 06, 2018, 05:25 PMbro where is the link :D
Fixed
PS: You don't need linked files just copy and paste the snippets in their correct locations and do correct configuration for img names and news etc.
#87
General Discussion / Re: wep shoot disable
Jul 05, 2018, 02:04 PM
You must be doing something wrong. I've done it many times worked for me.

try changing player world before disabling attack.
if ( cmd == "drift" )
{
 player.World = 9;         
 player.IsWeaponSyncBlocked = false;
 player.CanAttack = false;
 MessagePlayer( "*** Teleported To Drifting Arena..If You Want To Exit Type /leave ", player );
}
#88
General Discussion / Re: [Question] Radar Map
Apr 02, 2018, 06:01 PM
@GangstaRas for coordinates
X: -830.4599999999998
Y: 1077.4720000000002

The above procedure gives
51th section not the correct one.

Similarly
X: -1145.75
Y: 156.719
Gives 37th section but the actual one is 25th section.
#89
General Discussion / Re: [Question] Radar Map
Apr 02, 2018, 02:17 PM
@GangstaRas Thanks man you saved my day.It was really helpful.
#90
General Discussion / [Question] Radar Map
Mar 26, 2018, 05:16 PM
How to change the radar I know to make png with 128x128 from 00 to 63 files but my question is

How to find out the correct place of each section?

Is there any software used something like moo mapper or any other to put the radar section in their correct place and leave the rest of sections as empty or water texture.