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 - Mötley

#1
You should have a server timer for all of these things and loop through the players by now in seconds. Then you just need a bunch of boolean values for the player so the timer can run a check. Using multiple timers in a server can be bad. And I don't personally trust auto execution of timers server side.

// Seconds storage
Player_Seconds <- array( GetMaxPlayers(), 0 );

// Minutes storage
Player_Minutes <- array( GetMaxPlayers(), 0 );

max_hints <- 4;

hint <- [
"Hint 0",
"Hint 1",
"Hint 2",
"Hint 3"
];
NewTimer("Server_Loop", 1000, 0);
function Server_Loop() {

  for (local i=0;i<GetMaxPlayers();i++) {
    local player = FindPlayer(i);
   
    if (player) {
      // Increase the time in seconds
      Player_Seconds[player.ID]++;
     
      /*

      Do anything here in seconds

      */
      //Announce("Time: " + Player_Minutes[player.ID] + ":" + Player_Seconds[player.ID], player, 0 );

      // Check time
      if (Player_Seconds[player.ID] == 60) {
        Player_Minutes[player.ID]++;
   
        // Clear the seconds
        Player_Seconds[player.ID] = 0;
     
        //hints
        /*local iRandom = rand() % max_hints;
        Announce( hint[iRandom], player, 0 );*/
        //hints

        /*
        You can do anything here. Add a check for every five minutes to anything really
        */
      }
      // Check time

    }
  }
}

You should use a class instead of those arrays. Some might say this isn't the right way. But better than many! timers
#2
If a dead community bothers you then your not having fun. It's not about all of the players, It's the current one playing. Play, have fun, do dumb things.
People are generally looking for a server that has players rather than going to a server that should be fun regardless. Go do what I say and others will join.

The biggest issue I have in this multiplayer people are more concerned with dming and winning over kills versus f*** it I don't give a s***
#3
Last I recall dofile, file io was removed from client side in early development
#4
Support / Re: Weird behavior with classes
Jan 23, 2019, 05:07 AM
As zeus was saying, there's nothing wrong with your code, Just make sure your doing what he said in his post.
infos <- array( GetMaxPlayers(), null );
 
class Info {
  ID = 0;
  Details = {
    Name = "Player",
    Age = 0,
    Job = "Citizen"
  };
}



// From a fast test:
if("Name" in Info().Details) {
  print("yep");
  print("Player Name: " + Info().Details.Name )
}

if("Age" in Info().Details) {
  print("yep");
  print("Age: " + Info().Details.Age )
}

if("Job" in Info().Details) {
  print("yep");
  print("Job Name: " + Info().Details.Job )
}

//**********************************************
print("Starting test 2! \n\n")
// second test
infos[0] = Info();
infos[ 0 ].Details.Name = "Motley";
infos[ 0 ].Details.Age = 28;


if(infos[0].Details.Name == "Motley") {
  print("yep");
  print("Player Name: " + infos[0].Details.Name )
}

if(infos[0].Details.Age == 28) {
  print("yep");
  print("Age: " + infos[0].Details.Age )
}

infos[1] = Info();
infos[ 1 ].Details.Name = "Doom";
infos[ 1 ].Details.Age = 20;
print("Player Name: " + infos[1].Details.Name )

print("Age: " + infos[1].Details.Age )

#5
Would be cool and possible I believe, but they would have to go back and hook everything that's in the PC version to the android version.

I seen a PC emulator that seemed promising for GTA 3. It had sprite button options etc, that would be your better option
#6
I'm dead.. Just why??

I can't watch it anymore as I'll cough up a hunk of lung over the song >.<
#7
General Discussion / Re: Hello
Dec 06, 2018, 04:00 PM
Glad you found your way here. Hope you enjoy your stay
#8
Not at all. Besides, when I was young I used birth dates that would allow me acess, like Marlboro, MySpace, etc.

Don't know the reason, but it's pointless. If you don't want kids playing or certain individuals get over whatever thought that is as player count matters
#9
Meant to mention to make sure classic controls didn't oddly get set. I'd suggest he go to story mode and set it. then return to vcmp. classic controls you can't use the mouse to free view up and down, only left and right
#10
^ That and I know this is going to sound silly. But if he used a different windower program with vcmp that should help with the optional libraries, a good one would be D3DWindower. There's a lot of options in that program.
#11
What does he need the mouse for in game? Moving the freeview camera around?A little clarity would help
#12
You must be doing something wrong.. Did you use the two examples on the events above?

Make sure there all running on the same vm, it won't work on two separate scripts without something like dofile. Also like the two examples, make sure you don't have double events going on, an example:

function onPlayerJoin(player) {
  MessagePlayer("Welcome to the server", player);
}

function onPlayerJoin(player) {
  Account[player.ID] = PlayerClass();
}
Doing so and for instance the second one will not get called, only way would be if there on a separate vm in this case
#13
Account <- array(GetMaxPlayers());

class PlayerClass {
  battle = false;
}

function onPlayerJoin(player) {
  Account[player.ID] = PlayerClass();
}

function onPlayerPart(player, reason) {
  Account[player.ID] = null;
}

Not tested, assuming it's the right syntax. You should be good to go.

Ehh since you only have one post and your using the usual playerclass name from fuzzie.

Usage:
Account[player.ID].battle = false;
#14
Description:
Auto removed from vehicle after gaining entry.

Reproducible:
Always, Highly happens on motorbikes, player will stand on top of where he/she was driving

What you were doing when the bug happened:
Running after a vehicle for a fast take off

What you think caused the bug:
Idk, it might of thought I attempted to steal someones vehicle so instead of syncing that it ejected me instead. Only thought.

This even happens on my server
#15
An Acknowledged Bug

The Reason why GetTicketCount works in this method and still selects the same index is because GetTicketCout reacts in 10 milliseconds to 16 milliseconds, If your using this onVehicleRespawn Any car with the same model will indeed have the exact colour.

A simple fix I'd suggest would be:

  local TimeDifernece = 15, Time = 30000;
  for( local i = 1; i <=GetVehicleCount(); i++ ) {
    local vehicle = FindVehicle(i);
    if (vehicle) { 
      Time = Time + TimeDifernece;
      vehicle.RespawnTimer = Time;
      // Update the Time Difference
      TimeDifernece += 15;
      // Reset the actual time
      Time = 300000;
  }
This isn't code support only an acknowledgment of vehicle colour behavior with a basic example