[POMOC]Mjesanje dialoga.

Započeo Alen Hadzimustafic, April 03, 2013, 15:48:18 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:Moj mod od 0
Opis Problema:Napravio sam dialog za teleport.Udjem u igru i kucam teleport on mi se otvori i kad izaberem da me porta na neko mjesto on mi izbaci nemate dovoljno novca da rentate auto.Mjesa mi se id dialoga za teleport i za rent.A rent mi je u filterscriptama. :'(  :'(
Dio skripte:evo za rent a drugo je za teleport.
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_RENT)
{
if(listitem == 0)
{
if (GetPlayerMoney(playerid) <  25)
{
SendClientMessage(playerid, Bela, "Nemate dovoljno novca da izrentate auto.");
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
return 1;
}
if(Rentanoa[playerid] != 299)
{
SendClientMessage(playerid, Bela, "Morate prvo da vratite iznajmljeno vozilo.");
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
return 1;
}
for(new i=0; i<MAX_PLAYERS; i++)
{
if(Rentanoa[i] == GetPlayerVehicleID(playerid))
{
SendClientMessage(playerid, Bela, "Neko je vec iznajmio ovaj automobil.");
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
GivePlayerMoney(playerid,-25);
Rentanoa[playerid] = GetPlayerVehicleID(playerid);
TogglePlayerControllable(playerid, 1);
SendClientMessage(playerid,0xFFFFFFFF,"Iznajmili ste auto, da ga vratite kucajte /unrentajauto.");
SetTimer("rentauta",900000,0);
}
}
if(listitem == 1)
{
if (GetPlayerMoney(playerid) <  50)
{
SendClientMessage(playerid, Bela, "Nemate dovoljno novca da izrentate auto.");
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
return 1;
}
if(Rentanoa[playerid] != 299)
{
SendClientMessage(playerid, Bela, "Morate prvo da vratite iznajmljeno vozilo.");
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
return 1;
}
for(new i=0; i<MAX_PLAYERS; i++)
{
if(Rentanoa[i] == GetPlayerVehicleID(playerid))
{
SendClientMessage(playerid, Bela, "Neko je vec iznajmio ovaj automobil.");
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
GivePlayerMoney(playerid,-50);
Rentanoa[playerid] = GetPlayerVehicleID(playerid);
TogglePlayerControllable(playerid, 1);
SendClientMessage(playerid,0xFFFFFFFF,"Iznajmili ste auto, da ga vratite kucajte /unrentajauto.");
SetTimer("rentauta",1800000,0);
}
if(listitem == 2)
{
if (GetPlayerMoney(playerid) <  100)
{
SendClientMessage(playerid, Bela, "Nemate dovoljno novca da izrentate auto.");
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
return 1;
}
if(Rentanoa[playerid] != 299)
{
SendClientMessage(playerid, Bela, "Morate prvo da vratite iznajmljeno vozilo.");
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
return 1;
}
for(new i=0; i<MAX_PLAYERS; i++)
{
if(Rentanoa[i] == GetPlayerVehicleID(playerid))
{
SendClientMessage(playerid, Bela, "Neko je vec iznajmio ovaj automobil.");
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
GivePlayerMoney(playerid,-100);
Rentanoa[playerid] = GetPlayerVehicleID(playerid);
TogglePlayerControllable(playerid, 1);
SendClientMessage(playerid,0xFFFFFFFF,"Iznajmili ste auto, da ga vratite kucajte /unrentajauto.");
SetTimer("rentauta",3600000,0);
}
if(listitem == 3)
{
if (GetPlayerMoney(playerid) <  50)
{
SendClientMessage(playerid, Bela, "Nemate dovoljno novca da izrentate auto.");
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
return 1;
}
if(Rentanoa[playerid] != 299)
{
SendClientMessage(playerid, Bela, "Morate prvo da vratite iznajmljeno vozilo.");
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
return 1;
}
for(new i=0; i<MAX_PLAYERS; i++)
{
if(Rentanoa[i] == GetPlayerVehicleID(playerid))
{
SendClientMessage(playerid, Bela, "Neko je vec iznajmio ovaj automobil.");
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
GivePlayerMoney(playerid,-150);
Rentanoa[playerid] = GetPlayerVehicleID(playerid);
TogglePlayerControllable(playerid, 1);
SendClientMessage(playerid,0xFFFFFFFF,"Iznajmili ste auto, da ga vratite kucajte /unrentajauto.");
SetTimer("rentauta",5400000,0);
}
if(listitem == 4)
{
if (GetPlayerMoney(playerid) <  50)
{
SendClientMessage(playerid, Bela, "Nemate dovoljno novca da izrentate auto.");
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
return 1;
}
if(Rentanoa[playerid] != 299)
{
SendClientMessage(playerid, Bela, "Morate prvo da vratite iznajmljeno vozilo.");
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
return 1;
}
for(new i=0; i<MAX_PLAYERS; i++)
{
if(Rentanoa[i] == GetPlayerVehicleID(playerid))
{
SendClientMessage(playerid, Bela, "Neko je vec iznajmio ovaj automobil.");
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
GivePlayerMoney(playerid,-200);
Rentanoa[playerid] = GetPlayerVehicleID(playerid);
TogglePlayerControllable(playerid, 1);
SendClientMessage(playerid,0xFFFFFFFF,"Iznajmili ste auto, da ga vratite kucajte /unrentajauto.");
SetTimer("rentauta",7200000,0);
}
return 1;
}

a evo za teleport
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
if(dialogid == 1023)
    {
    if(listitem == 0)
    {
    ShowPlayerDialog(playerid,1901,DIALOG_STYLE_LIST,"Teleport Lista Organizacije","1 Police Department | PD\n2 Federal Bureau of Investigation | FBI\n3 Yakuza\n4 La Cosa Nostra | LCN\n5 Grove Street Families | GSF\n6 Ballas\n7 Los Aztecas\n8 Hitman Agency | HA\n8 The Triads | TT\n9 A/H Baze | AHB ","Teleport","");
    }
return 1;
}
if(dialogid == 45612)
    {
        if(listitem == 0)
        {
            if(GetPlayerState(playerid) == 2)
{
        new teleportcar = GetPlayerVehicleID(playerid);
        SetVehiclePos(teleportcar, 1519.6407,-1677.4548,13.1182);
}
else
{
        SetPlayerPos(playerid, 1519.6407,-1677.4548,13.1182);
        SetPlayerInterior(playerid, 0);
}
        }
if(listitem == 1)
        {
            if(GetPlayerState(playerid) == 2)
{
        new teleportcar = GetPlayerVehicleID(playerid);
        SetVehiclePos(teleportcar, 1637.0099,-1711.8336,13.2969);
}
else
{
        SetPlayerPos(playerid, 1637.0099,-1711.8336,13.2969);
        SetPlayerInterior(playerid, 0);
}
        }
  return 1;
  }

Hvala unaprijed :D

promeni id dialoga u jednom od ta 2, logicno

Citat: Blaeks poslato April 03, 2013, 15:59:30 POSLE PODNE
promeni id dialoga u jednom od ta 2, logicno
Mjenjo sam i opet isto  :'(
Sve sam isprobo i opet.
Meni radi prvo ovo za pd ali mi neradi za fbi pise nemate dovoljno novca da izrentate auto.
A kada kloknem za pd on  me sve ljepo port sta da radim  :'( :(.

prebaci iz te FS u gamemod i onda promeni IDove, mora se tako srediti

Citat: Blaeks poslato April 03, 2013, 16:08:07 POSLE PODNE
prebaci iz te FS u gamemod i onda promeni IDove, mora se tako srediti
Opet isto  :'( nezz sta je
sad nece ni da otvori listu organizacija kad kliknem orhanizacije  :'(
evo ti cijela komanda
ovo je CMD
CMD:teleport(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 1)
{
   ShowPlayerDialog(playerid,teleport,DIALOG_STYLE_LIST,"Teleport Lista","Organizacije\nVazna Mjesta\nGradovi\nPoslovi\nInterieri","OK","");
}
return 1;
}

evo ti dialog response
if(dialogid == teleport)
    {
    if(listitem == 0)
    {
    ShowPlayerDialog(playerid,torganizacije,DIALOG_STYLE_LIST,"Teleport Lista Organizacije","1 Police Department | PD\n2 Federal Bureau of Investigation | FBI\n3 Yakuza\n4 La Cosa Nostra | LCN\n5 Grove Street Families | GSF\n6 Ballas\n7 Los Aztecas\n8 Hitman Agency | HA\n8 The Triads | TT\n9 A/H Baze | AHB ","Teleport","");
    }
return 1;
}
if(dialogid == torganizacije)
    {
        if(listitem == 0)
        {
            if(GetPlayerState(playerid) == 2)
{
        new teleportcar = GetPlayerVehicleID(playerid);
        SetVehiclePos(teleportcar, 1519.6407,-1677.4548,13.1182);
}
else
{
        SetPlayerPos(playerid, 1519.6407,-1677.4548,13.1182);
        SetPlayerInterior(playerid, 0);
}
        }
if(listitem == 1)
        {
            if(GetPlayerState(playerid) == 2)
{
        new teleportcar = GetPlayerVehicleID(playerid);
        SetVehiclePos(teleportcar, 1637.0099,-1711.8336,13.2969);
}
else
{
        SetPlayerPos(playerid, 1637.0099,-1711.8336,13.2969);
        SetPlayerInterior(playerid, 0);
}
        }
  return 1;
  }

Pomagaj  :'(

pa na pocetku definiraj

#define DIALOG_TELEPORT 1

i

#define DILALOG_RENT 2


i umesto teleport stavljas 1 a umesto rent 2 ali pazi nikad nesmeju ovi poslednji brojevi da ti budu isti
BIG RESPECT JOEY_
BIG RESPECT [BD] Mr.Gagi

BIG RESPECT David A.k.A Sabljak

Citat: ladolez poslato April 03, 2013, 16:35:19 POSLE PODNE
pa na pocetku definiraj

#define DIALOG_TELEPORT 1

i

#define DILALOG_RENT 2


i umesto teleport stavljas 1 a umesto rent 2 ali pazi nikad nesmeju ovi poslednji brojevi da ti budu isti
Hvala ti na pomoci, ali to mi je vec namjesteno

a probaj da vidis da li u nekoj drugoj FS imas isti ID dialoga odnosno poslednji broj
BIG RESPECT JOEY_
BIG RESPECT [BD] Mr.Gagi

BIG RESPECT David A.k.A Sabljak

Citat: ladolez poslato April 03, 2013, 16:42:24 POSLE PODNE
a probaj da vidis da li u nekoj drugoj FS imas isti ID dialoga odnosno poslednji broj
Nema brate ni u jednoj
Sta da radim?  :'(

Rijesio moze lock  :D  :D  :D  :D  :D  :D  :D