Author Topic: [XP][VX][VXA] One Game Instance  (Read 5119 times)

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6591
  • LV: 407
  • Gender: Male
    • View Profile
[XP][VX][VXA] One Game Instance
« on: April 17, 2012, 11:32:31 PM »
One Game Instance
Authors: game_guy
Version: 1.0
Type: System Utility
Key Term: Misc Add-on

Introduction

This script is to prevent multiple instances of your game. This is really only for online games so players can't cheat and PvP themselves.

(Released awhile ago on RMRK)

Features

  • Prevents Multiple Instances
  • Custom File/Error
  • XP/VX/VX Ace Compatible

Screenshots

N/A

Demo

N/A

Script

Place at very top!
(click to show/hide)

Instructions

In script.

Compatibility

Works with everything.
XP/VX/VX Ace compatibility.

Credits and Thanks

  • game_guy ~ For creating it.
  • ZenVirZan ~ For requesting it.

Author's Notes

Prevent dem hackahs! >:U
« Last Edit: April 18, 2012, 07:02:54 PM by Blizzard »

Offline Kiwa

  • Transcended Spirit
  • ***
  • Posts: 155
  • LV: 4
    • View Profile
Re: [XP][VX][VXA] One Game Instance
« Reply #1 on: January 06, 2013, 06:07:36 PM »
Thanks for making this!
As im sure most ppl are aware of that have seen me here i fully intend to make an online game.
(its been a lot of work so far lol but im having fun making it and playing with all these scripts!)

Ill probably be using this and asking a ton of dumb questions in the future :P


...as i am a terribad scripter...

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 776
  • LV: 34
    • View Profile
Re: [XP][VX][VXA] One Game Instance
« Reply #2 on: January 07, 2013, 09:35:25 AM »
Good idea!

I have one question, however.  When I test my stuff, I find that there are times that I have to use the task manager to kill the instance.  If I kill one instance of a game (say like a power outage), the file will remain the next time the game starts up, could this falsely report an instance of the game already running?
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6591
  • LV: 407
  • Gender: Male
    • View Profile
Re: [XP][VX][VXA] One Game Instance
« Reply #3 on: January 07, 2013, 01:49:53 PM »
No, because the script deletes the file if the file already exists. The script is super simple. If the file exists, delete it, then open the file and never close it. Now when the program closes, the program no longer has that file open and any other program can alter the file. Which means, next time you run the game, the game checks for the file and deletes it then re-opens it. An error will occur if the file is already open in another program.