16.08.2013, 06:32
I made private cars for my server from this tutorial https://sampforum.blast.hk/showthread.php?tid=283929
When I respawn all cars (/respawnallcars) , the tuning disappears. Can someone help me with this problem?
When I respawn all cars (/respawnallcars) , the tuning disappears. Can someone help me with this problem?
pawn Код:
if(strcmp(cmd, "/respawnallcars", true) == 0) {
if(pInfo[playerid][Adminlevel] > 0)
{
new bool:vehicleused[MAX_VEHICLES];
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
{
vehicleused[GetPlayerVehicleID(i)] = true;
}
}
for(new i=1; i < MAX_VEHICLES; i++)
{
if(!vehicleused[i])
{
SetVehicleToRespawn(i);
}
}
SendClientMessage(playerid, COLOR_LIGHT_GREEN, "Respawned!");
SendClientMessageToAll(COLOR_LIGHT_GREEN, "All vehicles respawned!");
}
return 1;
}