Problem with one area, 2 persons.
#1

Hey, i have a problem.
-I have a checkpoint (size 10.00) .. when one player enters it, his pos changes to:
Код:
-2254.1687, 306.4822, 34.8911 ( We call this pos 1 )
Thats okay. But when the second person enters the checkpoint, he gets pos 1 too! but in the script it says this:
Код:
-2249.0278, 306.1509, 34.8911 ( Pos 2 )
Heres my code.

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 10.00, -2251.6699,306.0903,35.0391))
        {
          if(Drag1RacePos == 0)
          {
            SetVehiclePos(vehicleid, -2254.1687, 306.4822, 34.8911); // startpos1drag1
                SetVehicleZAngle(vehicleid, 179.1690); // startpos1drag1
                PutPlayerInVehicle(playerid, vehicleid, 0);
                Freeze(playerid, 0);
                DisablePlayerCheckpoint(playerid);
                SetPlayerRaceCheckpoint(playerid, 0, DragRace1[DragRace1CP][0], DragRace1[DragRace1CP][1], DragRace1[DragRace1CP][2], DragRace1[DragRace1CP+1][0], DragRace1[DragRace1CP+1][1], DragRace1[DragRace1CP+1][2], 10.00);
                Drag1RacePos = 1;
            }
            else if(Drag1RacePos == 1)
            {
              SetVehiclePos(vehicleid, -2249.0278, 306.1509, 34.8911); // startpos2drag1
                SetVehicleZAngle(vehicleid, 179.9744); // startpos2drag1
                PutPlayerInVehicle(playerid, vehicleid, 0);
                Freeze(playerid, 0);
                DisablePlayerCheckpoint(playerid);
                SetPlayerRaceCheckpoint(playerid, 0, DragRace1[DragRace1CP][0], DragRace1[DragRace1CP][1], DragRace1[DragRace1CP][2], DragRace1[DragRace1CP+1][0], DragRace1[DragRace1CP+1][1], DragRace1[DragRace1CP+1][2], 10.00);
                Drag1RacePos = 2;
            }
           
            if(Drag1RacePos == 2)
            {
              SetTimerEx("Drag1Race", 2000, false, "i", playerid);
            }
        }
Help?
Reply
#2

Hey,

I can't watch your whole code on iPod, but I guess you forgot the thing to set the second player to the second pos? Use variables as the first 1 0

if(variable == 0)
SetPlayerPos(blabla);
variable == 1;

if(variable == 1)
SetPlayerPos(blabla);
variable == 2;

And go on!
Reply
#3

They are already there. i tried some other ways than this, but it still doesnt work?
Can anyone help me?
Reply
#4

bump*
Reply
#5

Incredible, no one can fix this
Reply
#6

I can't see noting wrong there. Try use a switch and see if that works?
Reply
#7

Like

Код:
switch(what here?) {
case 1: SetPlayerpos to the first
case 2: SetPlayerpos to the second }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)