Author Topic: 8-Ball Garages  (Read 1897 times)

_TailS_

  • Newbie
  • *
  • Posts: 7
  • Karma: +2/-3
  • Who seeks shall find...
    • View Profile
8-Ball Garages
« on: July 23, 2013, 02:49:10 pm »
This script will add to your server 8-ball garages in them you will be able to mine the car and of course explode ;)

Download: Dropbox



Booom!!!

Good luck ! ;)

Sorry for my English ;D

« Last Edit: July 23, 2013, 03:01:18 pm by _TailS_ »

Mido_Pop

  • Full Member
  • ***
  • Posts: 168
  • Karma: +6/-20
  • The_Pops ( War )
    • View Profile
Re: 8-Ball Garages
« Reply #1 on: July 23, 2013, 04:21:15 pm »
Nice Work Man  :D



Thijn

  • Tester
  • Sr. Member
  • ****
  • Posts: 531
  • Karma: +27/-16
    • View Profile
Re: 8-Ball Garages
« Reply #2 on: July 23, 2013, 05:31:20 pm »
A few issues with this script:
Code: (8ball_client.nut) [Select]
local Player = FindLocalPlayer();

function onClientUseDetonator( )
{
     if ( g_Car )
Where did you define g_Car? Indeed, nowhere.
Yes, in the server. But that has nothing to do with client side scripts.



Your timer is unneeded. Sure it looks nice when the garage opens when you come near the door.
But it will create only more lagg (an infinite 750ms timer will lagg), and it's unneeded for the following approach:
Instead of all doors closed by default, open them all up.
Place a sphere in the center of the garage (like you have no, by the looks of it), and close the garage when there's a vehicle in it.
Do all the magic stuff, and open up the garage again.

Problem solved, still looks fancy, and no needs for timers. Definitely not a infinite one.



Your script can only have one car with a bomb. You're saving the players' wired car in g_Car, but it will get overwritten when someone else wires their car as well.

Solution would be to have a table to store the wired cars.



I like how you're using classes, thumbs up for that. ;)



Overall not bad at all, better then I see normally.

 

© Liberty Unleashed Team.