Mr.nobOdy

  • Newbie
  • Posts: 26
Need some more Suggestion.
«  »
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. ;)
Re: Need some more Suggestion.
« Reply #1,  »Last edited
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

  • Jr. Member
  • Posts: 84
Re: Need some more Suggestion.
« Reply #2,  »
Is this all the code you have?
Code: [Select]
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

  • Newbie
  • Posts: 26
Re: Need some more Suggestion.
« Reply #3,  »
Quote from Mr.nobOdy on February 22nd, 11:03 AM
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
I want that the tommy spawn at location in screenshoot.
Re: Need some more Suggestion.
« Reply #4,  »
Quote from dracc on February 22nd, 01:01 PM
Is this all the code you have?
Code: [Select]
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
Re: Need some more Suggestion.
« Reply #5,  »
Quote from Mr.nobOdy on February 22nd, 03:11 PM
Quote from Mr.nobOdy on February 22nd, 11:03 AM
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
I want that the tommy spawn at location in screenshoot.
I want  like spawn loc system

dracc

  • Jr. Member
  • Posts: 84
Re: Need some more Suggestion.
« Reply #6,  »
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()`.