Need some more Suggestion.

Started by Mr.nobOdy, Feb 22, 2019, 10:56 AM

Previous topic - Next topic

Mr.nobOdy

function closederby() {
    Message( ">> Derby cancelled!" );
    derby = false;
 derbystart = false;
    derbycount = 0;
    local plr;
     for( local i=0; i <= GetMaxPlayers(); i++ ){
   {
      plr = FindPlayer( i );
      if ( plr )
            {
    if( stats[ plr.ID ].derbyplayer )
    {
                    stats[ plr.ID ].derbyplayer = false;
                    plr.IsFrozen = false;
                    plr.Pos = Vector( 496.26, -83.9443, 10.0302  );
    }
            }
        }
 }
}


function closerace() {
    Message( "Race cancelled!" );
    race = false;
 racestart = false;
    racecount = 0;
    local plr;
     for( local i=0; i <= GetMaxPlayers(); i++ ){
  {
      plr = FindPlayer( i );
      if ( plr )
            {
    if( stats[ plr.ID ].raceplayer )
    {
                    stats[ plr.ID ].raceplayer = false;
                    plr.IsFrozen = false;
                    plr.Pos = Vector( 496.26, -83.9443, 10.0302  );
    }
            }
        }
 }

}


In above, it cancel derby or race when player is only 1 but i did'nt want that race or derby cancel when player is 1. It start race or derby else player is 1. So how to set it that it dose not cancel race or derby when player is 1.
And onething that my new server is almost ready and then host. It would be the one of the best server of vcmp. ;)

Mr.nobOdy

#1
And one this more i need Tommy that he spawn in the following location and my tommy skin code is:
AddClass( 1, RGB( 102, 248, 255 ) ,169, Vector(  -378.452, -580.217, 25.2321 ), 140.021, 17, 999 ,20, 999, 26, 999 );
and here is the screenshot link where i want to spawn tommy
https://imgur.com/a/Vli2AA0

dracc

Is this all the code you have?
function closederby() {
  Message( ">> Derby cancelled!" );
  derby = false;
  derbystart = false;
  derbycount = 0;
  local plr;
  for( local i=0; i <= GetMaxPlayers(); i++ ){
    plr = FindPlayer( i );
    if ( plr ) {
      if( stats[ plr.ID ].derbyplayer ) {
        stats[ plr.ID ].derbyplayer = false;
        plr.IsFrozen = false;
        plr.Pos = Vector( 496.26, -83.9443, 10.0302  );
      }
    }
  }
}

function closerace() {
  Message( ">> Race cancelled!" );
  race = false;
  racestart = false;
  racecount = 0;
  local plr;
  for( local i=0; i <= GetMaxPlayers(); i++ ) {
    plr = FindPlayer( i );
    if ( plr ) {
      if( stats[ plr.ID ].raceplayer ) {
        stats[ plr.ID ].raceplayer = false;
        plr.IsFrozen = false;
        plr.Pos = Vector( 496.26, -83.9443, 10.0302  );
      }
    }
  }
}
Or do you have more code somewhere that could help us solve your problem?

It sounds from your description of the problem like you already close a race if only one player is participating?
The code snippet on the other hand shows no such logic.

Also, what is wrong with your AddClass()? Is the location wrong?

Mr.nobOdy

Quote from: Mr.nobOdy on Feb 22, 2019, 11:03 AMAnd one this more i need Tommy that he spawn in the following location and my tommy skin code is:
AddClass( 1, RGB( 102, 248, 255 ) ,169, Vector(  -378.452, -580.217, 25.2321 ), 140.021, 17, 999 ,20, 999, 26, 999 );
and here is the screenshot link where i want to spawn tommy
https://imgur.com/a/Vli2AA0
I want that the tommy spawn at location in screenshoot.

Mr.nobOdy

Quote from: dracc on Feb 22, 2019, 01:01 PMIs this all the code you have?
function closederby() {
  Message( ">> Derby cancelled!" );
  derby = false;
  derbystart = false;
  derbycount = 0;
  local plr;
  for( local i=0; i <= GetMaxPlayers(); i++ ){
    plr = FindPlayer( i );
    if ( plr ) {
      if( stats[ plr.ID ].derbyplayer ) {
        stats[ plr.ID ].derbyplayer = false;
        plr.IsFrozen = false;
        plr.Pos = Vector( 496.26, -83.9443, 10.0302  );
      }
    }
  }
}

function closerace() {
  Message( ">> Race cancelled!" );
  race = false;
  racestart = false;
  racecount = 0;
  local plr;
  for( local i=0; i <= GetMaxPlayers(); i++ ) {
    plr = FindPlayer( i );
    if ( plr ) {
      if( stats[ plr.ID ].raceplayer ) {
        stats[ plr.ID ].raceplayer = false;
        plr.IsFrozen = false;
        plr.Pos = Vector( 496.26, -83.9443, 10.0302  );
      }
    }
  }
}
Or do you have more code somewhere that could help us solve your problem?

It sounds from your description of the problem like you already close a race if only one player is participating?
The code snippet on the other hand shows no such logic.

Also, what is wrong with your AddClass()? Is the location wrong?
YEs this the code and u can see other codes which i add:
see here other codes!
https://forum.vc-mp.org/?topic=1078.0

Mr.nobOdy

Quote from: Mr.nobOdy on Feb 22, 2019, 03:11 PM
Quote from: Mr.nobOdy on Feb 22, 2019, 11:03 AMAnd one this more i need Tommy that he spawn in the following location and my tommy skin code is:
AddClass( 1, RGB( 102, 248, 255 ) ,169, Vector(  -378.452, -580.217, 25.2321 ), 140.021, 17, 999 ,20, 999, 26, 999 );
and here is the screenshot link where i want to spawn tommy
https://imgur.com/a/Vli2AA0
I want that the tommy spawn at location in screenshoot.
I want  like spawn loc system

dracc

Regarding spawn point; create a function that prints player.Position, copy-paste its output and you're done.

About race; the functions you pasted here are totally unrelated to your question. You want to edit `raceplayers()` and `derbyplayers()`.