26.05.2014, 22:09
Tente:
@OFF
Este loop й lento.. Mais rбpido seria:
pawn Код:
CMD:rc(playerid, params[])
{
SendAdminText(playerid, "/rc", params);
if(APlayerData[playerid][PlayerLevel] >= 1)
{
new bool:vehicle[MAX_VEHICLES];
for(new j = 1; GetVehicleModel(j); ++j)
{
vehicle[j] = false;
for(new i, p = GetMaxPlayers(); i < p; ++i)
{
if(!IsPlayerInAnyVehicle(i) || !IsPlayerConnected(i) )
continue;
if(IsPlayerInVehicle(i, j) || IsTrailerAttachedToVehicle(i))
{
vehicle[j] = true;
break;
}
}
if(!vehicle[j])
if(!IsTrailerAttachedToVehicle(j))
SetVehicleToRespawn(j);
}
}
else return false;
return true;
}
pawn Код:
for(new i, p = GetMaxPlayers(); i < p; ++i)
pawn Код:
for(new i = 0; i < MAX_PLAYERS; ++ i)