Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static bool:CarrosTrancado[MAX_PLAYERS];
- if(!strcmp(cmdtext, "/trancar", true))
- {
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0x00F6F6AA, "Vc nao tem um carro!");
- if(CarrosTrancado[playerid] == true) return SendClientMessage(playerid,0x00F6F6AA,"Seu carro agora esta trancado");
- new
- iLoop = 0,
- iVeh = GetPlayerVehicleID(playerid);
- for( ; iLoop < MAX_PLAYERS; iLoop++)
- {
- if(iLoop == playerid || !IsPlayerConnected(iLoop)) continue;
- SetVehicleParamsForPlayer(iVeh,iLoop, 0, 1);
- }
- CarrosTrancado[playerid] = true;
- SendClientMessage(playerid, 0x00F6F6AA, "Carro Trancado!");
- return true;
- }
- if(!strcmp(cmdtext, "/destrancar", true))
- {
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0x00F6F6AA, "Vc nao tem um carro!");
- if(CarrosTrancado[playerid] == false) return SendClientMessage(playerid,0x00F6F6AA,"Seu carro agora esta destrancado");
- new
- iLoop = 0,
- iVeh = GetPlayerVehicleID(playerid);
- for( ; iLoop < MAX_PLAYERS; iLoop++)
- {
- if(iLoop == playerid || !IsPlayerConnected(iLoop)) continue;
- SetVehicleParamsForPlayer(iVeh,iLoop, 0, 0);
- }
- CarrosTrancado[playerid] = false;
- SendClientMessage(playerid, 0x00F6F6AA, "Carro destrancado!");
- return true;
- }
- //By Andrew e DraKiNs
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement