ja und ich hab ne frage ich habe den text hier:
public OnPlayerExitVehicle(playerid, vehicleid)
{
PlayerInf[playerid][race] = 0;
PlayerInf[playerid][derby] = 0;
checkpointcheck[playerid] = 0;
if(vehicleid == car)
{
DestroyVehicle(car);
}
if(vehicleid == car2)
{
DestroyVehicle(car2);
}
if(vehicleid == CrashCar1)
{
DestroyVehicle(CrashCar1);
SpawnPlayer(playerid);
crashplayers = crashplayers - 1;
}
if(vehicleid == CrashCar2)
{
DestroyVehicle(CrashCar2);
SpawnPlayer(playerid);
crashplayers = crashplayers - 1;
}
if(vehicleid == CrashCar3)
{
DestroyVehicle(CrashCar3);
SpawnPlayer(playerid);
crashplayers = crashplayers - 1;
}
if(vehicleid == CrashCar4)
{
DestroyVehicle(CrashCar4);
SpawnPlayer(playerid);
crashplayers = crashplayers - 1;
}
if(vehicleid == CrashCar5)
{
DestroyVehicle(CrashCar5);
SpawnPlayer(playerid);
crashplayers = crashplayers - 1;
}
if(vehicleid == CrashCar6)
{
DestroyVehicle(CrashCar6);
SpawnPlayer(playerid);
crashplayers = crashplayers - 1;
}
if(vehicleid == CrashCar7)
{
DestroyVehicle(CrashCar7);
SpawnPlayer(playerid);
crashplayers = crashplayers - 1;
}
if(vehicleid == CrashCar8)
{
DestroyVehicle(CrashCar8);
SpawnPlayer(playerid);
crashplayers = crashplayers - 1;
}
if(vehicleid == CrashCar9)
{
DestroyVehicle(CrashCar9);
SpawnPlayer(playerid);
crashplayers = crashplayers - 1;
}
if(vehicleid == CrashCar10)
{
DestroyVehicle(CrashCar10);
SpawnPlayer(playerid);
crashplayers = crashplayers - 1;
}
if(vehicleid == CrashCar11)
{
DestroyVehicle(CrashCar11);
SpawnPlayer(playerid);
crashplayers = crashplayers - 1;
}
if(vehicleid == CrashCar12)
{
DestroyVehicle(CrashCar12);
SpawnPlayer(playerid);
crashplayers = crashplayers - 1;
}
if(vehicleid == CrashCar13)
{
DestroyVehicle(CrashCar13);
SpawnPlayer(playerid);
crashplayers = crashplayers - 1;
}
if(vehicleid == CrashCar14)
{
DestroyVehicle(CrashCar14);
SpawnPlayer(playerid);
crashplayers = crashplayers - 1;
}
if(vehicleid == RaceCar1)
{
DestroyVehicle(RaceCar1);
SpawnPlayer(playerid);
RacePlayers = RacePlayers - 1;
}
if(vehicleid == RaceCar2)
{
DestroyVehicle(RaceCar2);
SpawnPlayer(playerid);
RacePlayers = RacePlayers - 1;
}
if(vehicleid == RaceCar3)
{
DestroyVehicle(RaceCar3);
SpawnPlayer(playerid);
RacePlayers = RacePlayers - 1;
}
if(vehicleid == RaceCar4)
{
DestroyVehicle(RaceCar4);
SpawnPlayer(playerid);
RacePlayers = RacePlayers - 1;
}
if(vehicleid == RaceCar5)
{
DestroyVehicle(RaceCar5);
SpawnPlayer(playerid);
RacePlayers = RacePlayers - 1;
}
if(vehicleid == RaceCar6)
{
DestroyVehicle(RaceCar6);
SpawnPlayer(playerid);
RacePlayers = RacePlayers - 1;
}
if(vehicleid == RaceCar7)
{
DestroyVehicle(RaceCar7);
SpawnPlayer(playerid);
RacePlayers = RacePlayers - 1;
}
if(vehicleid == RaceCar8)
{
DestroyVehicle(RaceCar8);
SpawnPlayer(playerid);
RacePlayers = RacePlayers - 1;
}
if(vehicleid == RaceCar9)
{
DestroyVehicle(RaceCar9);
SpawnPlayer(playerid);
RacePlayers = RacePlayers - 1;
}
if(vehicleid == RaceCar10)
{
DestroyVehicle(RaceCar10);
SpawnPlayer(playerid);
RacePlayers = RacePlayers - 1;
}
SetPlayerInterior(playerid, 0);
return 1;
}
Also wenn ich /bike eingebe spawnt es ein motocross(car) beim leaven löscht es sich doch wenn ich ein derby mache gewinne und wieder gespawnt werde und dann /bike eingebe und dann runtergehe vom motocross spawnt es mich oO ?? An was kann das liegen?
EDIT:
und zur vorherigen antwort von Multivan:
hatte diesen code hier:
forward Start();
public Start()
{
new b = 0;
while(b <= MAX_PLAYERS)
{
if(PlayerInf[b][race] == 1 || PlayerInf[b][derby] == 1)
{
TogglePlayerControllable(b,1);
GameTextForPlayer(b,"~g~GO",1000,6);
}
b = b + 1;
}
if(startedrace == 1)
{
startedrace = 2;
}
else if(startedcrash == 1)
{
startedcrash = 2;
}
}
Hab ich dann umgetauscht in diesen und dann ging es:(vorher hat er die 2 ifs nach der schleife einfach ignoriert
forward Start();
public Start()
{
if(startedrace == 1)
{
startedrace = 2;
}
else if(startedcrash == 1)
{
startedcrash = 2;
}
new b = 0;
while(b <= MAX_PLAYERS)
{
if(PlayerInf[b][race] == 1 || PlayerInf[b][derby] == 1)
{
TogglePlayerControllable(b,1);
GameTextForPlayer(b,"~g~GO",1000,6);
}
b = b + 1;
}
}