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...
Now all I need is to get the OnDialogResponse thing, and Im done.
Read my post again.
pawn Код:
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;
}