18.02.2016, 17:32
I really don't like doing dialogs like this y_inline/y_dialog is by far superior to any other method why would you want to waste time doing it like this?
Example
Example
Код:
#include <a_samp>
#include <YSI\y_inline>
#include <YSI\y_dialog>
#include <YSI\y_commands>
CMD:teles(playerid, params[])
{
inline TeleportMenu(pid, dialogid, response, listitem, string:text[])
{
#pragma unused listitem, dialogid, pid, text
if(response)
{
switch(listitem)
{
case 0:
{
SetPlayerPos(playerid,404.0729,2464.5574,16.5000);
SendClientMessage(playerid, 0xFFFF00AA, "You Have Teleported To Abondoned Airport" );
}
case 1:
{
SetPlayerPos(playerid,-1353.3026,-235.7281,14.1440);
SendClientMessage(playerid, 0xFFFF00AA, "You Have Teleported To San Ferrieno Airport" );
}
case 2:
{
SetPlayerPos(playerid,1422.1212,-2541.3335,13.5469);
SendClientMessage(playerid, 0xFFFF00AA, "You Have Teleported To Los Santos Airport" );
}
case 3:
{
SetPlayerPos(playerid,1319.9559,1269.4812,10.8203);
SendClientMessage(playerid, 0xFFFF00AA, "You Have Teleported To Las Venturas Airport" );
}
}
}
}
Dialog_ShowCallback(playerid, using inline TeleportMenu, DIALOG_STYLE_LIST, "Teleports", "Abondoned Airport\nSan Ferrieno Airport\nLos Santos Airport\nLas Venturas Airport", "Teleport", "Cancel");
return 1;
}

