Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. #include <td-actions>
  2.  
  3. CMD:infernus(playerid)
  4. {
  5. ShowActionForPlayer(playerid, ActionInfernus, "Voce realmente deseja spawnar um infernus neste local?", .action_time = 10000);
  6.  
  7. return 1;
  8. }
  9.  
  10. Action:ActionInfernus(playerid, response)
  11. {
  12. if (response == ACTION_RESPONSE_YES)
  13. {
  14. new Float:x, Float:y, Float:z, Float:ang;
  15.  
  16. GetPlayerPos(playerid, x, y, z);
  17. GetPlayerFacingAngle(playerid, ang);
  18.  
  19. new vehicleid = CreateVehicle(411,
  20. x + 2.5 * floatsin(-ang, degrees),
  21. y + 2.5 * floatcos(-ang, degrees),
  22. z + 0.3,
  23. ang,
  24. 0,
  25. 0,
  26. -1);
  27.  
  28. LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid));
  29. SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid));
  30. } else {
  31. SendClientMessage(playerid, -1, "Você não quis spawnar um infernus.");
  32. }
  33. }