GTAMP.com

Grand Theft Auto Multiplayer
It is currently Wed Dec 12, 2018 4:11 pm

All times are UTC




Post new topic Reply to topic  [ 66 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
PostPosted: Fri Nov 16, 2018 10:35 am 
Offline
Car Jacker
User avatar

Joined: Sun Feb 21, 2010 10:03 pm
Posts: 45
I think i'll go at a more classical radar approach first, see how that works.

Got good news: i've managed to add your tank tracks idea, i also improved skidmarks quite by a lot, and am now succesfully testing scripting, i've updated the binary, but i'm working on new stuff already.


Top
 Profile  
 
PostPosted: Sat Nov 17, 2018 5:04 am 
Offline
Serial Killer

Joined: Wed Dec 09, 2015 2:18 pm
Posts: 208
JernejL wrote:
I think i'll go at a more classical radar approach first, see how that works.

Got good news: i've managed to add your tank tracks idea, i also improved skidmarks quite by a lot, and am now succesfully testing scripting, i've updated the binary, but i'm working on new stuff already.
About radars, it was just a hint of how to make it. In addition, the mini radar (as in the GTA 3D series) is easier to make. However, but i believe that the radar is not necessary (in GTA1/2 analogs) as it gives the game its atmosphere.

Waiting for updates.

P.S.: Also you can make a video of the gameplay and the updated Map editor? I am very interesting to see. Now I can only rate the videos.

_________________
Map F-Industry-Live
MISI Library


Top
 Profile  
 
PostPosted: Sat Nov 17, 2018 6:45 pm 
Offline
User avatar

Joined: Sat Dec 26, 2009 11:53 pm
Posts: 1101
gta2 does guide the player with arrows. maybe extend that feature instead to inform about things that are out of the screen. eg: show a symbol for a junction or a curve and an indicator for how far it is a away at the edge of the screen. just smaller and less ugly. the big red dot shows that the traffic light is red and the small green, yellow and red dots would appear gradually to indicate how far he is away from it. the curve above the juction shows what comes next if you go north. it can also be used to show where the next road is if you are off road. i think this could do some of the jobs a minimap has and targets could be incorporated with that as well.


Attachments:
File comment: shows junction ahead of player
navigation.png
navigation.png [ 328.44 KiB | Viewed 4247 times ]

_________________
yur sa'nok ngeyä
Top
 Profile  
 
PostPosted: Sun Nov 18, 2018 12:28 am 
Offline
Serial Killer

Joined: Wed Dec 09, 2015 2:18 pm
Posts: 208
elypter wrote:
gta2 does guide the player with arrows. maybe extend that feature instead to inform about things that are out of the screen. eg: show a symbol for a junction or a curve and an indicator for how far it is a away at the edge of the screen. just smaller and less ugly. the big red dot shows that the traffic light is red and the small green, yellow and red dots would appear gradually to indicate how far he is away from it. the curve above the juction shows what comes next if you go north. it can also be used to show where the next road is if you are off road. i think this could do some of the jobs a minimap has and targets could be incorporated with that as well.
Elypter suggested an interesting idea with traffic lights. You can use it. For example, show road signs that are closer to the player’s vehicle. You do not need to show the whole map. The targets can be marked with arrows.
Attachment:
IMG_20181118_025908.jpg
IMG_20181118_025908.jpg [ 162.88 KiB | Viewed 4238 times ]

P.S: I also note that this proposal is just food for thought.

Added:

Examples of different styles of arrows:
    1) Colored arrow + target icon.
    2) Colored arrow + target icon + distance counter to target.
    3) Colored arrow + text label (for example, 16 characters long).
    4) Colored arrow with a circle + target icon.
Attachment:
IMG_20181118_024716.jpg
IMG_20181118_024716.jpg [ 166.41 KiB | Viewed 4230 times ]

_________________
Map F-Industry-Live
MISI Library


Top
 Profile  
 
PostPosted: Sun Nov 18, 2018 1:29 pm 
Offline
Serial Killer

Joined: Wed Dec 09, 2015 2:18 pm
Posts: 208
An example of how you can reload tank shells. Displays the type of shell and ammo. When reloading the projectile from the right side goes to the left (stops), when fired the projectile disappears.
Attachment:
IMG_20181118_024716.jpg
IMG_20181118_024716.jpg [ 172.38 KiB | Viewed 4210 times ]

Download:
Attachment:
tank_shells.jpg
tank_shells.jpg [ 13.97 KiB | Viewed 3226 times ]

Icons of tank shells.
Attachment:
tank_shells.zip [23.86 KiB]
Downloaded 168 times

_________________
Map F-Industry-Live
MISI Library


Last edited by Logofero on Tue Nov 20, 2018 10:08 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Mon Nov 19, 2018 1:57 am 
Offline
Serial Killer

Joined: Wed Dec 09, 2015 2:18 pm
Posts: 208
Examples of gaming hud. For reflection.


Attachments:
IMG_20181118_024716.jpg
IMG_20181118_024716.jpg [ 175.18 KiB | Viewed 4178 times ]
IMG_20181119_032256.jpg
IMG_20181119_032256.jpg [ 173.75 KiB | Viewed 4178 times ]
IMG_20181119_044041.jpg
IMG_20181119_044041.jpg [ 173.08 KiB | Viewed 4178 times ]
IMG_20181119_042626.jpg
IMG_20181119_042626.jpg [ 174.52 KiB | Viewed 4178 times ]

_________________
Map F-Industry-Live
MISI Library
Top
 Profile  
 
PostPosted: Mon Nov 19, 2018 8:16 am 
Offline
Car Jacker
User avatar

Joined: Sun Feb 21, 2010 10:03 pm
Posts: 45
An objective radar would be nice, one that shows only the target area on radar and specifies target.

Distance on arrows sounds like good idea too, i might have multiple, various options availible on how to hande this, but i dont think a road sign system would work good, it could fail depending on road network and wouldn't work on foot inbetween buildings.


Top
 Profile  
 
PostPosted: Mon Nov 19, 2018 9:21 am 
Offline
Serial Killer

Joined: Wed Dec 09, 2015 2:18 pm
Posts: 208
> i dont think a road sign system would work good, it could fail depending on road network and wouldn't work on foot inbetween buildings.

Yes. Road signs should not work when the main character is a pedestrian. The idea of ​​signs to warn about turns in the direction of vehicle (alt navigation). However, I do not think this is important. But this is a cool feature.


Attachments:
IMG_20181119_121151.jpg
IMG_20181119_121151.jpg [ 185.88 KiB | Viewed 4168 times ]

_________________
Map F-Industry-Live
MISI Library
Top
 Profile  
 
PostPosted: Mon Nov 19, 2018 6:12 pm 
Offline
User avatar

Joined: Sat Dec 26, 2009 11:53 pm
Posts: 1101
JernejL wrote:
An objective radar would be nice, one that shows only the target area on radar and specifies target.

Distance on arrows sounds like good idea too, i might have multiple, various options availible on how to hande this, but i dont think a road sign system would work good, it could fail depending on road network and wouldn't work on foot inbetween buildings.


it should resemble a satnav and be a feature the individual cars, just like radio. you could add the passways between buildings as well but that is a stylistic choice. gta4 and 5 have small driveways in their system but i think it would be bad for the game if they werent. its a question of balancing of things being useful but not too overpowered so you still have to use your brain and have a benefit from knowing the city. i thought of those as small hints rather than a full blown guidance system. you could and probably should still have a map that you can bring up with a button and have both features complement each other and not having to use a minimap. i always thought minimaps are a bit of a bad compromise. too small to be really useful and too big to not being distracting and you constantly have to move your eyes into a corner which often causes accidents or makes you miss something important.

_________________
yur sa'nok ngeyä


Top
 Profile  
 
PostPosted: Mon Nov 19, 2018 7:12 pm 
Offline
Car Jacker
User avatar

Joined: Sun Feb 21, 2010 10:03 pm
Posts: 45
elypter wrote:
JernejL wrote:
An objective radar would be nice, one that shows only the target area on radar and specifies target.

Distance on arrows sounds like good idea too, i might have multiple, various options availible on how to hande this, but i dont think a road sign system would work good, it could fail depending on road network and wouldn't work on foot inbetween buildings.


it should resemble a satnav and be a feature the individual cars, just like radio. you could add the passways between buildings as well but that is a stylistic choice. gta4 and 5 have small driveways in their system but i think it would be bad for the game if they werent. its a question of balancing of things being useful but not too overpowered so you still have to use your brain and have a benefit from knowing the city. i thought of those as small hints rather than a full blown guidance system. you could and probably should still have a map that you can bring up with a button and have both features complement each other and not having to use a minimap. i always thought minimaps are a bit of a bad compromise. too small to be really useful and too big to not being distracting and you constantly have to move your eyes into a corner which often causes accidents or makes you miss something important.


Maybe a minimap compromise can be made.. i can guide player to goals using arrows + distance, and also use a full-size map in the menus where goals are marked on a full, proper city map where you can see where you need to go, and can plan your path.


Top
 Profile  
 
PostPosted: Tue Nov 20, 2018 8:19 am 
Offline
Serial Killer

Joined: Wed Dec 09, 2015 2:18 pm
Posts: 208
Reloading tank shell example.


Attachments:
tank_fire_and_reloading.gif
tank_fire_and_reloading.gif [ 467.67 KiB | Viewed 3444 times ]

_________________
Map F-Industry-Live
MISI Library
Top
 Profile  
 
PostPosted: Tue Nov 20, 2018 8:42 am 
Offline
Boss
User avatar

Joined: Tue Mar 04, 2008 6:51 am
Posts: 1345
Location: GTAMP.com
That is a cool looking way to show a reload.


Top
 Profile  
 
PostPosted: Wed Nov 21, 2018 10:39 am 
Offline
Serial Killer

Joined: Wed Dec 09, 2015 2:18 pm
Posts: 208
Sektor wrote:
That is a cool looking way to show a reload.
Thank you, Sector!

Also example of animation for a (coaxial) machine gun.
Attachment:
mgun_anim.gif
mgun_anim.gif [ 1.19 MiB | Viewed 2930 times ]

Download:
Attachment:
mgun_shells.jpg
mgun_shells.jpg [ 10.56 KiB | Viewed 2938 times ]

Attached an archive with icons of shells (5 types in total).
Attachment:
mgun_shells.zip [18.09 KiB]
Downloaded 168 times

_________________
Map F-Industry-Live
MISI Library


Top
 Profile  
 
PostPosted: Tue Dec 04, 2018 1:03 pm 
Offline
Car Jacker
User avatar

Joined: Sun Feb 21, 2010 10:03 pm
Posts: 45
The idea is good, i might be able to add these animations in the future, first i'll work on scripting because that is cruical to get a online game working.

It's using javascript. Basic scripts work already (check for death, spawns, players joining and quitting), but i'm wondering what kind of additional functions are needed, what are your suggestions?


Top
 Profile  
 
PostPosted: Tue Dec 04, 2018 3:33 pm 
Offline
Boss
User avatar

Joined: Tue Mar 04, 2008 6:51 am
Posts: 1345
Location: GTAMP.com
Teleport and coordinate set/get. All the features required for deathmatch, tag and racing. Checkpoints might be better as part of map editor so scripting isn’t required to make racing maps but always good to have script control aswell.


Top
 Profile  
 
PostPosted: Tue Dec 04, 2018 4:52 pm 
Offline
Serial Killer

Joined: Wed Dec 09, 2015 2:18 pm
Posts: 208
JernejL wrote:
The idea is good, i might be able to add these animations in the future, first i'll work on scripting because that is cruical to get a online game working.

It's using javascript. Basic scripts work already (check for death, spawns, players joining and quitting), but i'm wondering what kind of additional functions are needed, what are your suggestions?

Thank, JernejL.

I suggest events for the server. Marked "*" are important events:

    0) Incoming connection from the client (the event occurs before the connection to the server. The connection interval and number is set in the config. You can add a limit on the number of requests as well as add temporary and permanent blocking for IP in the blacklist)
    1) * Start server
    2) * Server stop
    3) Map loading (in this event all map objects are loaded, you can add here: creating custom pickups, cars, objects, etc.)
    4) Map change (occurs when reloading a 3D location)
    5) * Connection to the player's server
    6) * Disconnect from the player's server
    7) * Player enter in to the game (if the client connects to the server and the player enters the game)
    8) Player’s exit from the game (but not disconnecting from the server)
    9) Pause player (if the player pressed ESC - the server receives a message that the player AFK but at the same time it can be killed)
    10) * Sending a message to the chat (the server receives a message from the client when he entered the text into the chat and pressed "Enter")
    11) * Console commands entered into the terminal "~" (example: /debugmode)
    12) * Player death (the event occurs after the death of the player)
    13) * Player respawn (event occurs after the creation of the player's skin)
    14) * Vehicle respawn (similar)
    15) * Object respawn (event is executed if the object was created. Types of objects: particle emitter, light, sound and melody, sprite, pickup)
    16) * The player received damage (passes the ID of the person who caused the damage to the player, as well as the TYPE of the object and the strength of the damage)
    17) * Player collided with an object (object ID and TYPE)
    18) * Vehicle received damage (similar but for all vehicles)
    19) * The object received damage
    20) * Vehicle was destroyed (vehicle was blown up)
    21) * Vehicle collided with an object (object ID and TYPE)
    22) * Object death
    23) * Vehicle has been removed (similarly)
    24) * The object was deleted (occurs when the object was deleted from the map)
    25) * Object collided with object (object ID and TYPE)
    26) Object moves
    27) Object stopped
    28) The map block was added (occurs after creating the map block, here is the ID of the tal and TYPE of the tal for all 5 sides?)
    29) Map block has been changed
    30) Map block has been removed
    31) NPC respawn
    32) NPC death
    33) NPC has been removed
    34) NPC on vision the object (ID and TYPE of the object)
    35) NPC un vision the object (ID and TYPE of the object)
    36) NPC following object (object ID and TYPE)
    37) NPC un following object (object ID and TYPE)
    38) NPC death (object ID and TYPE)
    39) NPC attacks object (object ID and TYPE)
    40) NPC stop attacks object (object ID and TYPE)
    41) NPC collided with an object (object ID and TYPE)

PS: If something else comes to mind, then add later.

_________________
Map F-Industry-Live
MISI Library


Top
 Profile  
 
PostPosted: Tue Dec 04, 2018 6:12 pm 
Offline
Serial Killer

Joined: Wed Dec 09, 2015 2:18 pm
Posts: 208
I suggest pseudo functions for the player and NPC.

Logical "is":

    If on vision an object (player ID, object type: emitter particle, light, sound and music, sprite, pickup, vehicle, player, NPC)
    If in area (in coordinates)
    If defined
    If connected
    If in game
    If alive
    If in a car ID
    If standing
    If lying on the ground
    If is control
    If burning
    If you run into an object
    If wanted
    If wasted
    If attacking an object
    If on vision for other object
    If the object does not see
    If you received damage
    If in water
    If on ground
    If collided an object

SET/GET:

    Set walk speed
    Set run speed
    Set wanted level
    Set skin
    Set weapon ID and ammo
    Set slot current weapon
    Set health
    Set armor
    Reset weapons
    Set nickname?
    Get a nickname
    Kick a player from the server
    Ban player on server
    Unban player on server (by IP and nickname in blacklist)
    Run animation (play)
    Stop animation
    Block control
    Enter vehicle to the specified place.
    Exit from vehicle
    Go to coordinates (if the character goes to the car)
    Teleport to coordinates
    Kill
    Respawn (returns to creation point)
    Set a target to follow the specified object (type of objects: emitter particle, light, sound and music, pickup, sprite, vehicle, player, NPC)
    Stop pursuing an object (specify the type and speed of the pursuit)
    Set a target to destroy an object from weapon type.
    Stop (if it slows down in a car)
    Reset all actions and animations (the character will just stand still)
    Stop destroying an object
    Reset all objective tasks
    Set position
    Reset the respawn point (place of appearance after death)
    Get walk speed
    Get run speed
    Get wanted Level
    Get health
    Get armor
    Get current weapon ID
    Get weapon ID from slot
    Get ammo from slot
    Get ammo from current weapon
    Get current weapon slot
    Get car ID of player car
    Get a passenger seat ID
    Blow up
    Set fire
    Put out
    Get TYPE of the last damage (the type of weapon from which the player attacked and damage)
    Get angle
    Get coordinates
    Get ID of the current animation
    Get ID vision object
    Get ID of the attacking object
    Get ID of the current skin

P.S.: You can do the same for objects and cars.

_________________
Map F-Industry-Live
MISI Library


Top
 Profile  
 
PostPosted: Wed Dec 05, 2018 7:40 am 
Offline
Car Jacker
User avatar

Joined: Sun Feb 21, 2010 10:03 pm
Posts: 45
This is good - it's similar to what i started, a lot of things here are basically states (jumping, dead, running), and a lot can be implemented in scripting itself (line of sight, proximity triggers, etc.. )

The game engine only differentiate between actors, vehicles, particles and pickups.

(map) objects are vehicles, and are therefore easier to work with (no need for duplicate code to sync and handle - all that works on vehicles works on objects too)

This is the current script as used, it shows what is done, but is not everything yet - some things like getting car seats still need internal js framework wrappers to work in a object-oriented way.

Code:
'use strict';

console.log(version());

var game_interface = NewGameInstance();

game_interface.OnCreatePlayer = function(Player) {
   
   console.log('OnCreatePlayer');
   console.log(Player.playername);
   
   Player.spawn(true); // sets stuff
   
   if (Player.IsLocal == 1) { // if local player, create a car to play with.
      
      var somecar = new Vehicle('four', 53.5, 87.5, 2, 90); //
      Player.EnterExitThisVehicle(somecar, false, true);
      
   }
   
   // Player.health = 1.0; // default test
   
   Player.EchoMessage('~O~Top down city test! ' + '~T~Enjoy!', constants.fontSize.font_b);
   
}

game_interface.OnDestroyPlayer = function(Player, Reason) {
   
   console.log('OnDestroyPlayer');
   console.log(Player.playername);
   
   if (Player.IsLocal == 1) {
      
      console.log('game shutting down.');
      
   } else {
      
      console.log('Player disconnected: ' + constants.disconnectReason.toString(Reason));
      
   }
   
}

game_interface.OnModeChange = function() {
   
   console.log('engine mode has changed to: ');
   console.log(constants.engineState.toString(game_interface.EngineMode) + ' (' + game_interface.EngineMode + ')');
   
}

game_interface.OnDamagePlayer = function(player_actor, player_actor_2, HitOrigin, OldHealth, NewHealth, DamageType) {
   
   if (NewHealth == 0)
      console.log('KILL ' + player_actor.playername + ' was damaged by ' + (player_actor_2 == null ? "AI" : player_actor_2.playername) + ' (' + OldHealth + ' -> ' + NewHealth + ') ' + constants.damageType.toString(DamageType));
   else
      console.log('Damage ' + player_actor.playername + ' was damaged by ' + (player_actor_2 == null ? "AI" : player_actor_2.playername) + ' (' + OldHealth + ' -> ' + NewHealth + ') ' + constants.damageType.toString(DamageType));
   
}

game_interface.OnTick = function() {
   
   for (var i in actor_stack) {
      
      var Player = actor_stack[i];
      
      if (Player.health <= 0) {
         
         if (Player.DeadTime < 3000) // 3 seconds delay
            continue;
         
         console.log("player " + i + " has died and has been respawned.");
         
         Player.EchoMessage('~O~Oh no!~T~Enjoy!', constants.fontSize.font_b);
         
         Player.spawn(true);
         
      }
      
   }
   
}

// todo: should be global.console and prototyped from that.

Actor.spawn = function(position_too) {
   
   this.health = 100;
   
   //console.log(this.WeaponData());
   
   this.StripWeapons();
   this.GiveWeapon('m4gl', 5000);
   this.GiveWeapon('gren', 5000);
   this.GiveWeapon('gun1', 5000);
   this.GiveWeapon('flam', 5000);
   
   if (position_too == true)
      this.move(53.5, 86.5, 2, true);
   
   this.WantedLevel = 0;
   
   this.State = constants.actorState.AsNormal;
   this.ExtinguishFires();
   this.SetActorAnimation(constants.animation.anm_stand, false, false, true);
   this.NetworkSync(); // Synchronize player over network, if remote player.
   
   if (this.IsActorLocal() == true)
      game_interface.ResetCamera(53.5, 87.5, 2);
   
}

var somecar = new Vehicle('tank', 53.5, 89.5, 2, 45);

//console.log(somecar.health);
somecar.health = 10;
//console.log(somecar.health);

somecar.move(53.5, 89.5, 2, 45);

/*var myseats = somecar.seats();
console.log(typeof myseats);
console.log(myseats);*/

//somecar.free();
//console.log('valid: ' + somecar.valid());

/*
var loop = function() {
   
}
*/



Top
 Profile  
 
PostPosted: Wed Dec 05, 2018 12:29 pm 
Offline
Serial Killer

Joined: Wed Dec 09, 2015 2:18 pm
Posts: 208
JernejL wrote:
This is good - it's similar to what i started, a lot of things here are basically states (jumping, dead, running), and a lot can be implemented in scripting itself (line of sight, proximity triggers, etc.. )

The game engine only differentiate between actors, vehicles, particles and pickups.

(map) objects are vehicles, and are therefore easier to work with (no need for duplicate code to sync and handle - all that works on vehicles works on objects too)

This is the current script as used, it shows what is done, but is not everything yet - some things like getting car seats still need internal js framework wrappers to work in a object-oriented way.

Code:
'use strict';

console.log(version());

var game_interface = NewGameInstance();

game_interface.OnCreatePlayer = function(Player) {
   
   console.log('OnCreatePlayer');
   console.log(Player.playername);
   
   Player.spawn(true); // sets stuff
   
   if (Player.IsLocal == 1) { // if local player, create a car to play with.
      
      var somecar = new Vehicle('four', 53.5, 87.5, 2, 90); //
      Player.EnterExitThisVehicle(somecar, false, true);
      
   }
   
   // Player.health = 1.0; // default test
   
   Player.EchoMessage('~O~Top down city test! ' + '~T~Enjoy!', constants.fontSize.font_b);
   
}

game_interface.OnDestroyPlayer = function(Player, Reason) {
   
   console.log('OnDestroyPlayer');
   console.log(Player.playername);
   
   if (Player.IsLocal == 1) {
      
      console.log('game shutting down.');
      
   } else {
      
      console.log('Player disconnected: ' + constants.disconnectReason.toString(Reason));
      
   }
   
}

game_interface.OnModeChange = function() {
   
   console.log('engine mode has changed to: ');
   console.log(constants.engineState.toString(game_interface.EngineMode) + ' (' + game_interface.EngineMode + ')');
   
}

game_interface.OnDamagePlayer = function(player_actor, player_actor_2, HitOrigin, OldHealth, NewHealth, DamageType) {
   
   if (NewHealth == 0)
      console.log('KILL ' + player_actor.playername + ' was damaged by ' + (player_actor_2 == null ? "AI" : player_actor_2.playername) + ' (' + OldHealth + ' -> ' + NewHealth + ') ' + constants.damageType.toString(DamageType));
   else
      console.log('Damage ' + player_actor.playername + ' was damaged by ' + (player_actor_2 == null ? "AI" : player_actor_2.playername) + ' (' + OldHealth + ' -> ' + NewHealth + ') ' + constants.damageType.toString(DamageType));
   
}

game_interface.OnTick = function() {
   
   for (var i in actor_stack) {
      
      var Player = actor_stack[i];
      
      if (Player.health <= 0) {
         
         if (Player.DeadTime < 3000) // 3 seconds delay
            continue;
         
         console.log("player " + i + " has died and has been respawned.");
         
         Player.EchoMessage('~O~Oh no!~T~Enjoy!', constants.fontSize.font_b);
         
         Player.spawn(true);
         
      }
      
   }
   
}

// todo: should be global.console and prototyped from that.

Actor.spawn = function(position_too) {
   
   this.health = 100;
   
   //console.log(this.WeaponData());
   
   this.StripWeapons();
   this.GiveWeapon('m4gl', 5000);
   this.GiveWeapon('gren', 5000);
   this.GiveWeapon('gun1', 5000);
   this.GiveWeapon('flam', 5000);
   
   if (position_too == true)
      this.move(53.5, 86.5, 2, true);
   
   this.WantedLevel = 0;
   
   this.State = constants.actorState.AsNormal;
   this.ExtinguishFires();
   this.SetActorAnimation(constants.animation.anm_stand, false, false, true);
   this.NetworkSync(); // Synchronize player over network, if remote player.
   
   if (this.IsActorLocal() == true)
      game_interface.ResetCamera(53.5, 87.5, 2);
   
}

var somecar = new Vehicle('tank', 53.5, 89.5, 2, 45);

//console.log(somecar.health);
somecar.health = 10;
//console.log(somecar.health);

somecar.move(53.5, 89.5, 2, 45);

/*var myseats = somecar.seats();
console.log(typeof myseats);
console.log(myseats);*/

//somecar.free();
//console.log('valid: ' + somecar.valid());

/*
var loop = function() {
   
}
*/


Yes, you can refuse callbacks and instruct everyone to do the script. This will be a more optimal solution but for more experienced scripters. In the MISI project, there are also no callbacks in order not to override the code. However, you can make a preset for the starting whale which will contain the main callbacks to familiarize newbies with the functions.

Later I will add another list of functions that will be useful for the script.

_________________
Map F-Industry-Live
MISI Library


Top
 Profile  
 
PostPosted: Fri Dec 07, 2018 7:33 am 
Offline
Serial Killer

Joined: Wed Dec 09, 2015 2:18 pm
Posts: 208
Pseudo functions version 2:

Player "is":
    If on vision an object (object type: emitter particle, light, sound and music, sprite, pickup, vehicle, player, NPC)
    If in area (in coordinates)
    If defined
    If connected
    If admin?
    If in game
    If alive
    If in a vehicle
    If in any vehicle
    If driver
    If passenger
    If standing
    If lying on the ground
    If is control
    If burning
    If you run into an object
    If wanted
    If wasted
    If attacking an object
    If on vision for other object
    If the object does not see
    If you received damage
    If in water
    If on ground
    If collided an object
    If leader of group?
    If group defined
    If cam path defined?

Player SET:
    Set cam
    Set cam angle
    Set cam zoom
    Reset cam
    Move cam at point on time (speed, time, point)
    Make cam path
    Delete cam path
    Add cam in path on time (speed, time, point)
    Remove cam from path
    Move cam path
    Stop cam
    Set cam following object
    Set cam un follow
    Set admin?
    Set walk speed
    Set run speed
    Set wanted level
    Set skin
    Set weapon and ammo
    Set slot current weapon
    Set health
    Set armor
    Make group (set leader and max members)
    Delete group
    Set max members of group
    Add player in group
    Set leader of group
    Remove from group
    Reset weapons
    Set nickname?
    Kick a player from the server
    Ban player on server
    Unban player on server (by IP and nickname in blacklist)
    Run animation (play)
    Stop animation
    Block control
    Enter vehicle on seat
    Exit from vehicle
    Go to point (if the character goes to the car)
    Teleport
    Kill
    Set damage object of weapon type
    Stop damage
    Respawn (returns to creation point)
    Set respawn
    Set follow object on speed (type of objects: emitter particle, light, sound and music, pickup, sprite, vehicle, player, NPC)
    Stop follow an object (specify the type and speed of the pursuit)
    Set destroy an object from weapon type.
    Stop (if it slows down in a car)
    Reset all actions and animations (the character will just stand still)
    Stop destroying an object
    Reset all objective tasks
    Set position
    Reset respawn point (place of appearance after death)
    Put player in vehicle in seat
    Remove player from vehicle
    Send message
    Clear chat (clear chat for player)

Player GET:
    Get cam position
    Get cam zoom
    Get cam path?
    Get nickname
    Get walk speed
    Get run speed
    Get wanted Level
    Get health
    Get armor
    Get current weapon
    Get weapon from slot
    Get ammo from slot
    Get ammo from current weapon
    Get current weapon slot
    Get vehicle
    Get a passenger seat
    Get max members of group
    Get members of group
    Get leader of group (leader this player)
    Blow up
    Set fire
    Put out
    Get type of the last damage (the type of weapon from which the player attacked and damage)
    Get angle
    Get coordinates
    Get current animation
    Get vision object
    Get attacking object
    Get current skin
    Get following object
    Get damaging object
    Get collided object

Vehicle "is":
    If defined
    If wrecked
    If water
    If ground
    If type (plane, heli, car, truck, bike, etc)
    If air
    If truck
    If emergy
    If bike
    If passenger transport
    If trailer attached
    If moved
    If has weapon (tank, gun jeep, etc)
    If protect proof (bullet, fire, explode, collided, etc)

Vehicle SET:
    Set position (teleport)
    Set angle
    Set health
    Set color
    Set protect proof
    Set max speed
    Set speed
    Set damage
    Set engine state
    Set light state
    Set door lock
    Set alarm state
    Set alarm (add/del alarm on car)
    Set siren state
    Set siren (add/del siren on car)
    Set weapon and ammo
    Go at point on speed
    Set follow object on speed (object: vehicle, player, NPC, etc)
    Set un follow
    Set damage object of weapon type
    Stop kill
    Create
    Delete
    Explode
    Burn
    Exegunsh
    Kill all passengers
    Kill passenger on seat (this driver - 0, passenger - 1, etc)
    Put object on trailer
    Put vehicle on trailer
    Remove object from trailer
    Remove vehicle from trailer
    Attach trailer on truck
    Attach on trailer
    Open component on time
    Close component on time
    Detach trailer
    Remove object from trailer
    Remove vehicle from trailer
    Set max passengers (set maximal limit)

Vehicle GET:
    Get position
    Get color
    Get model
    Get type (plane, boat, heli, car, bike, etc)
    Get protect proof
    Get health
    Get max passengers
    Get passengers
    Get max speed
    Get speed
    Get engine state
    Get light state
    Get door lock
    Get alarm state
    Get alarm
    Get siren state
    Get siren
    Get damage (wrecked component part)
    Get current weapon
    Get current ammo
    Get weapon from slot
    Get ammo from slot
    Get following object
    Get damaging object
    Get collided object

Server "is":
    If network (or single game)
    If runing
    If restarting
    If opened (if set not private mode)
    If states saved?

Server SET:
    Save log
    Set sync
    Set time
    Set time loop (frezee time)
    Set weather
    Set weather loop
    Send server message
    Clear server message
    Start?
    Stop
    Restart
    Load map?
    Save player states (states type: player, vehicle, pickup, object, emmiter particle, sound, etc)?
    Load player states?
    Delete player states?
    Send message
    Clear chat (clear chat for all players)
    Exploded at point
    Burn at point
    Exegunsh at point of range

Server GET:
    Get sync
    Get time
    Get weather
    Get usage memory
    Get runing time
    Get max players (maximal limit)
    Get players
    Get admins?

Also need for: NPC, Object, Arrow, Light, Sound, Emmiter, Actor, Draw (GUI), etc.

P.S.: This all just references.

_________________
Map F-Industry-Live
MISI Library


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 66 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group