PDA

View Full Version : Teleport Dialogs


TheCow
01/03/2012, 09:09 PM
Hello.

Im needing a teleport dialog, but dont know how to make one, and I cant find any tutorials that explains what they have done in there too...

Please someone make one for me, I already have done this..


CMD:telepordid(playerid,params[])
{
ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "Telepordid", "Los Santos\nLas Venturas\nSan Fierro", "Telepordi", "Katkesta");
return 1;
}


Now all I need is to get the OnDialogResponse thing, and Im done.

I will give rep+ for help!

Twisted_Insane
01/03/2012, 09:15 PM
http://wiki.sa-mp.com/wiki/How_to_Create_a_Dialog

TheCow
01/03/2012, 09:21 PM
Read my post again.

I dont understand that Wiki, becouse In my GM dialogs are like this:


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1)
{
new name[MAX_PLAYER_NAME], file[256], string[128];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), KASUTAJA_FAIL, name);
if(!response) return Kick(playerid);
if (!strlen(inputtext)) return
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_PASSWORD, "Tervist, näib et sa pole veel registreerinud.", "Et registreerida sisesta enda parool.", "Registreeri", "Lahku");
dini_Create(file);
dini_IntSet(file, "Parool", udb_hash(inputtext));
dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][pAdminLevel] = 0);
dini_IntSet(file, "Raha",PlayerInfo[playerid][pRaha] = 500);
dini_IntSet(file, "Skoor",PlayerInfo[playerid][pSkoor] = 0);
format(string, 128, "[SÜSTEEM]: Sa registreerisid nimega: %s Ja parooliks panid %s, sa oled automaatselt sisse logitud.", name, inputtext);
SendClientMessage(playerid, 0xAA3333AA, string);
gPlayerLogged[playerid] = 1;
}
if(dialogid == 2)
{
new name[MAX_PLAYER_NAME], file[256];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), KASUTAJA_FAIL, name);
if(!response) return Kick(playerid);
if (!strlen(inputtext)) return ShowPlayerDialog(playerid, 2, DIALOG_STYLE_PASSWORD, "Tervist, näib et sa oled registreeritud.", "Et sisse logida sisesta enda parool.", "Sisene", "Lahku");
new tmp;
tmp = dini_Int(file, "Parool");
if(udb_hash(inputtext) != tmp) {
SendClientMessage(playerid, 0xAA3333AA, "Sa sisestasid vale parooli.");
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_PASSWORD, "Tervist, näib et sa oled registreeritud.", "Et sisse logida sisesta enda parool.", "Sisene", "Lahku");
}
else
{
gPlayerLogged[playerid] = 1;
PlayerInfo[playerid][pAdminLevel] = dini_Int(file, "AdminLevel");
SetPlayerScore(playerid, PlayerInfo[playerid][pSkoor]);
GivePlayerMoney(playerid, dini_Int(file, "Raha")-GetPlayerMoney(playerid));
SendClientMessage(playerid,VARV_PUNANE, "[SÜSTEEM]: Sa sisestasid õige parooli, ning sind logiti sisse!");
}
}
if(dialogid == 3)
{
if(response == 1)
{
if(listitem == 0)
{
new Float:x, Float:y, Float:z, Float:a;
GetPlayerPos(playerid, x,y,z);
GetPlayerFacingAngle(playerid, a);
new vehicleid = CreateVehicle(411, x+3,y,z, a, -1, -1, -1);
PutPlayerInVehicle(playerid, vehicleid, 0);
}
if(listitem == 1)
{
new Float:x, Float:y, Float:z, Float:a;
GetPlayerPos(playerid, x,y,z);
GetPlayerFacingAngle(playerid, a);
new vehicleid = CreateVehicle(562, x+3,y,z, a, -1, -1, -1);
PutPlayerInVehicle(playerid, vehicleid, 0);
}
if(listitem == 2)
{
new Float:x, Float:y, Float:z, Float:a;
GetPlayerPos(playerid, x,y,z);
GetPlayerFacingAngle(playerid, a);
new vehicleid = CreateVehicle(451, x+3,y,z, a, -1, -1, -1);
PutPlayerInVehicle(playerid, vehicleid, 0);
}
}
}
return 1;
}


In the wiki, there arent things like if(dialogid == 1)