[Ajuda] Possivel bug mSelection - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Possivel bug mSelection (
/showthread.php?tid=591162)
Possivel bug mSelection -
JuniorRiddle - 08.10.2015
Recentemente criei uma concessionбria em mSelection para um amigo, entretanto ele vem me reportando que, as vezes, quando seleciona um item, mesmo o cуdigo estando certo, e com os models em ordem, simplesmente nada acontece. Nгo conheзo muito bem esta include, por isso resolvi perguntar, alguem sabe o que pode ser?
Usei a mesma base do tуpico oficial da include. Sу dividi modelo por modelo.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/selectVehicleTrailer", true) == 0)
{
new cars[15];
cars[0] = 435;
cars[1] = 450;
cars[2] = 569;
cars[3] = 570;
cars[4] = 584;
cars[5] = 590;
cars[6] = 591;
cars[7] = 606;
cars[8] = 607;
cars[9] = 608;
cars[10] = 610;
cars[11] = 611;
ShowModelSelectionMenuEx(playerid, cars, 12, "Select trailer", CUSTOM_TRAILER_MENU, 16.0, 0.0, -55.0);
return 1;
}
return 0;
}
public OnPlayerModelSelectionEx(playerid, response, extraid, modelid)
{
if(extraid == CUSTOM_TRAILER_MENU)
{
if(response)
{
SendClientMessage(playerid, 0xFF0000FF, "Trailer Spawned");
new Float:pos[3]; GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
CreateVehicle(modelid, pos[0] + 2.5, pos[1], pos[2] + 2.5, 0.0, random(128), random(128), -1);
}
else SendClientMessage(playerid, 0xFF0000FF, "Canceled trailer selection");
}
return 1;
}