Vehicle Respawn Question
#10

pawn Код:
CMD:vrespawn(playerid, params[])
{
    if(PlayerData[playerid][AdminLevel] < 1) return 0;
    new bool:Unusedcar[MAX_VEHICLES];
    for(new i,g = GetMaxPlayers(); i < g; i++)
        if(IsPlayerConnected(i))
            if(IsPlayerInAnyVehicle(i))
                Unusedcar[GetPlayerVehicleID(i)] = true;
    for(new c=1; c < MAX_VEHICLES; c++)
        if(!Unusedcar[c])
        {
            if(c == OrgInfo[c][Car1] || c == OrgInfo[c][Car2] || c == OrgInfo[c][Car3] || c == OrgInfo[c][Car4] || c == OrgInfo[c][Car5] || c == OrgInfo[c][Car6] || c == OrgInfo[c][Car7] || c == OrgInfo[c][Car8]) continue;
            else if(c == JobInfo[c][Car1] || c == JobInfo[c][Car2] || c == JobInfo[c][Car3] || c == JobInfo[c][Car4] || c == JobInfo[c][Car5] || c == JobInfo[c][Car6] || c == JobInfo[c][Car7] || c == JobInfo[c][Car8]) continue;
            else SetVehicleToRespawn(c);
        }
    return SendClientMessageToAll(0xFF9900AA,"An Administrator has respawned all vehicles!");
}
Reply


Messages In This Thread
Vehicle Respawn Question - by Tanush123 - 22.01.2012, 16:59
Re: Vehicle Respawn Question - by TheArcher - 22.01.2012, 17:28
Re: Vehicle Respawn Question - by Tanush123 - 22.01.2012, 21:40
Re: Vehicle Respawn Question - by Tanush123 - 27.01.2012, 00:02
Re: Vehicle Respawn Question - by Tanush123 - 31.01.2012, 12:13
Re: Vehicle Respawn Question - by 2KY - 31.01.2012, 12:45
Re: Vehicle Respawn Question - by MP2 - 31.01.2012, 12:47
Re: Vehicle Respawn Question - by Tanush123 - 02.02.2012, 21:42
Re: Vehicle Respawn Question - by Tanush123 - 04.02.2012, 19:51
Re: Vehicle Respawn Question - by Jefff - 04.02.2012, 21:48

Forum Jump:


Users browsing this thread: 1 Guest(s)