Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new BlockVeh[MAX_PLAYERS];
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- new VehModel = GetVehicleModel(vehicleid);
- if(VehModel == 520 || VehModel == 425)
- {
- if(BlockVeh[playerid] == 1) // Caso ele esteja bloqueado para andar.
- {
- SendClientMessage(playerid, 0xFF0000FF, "Já deu o seu tempo de usar o Hydra.");
- RemovePlayerFromVehicle(playerid);
- SetTimerEx("LiberarVeh", 60000, false, "i", playerid); // Irá setar um tempo para ele usar novamente.
- }
- else // Caso ele não esteja bloqueado para andar.
- {
- SendClientMessage(playerid, -1, "Bem vindo a um Hydra/Hunter.");
- SetTimerEx("BloquearVeh", 10000, false, "i", playerid); // Ele anda 10 segundos com o veículo e é removido.
- }
- }
- return 1;
- }
- forward BloquearVeh(playerid);
- public BloquearVeh(playerid)
- {
- BlockVeh[playerid] = 1;
- return 1;
- }
- forward LiberarVeh(playerid);
- public LiberarVeh(playerid)
- {
- BlockVeh[playerid] = 0;
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement