Advertisement
Guest User

Untitled

a guest
Feb 24th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. CMD:estacionarmeuveiculo(playerid, params[])
  2. {
  3. if (!IsPlayerInVehicle(playerid ,CarroJogador[playerid]))
  4. {
  5. SendClientMessage(playerid, COLOR_GREY, "Você não está no seu veiculo.");
  6. return 1;
  7. }
  8. new Float:s_PosX,Float:s_PosY,Float:s_PosZ;
  9. new Float:s_PosA;
  10. new carroid;
  11. new setarcarro;
  12. if(IsPlayerInVehicle(playerid,carroid) && InfoCarro[Veiculo][cdono] == 1)
  13. {
  14. GetPlayerName(playerid, playername, sizeof(playername));
  15. GetVehiclePos(carroid, s_PosX, s_PosY, s_PosZ);
  16. GetVehicleZAngle(carroid, s_PosA);
  17. if(setarcarro == carroid)
  18. {
  19. InfoCarro[playerid][s_PosX] = GetPVarFloat(playerid,"PosX");
  20. InfoCarro[playerid][s_PosY] = GetPVarFloat(playerid,"PosY");
  21. InfoCarro[playerid][s_PosZ] = GetPVarFloat(playerid,"PosZ");
  22. InfoCarro[playerid][s_PosA] = GetPVarFloat(playerid,"PosA");
  23. SendClientMessage(playerid,0xFFFF00FF,"Carro estacionado com sucesso !");
  24. DestroyVehicle(carroid);
  25. CreateVehicle(InfoCarro[playerid][modelinho],InfoCarro[playerid][s_PosX],InfoCarro[playerid][s_PosY],InfoCarro[playerid][s_PosZ]+1.0,InfoCarro[playerid][s_PosA],InfoCarro[playerid][s_Cor1],InfoCarro[playerid][s_Cor2],60000);
  26. TogglePlayerControllable(playerid, 1);
  27. return true;
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement