1st beta test release (bugs are allowed :D)

	          ///    GRAND THEFT AUTO IV    ///
	    	 /// "ALICE" SCRIPTING PROJECT /// 

1.What is Alice ?
  Alice is the gta iv script language engine parts binded
  to lua script language.

  ps: There are many Lua manuals in the web.
      GTAIV.exe v1.0.1.0 is supported only

  Alice needs ASI Loader to run .

2.What about script files ?
  All(*.lua) scripts are running separetly and must be placed
  in "GTAIV\Alice" folder , scripts will not restart after
  save reloading , all of them is starting with the game .
  You can put examples in "GTAIV\Alice" folder and play now =)

3.General scripting information :
  GTA IV has many script functions called "Native API" or "natives".
  Alice lua script can call any of this functions from itself.
  Everyone who knows something about assembler and function call
  concept will understand all this native-sh1t what i wrote below
  without any problems :
  [!!! its recomended to look at examples and read this at one time] 
  ----- General functions ----- 
   To push integer/float parameter into the calling native func use 
     PushInt(Value) / PushFloat(Value)
   To push script pointer use
     PushVarPtr() -- no params, if native changes pushed value
		  -- u must use this function and after native
                  -- calling read the value of this variable
   To get integer/float param from stack after native call use
     Value = GetIntParam(ParamNumber) /
     Value = GetFloatParam(ParamNumber)
   To get the integer/float result of function (if exists) use
     Val = GetIntResult() / Val = GetFloatResult()  
   At least, to call native function use
     CallNative("NATIVE_FUNCTION_NAME") -- names are declared in
					-- other files
     (WARNING : You can't use functions which operate with models,
                and now i don't know what is the reason of this .)
   ----- Other needed functions (not for natives) -----
   Game must be started to use native functions, so we need a check:
     bool IsPlayerPoolCreated() -- if player pool is ok then we can 
				-- use some native functions 
     bool IsKeyPressed(AnsiKeyNum) -- checking any ansi key state
     Wait(Milliseconds) -- stops script for a needed time
     PrintFloatToLog(Value) / PrintStrToLog("STRING") -- prints 
						      -- to log
     
   ----- Call example -----
      --  GET_PLAYER_CHAR(0, &Var) 
      --  declarations of functions u will see soon ,
      --  and now look at additional files  
      PushInt(0) -- 0 param
      PushVarPtr() -- 1 param (this is our &Var)	
      CallNative("GET_PLAYER_CHAR") -- making a call
      PLAYER_CHAR = GetIntParam(1) -- reading the value
				   -- from 1 parameter
 
   ----- Player structure organization -----
      int GET_PLAYER_ID() -- get player id , using only for getting
                          -- results of next functions
                          --  (always 0 in single player mode);
      int CONVERT_INT_TO_PLAYERINDEX( GET_PLAYER_ID() ) -- get player 
             -- index from id , this is player definition variable
             -- (in SA was $PLAYER_CHAR) (always 0 in single player mode);
      GET_PLAYER_CHAR( CONVERT_INT_TO_PLAYERINDEX( GET_PLAYER_ID() ), &PlayerChar )
             -- get player char from player index , this is "player as ped/actor"
             -- definition variable (in SA was $PLAYER_ACTOR);

By: Finking



