10vehicles for 10racers?
#1

I have created 10turismos, and i would like to know how could i do that if he ex:

types a command /race it adds him to race and turismo car nr1, second guy types it , he gets putted in turismo car nr2 and so on?
Reply
#2

Take a look at my race filterscript.
Reply
#3

The thing is that i just did, but i am trying to make my own way figuring it out.. you know not copying and stuff like that so I'm hoping for an answer to my way's problem
Reply
#4

Well I can give you some hints then.
1. You have to take two positions. One of the left road side and one of the right road side. You can do more also.
2. Check if playerid of the player is odd or even.
3. Just create a variable
4. If it's odd make the player on the right road side and the variable++
5. Same with even.
6. if(variable >= 2) use some trigonometric functions to set the other players after it.

This will bug of course.. But this is just a visual sight .
You have to create some other variables too to make it not bug.
Reply
#5

Yeah, i know that but theres a simplier way with 5 to 10lines which I can't figure out, I've been given some examples month or two ago and i forgot, didn't find the topic which the information was posted in, btw i already built 2vehicles on right and left side
Reply
#6

Anyone?..
Reply
#7

PutPlayerInVehicle(playerid, vehicleid, seatid) maybe??
Reply
#8

Try to create a new variable that stores no of players that typed "/race".
On top of your script.
Код:
new InRace;
Код:
if(strcmp(cmdtext,"/race",true,5)==0)
{
   InRace++;
//your race script here and what you can do is make a for loop like
for(new i=0;i<= InRace;i++)
{
//Then add the player to your vehicle at the last

}
I don't know if it will work but it gives the idea
Reply
#9

pawn Код:
for(new i,g=GetMaxPlayers(); i < g; i++) if(IsPlayerConnected(i) && !IsPlayerNPC(i))
            {
                if(!IsPlayerInVehicle(i,AirRaceI[CurrentAirRace][Plane]))
                {
                  PutPlayerInVehicle(i,AirRaceI[CurrentAirRace][Plane],0);
                }
            }
I'm using this right now when he types /race, but the code doesn't work
Reply
#10

Oh man ofcourse that won't work.

Код:
for(new i=0,i<=GetMaxPlayers();i++) 
{
  if(IsPlayerConnected(i) && !IsPlayerNPC(i))
  {
    if(!IsPlayerInVehicle(i,AirRaceI[CurrentAirRace][Plane]))
    {
      PutPlayerInVehicle(i,AirRaceI[CurrentAirRace][Plane1],0);
    }
  }
}
You have to use it something like that.
Btw how did you create the ten turismos?
Give the code for the Turismos.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)