[AJUDA]Veiculos com horas
#5

pawn Код:
new bool:dr_PodeEntrar[MAX_PLAYERS];
new dr_Timer[MAX_PLAYERS];

forward PodeEntrarDeNovo(playerid);

public OnPlayerConnect(playerid)
{
     dr_PodeEntrar[playerid] = true;
     return 1;
}

public OnPlayerDisconnect(playerid)
{
     KillTimer(dr_Timer[playerid]);
     return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
     if(newstate == 2) // Motorista
     {
          new vID = GetPlayerVehicleID(playerid);
          if(vID == /*Id_Do_Seu_Veiculo_Proibido*/)
          {
               if(!dr_PodeEntrar[playerid])
               {
                    RemovePlayerFromVehicle(playerid);
                    return SendClientMessage(playerid, 0x777777FF, "   Vocк nгo pode pegar este veiculo.");
               }
               dr_Timer[playerid] = SetTimerEx("PodeEntrarDeNovo", 60000*60*2, "i", playerid);
               dr_PodeEntrar[playerid] = false;
          }
     }
     return 1;
}

public PodeEntrarDeNovo(playerid)
{
     dr_PodeEntrar[playerid] = true;
     return 1;
}
Simples.
Reply


Messages In This Thread
[AJUDA]Veiculos com horas - by gabrieldefreitas11 - 27.06.2011, 04:45
Re: [AJUDA]Veiculos com horas - by The Knight - 27.06.2011, 11:09
Re: [AJUDA]Veiculos com horas - by Shadoww5 - 27.06.2011, 13:30
Respuesta: [AJUDA]Veiculos com horas - by gabrieldefreitas11 - 27.06.2011, 21:40
Re: [AJUDA]Veiculos com horas - by Dr_Pawno - 27.06.2011, 21:53

Forum Jump:


Users browsing this thread: 1 Guest(s)