• 2 Vote(s) - 1.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] Não consigo criar motos
#1
Bug 
Sou novo no Open.MP e no Qawno, estou querendo fazer um servidor de fugas e pvp. Testei um sistema de criar motos bem básico, mas não estou tendo resultado na criação da moto, o sistema funciona com base no comando: /moto (utilizei a include do ZCMD), esse comando abre uma dialog que é possível escolher uma moto, mas não cria a moto. Alguém pode me ajuda? Meu Código(coloque ias partes principais):

Code:
#include <open.mp> #include <a_samp> #include <zcmd> new Float:PlayerX; new Float:PlayerY; new Float:PlayerZ; public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {     if(dialogid == ESCOLHER_MOTOS)     {         if(response)         {             switch(listitem)             {                 case 0:                 {                     // Obtém a posição e o ângulo do jogador                     GetPlayerPos(playerid, PlayerX, PlayerY, PlayerZ);                     new Float:PlayerAngle;                     GetPlayerFacingAngle(playerid, PlayerAngle);                                         // Calcula a nova posição na frente do jogador                     new Float:OffsetX, Float:OffsetY, Float:OffsetZ = 1.0; // Um pouco acima                     OffsetX = PlayerX + (3.0 * floatsin(-PlayerAngle, degrees)); // 3 unidades na frente                     OffsetY = PlayerY + (3.0 * floatcos(-PlayerAngle, degrees)); // 3 unidades na frente                     // Envia uma mensagem ao jogador com as novas coordenadas                     new str[128];                     format(str, sizeof(str), "Nova posição para criar a moto: X: %f, Y: %f, Z: %f", OffsetX, OffsetY, PlayerZ + OffsetZ);                     SendClientMessage(playerid, -1, str);                     // Cria o veículo na nova posição                     new vehicleid = AddStaticVehicleEx(522, OffsetX, OffsetY, PlayerZ + OffsetZ, PlayerAngle, -1, -1, 1000, false);                                         // Verifica se o veículo foi criado com sucesso                     if(vehicleid == INVALID_VEHICLE_ID)                     {                         SendClientMessage(playerid, -1, "Falha ao criar a moto.");                     }                     else                     {                         SendClientMessage(playerid, -1, "Moto NRG-500 criada com sucesso.");                     }                 }             }         }     }     return 1; } CMD:moto(playerid) { ShowPlayerDialog(playerid, 876, DIALOG_STYLE_LIST, "Motos", "NRG-500", "Selecionar", "Cancelar"); return 1; }
  Reply
#2
público OnGameModeInit()
{
SetGameModeText("Fugas e PvP | Br");
AddPlayerClass(0, 383.0406, -2084.9119, 7.8359,1.3805, 0, 0, 0, 0, 0, 0);
UsarPlayerPedAnims();
AdicionarVeículoEstático(520, 378.1555, -2071.7427, 7.8359, 82.2873, 0, 1);

//Criar objetos e coisas
AdicionarStaticPickup(19131, 23, 378.1555, -2071.7427, 7.8359, 1);
Create3DTextLabel("{FFFF00}Mundo De {00FF00}FUGAS \n\n {FFFF00}Pressione F para Entrar", -1, 378.1555, -2071.7427, 7.8359, 20.0, 1, false);
retornar 1;
}

Era pra ele criar um hidra
  Reply