Hallo,
ich habe ein /respawncars Befehl für die Fraktionsautos, doch die respawnen komisch, einmal respawnen 9 von 10 Fraktionscar, einmal nur 1/10, dann wieder 10/10 Cars?
Befehl:
if(strcmp(cmd,"/respawncars",true)==0)
{
for(new i=0;i<MAX_CARS;i++)
{
if(PlayerInfo[playerid][pLeader] == 1)
{
if(FCInfo[i][Frakid] == 1)
{
SetVehicleToRespawn(i);
}
}
if(PlayerInfo[playerid][pLeader] == 2)
{
if(FCInfo[i][Frakid] == 2)
{
SetVehicleToRespawn(i);
}
}
if(PlayerInfo[playerid][pLeader] == 3)
{
if(FCInfo[i][Frakid] == 3)
{
SetVehicleToRespawn(i);
}
}
if(PlayerInfo[playerid][pLeader] == 4)
{
if(FCInfo[i][Frakid] == 4)
{
SetVehicleToRespawn(i);
}
}
if(PlayerInfo[playerid][pLeader] == 5)
{
if(FCInfo[i][Frakid] == 5)
{
SetVehicleToRespawn(i);
}
}
if(PlayerInfo[playerid][pLeader] == 6)
{
if(FCInfo[i][Frakid] == 6)
{
SetVehicleToRespawn(i);
}
}
if(PlayerInfo[playerid][pLeader] == 7)
{
if(FCInfo[i][Frakid] == 7)
{
SetVehicleToRespawn(i);
}
}
if(PlayerInfo[playerid][pLeader] == 8)
{
if(FCInfo[i][Frakid] == 8)
{
SetVehicleToRespawn(i);
}
}
if(PlayerInfo[playerid][pLeader] == 9)
{
if(FCInfo[i][Frakid] == 9)
{
SetVehicleToRespawn(i);
}
}
if(PlayerInfo[playerid][pLeader] == 10)
{
if(FCInfo[i][Frakid] == 10)
{
SetVehicleToRespawn(i);
}
}
if(PlayerInfo[playerid][pLeader] == 11)
{
if(FCInfo[i][Frakid] == 11)
{
SetVehicleToRespawn(i);
}
}
if(PlayerInfo[playerid][pLeader] == 12)
{
if(FCInfo[i][Frakid] == 12)
{
SetVehicleToRespawn(i);
}
}
}
return 1;
}