Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include a_samp
- #include zcmd
- static
- v,
- x,
- y,
- bool: cT[MAX_PLAYERS];
- CMD:trancar(playerid, params[])
- {
- if(!IsPlayerInAnyVehicle(playerid))
- return SendClientMessage(playerid, -1, "Sem carro!");
- if(cT[playerid] == true)
- return SendClientMessage(playerid, -1, "Carro já está trancado!");
- v = GetPlayerVehicleID(playerid);
- x = 0;
- y = GetMaxPlayers();
- for( ; x != y; x++)
- {
- if(x == playerid)
- {
- if(!IsPlayerConnected(x))
- continue
- SetVehicleParamsForPlayer(v, x, 0, 1);
- }
- }
- cT[playerid] = true;
- return true;
- }
- CMD:destrancar(playerid, params[])
- {
- if(!IsPlayerInAnyVehicle(playerid))
- return SendClientMessage(playerid, -1, "Sem carro!");
- if(cT[playerid] == false)
- return SendClientMessage(playerid, -1, "Carro já está destrancado!");
- v = GetPlayerVehicleID(playerid);
- x = 0;
- y = GetMaxPlayers();
- for( ; x != y; x++)
- {
- if(x == playerid)
- {
- if(!IsPlayerConnected(x))
- continue;
- SetVehicleParamsForPlayer(v, x, 0, 0);
- }
- }
- cT[playerid] = false;
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment