[AJUDA]Comando RC
#8

Tenta ae :]

@Editado... esqueci de getar o id do veнculo e compara-lo...

pawn Код:
CMD:rc(playerid, params[])
{
    if(PlayerInfo[playerid][Level] < 3)return SendClientMessage(playerid,fail,LEVELF);
    SetTimerEx("ResetCars",3000,false,"i",playerid);
    return 1;
}


forward ResetCars(playerid);
public ResetCars(playerid)
{
    for(new cars; cars < MAX_VEHICLES; ++cars)
    {
        if(!VeiculoPR(cars))
        {
            SetVehicleToRespawn(cars);
        }
    }
    new string[90];
    format(string,sizeof(string),"O(a) Administrador(a) %s respawnou todos veiculos desocupados!",PlayerInfo[playerid][Nick]);
    SendClientMessageToAll(amarelo,string);
    return 1;
}

// Editada tinha esquecida de getar o id do veнculo.. deve funcionar..
stock VeiculoPR(carid)
{
   for(new p; p < GetMaxPlayers(); ++p)
   {
        if(IsPlayerInAnyVehicle(p))
        {
           carid = PlayerInfo[p][Carro];
           if(GetPlayerVehicleID(p) == carid) return 1;
           else return 0;
        }  
   }
   return 1;
}
Reply


Messages In This Thread
[AJUDA]Comando RC - by ReDKiiL - 30.06.2012, 21:11
Re: [AJUDA]Comando RC - by ViniBorn - 30.06.2012, 21:14
Re: [AJUDA]Comando RC - by ReDKiiL - 30.06.2012, 21:18
Re: [AJUDA]Comando RC - by .FuneraL. - 30.06.2012, 21:22
Re: [AJUDA]Comando RC - by ReDKiiL - 30.06.2012, 21:26
Re: [AJUDA]Comando RC - by Abravanel - 30.06.2012, 21:28
Re: [AJUDA]Comando RC - by ReDKiiL - 30.06.2012, 21:36
Re: [AJUDA]Comando RC - by leonardo1434 - 30.06.2012, 21:42
Re: [AJUDA]Comando RC - by ReDKiiL - 30.06.2012, 22:05
Re: [AJUDA]Comando RC - by leonardo1434 - 30.06.2012, 22:08

Forum Jump:


Users browsing this thread: 3 Guest(s)