Need help. My dialog will not work???
#1

Hello. I have a problem with my dialog.

All my dialogs works in my test server. But then i send the files to my volt server. And loaded the filterscript. will it not work.

But the dialog come up. But i cant select a weapon. I only close down again and again when i try to select a weapon

What is wrong. A loaded plugin?or

Dialog...

PHP код:
#define DIALOG_LOCKER 5
#define DIALOG_BUYWEAPONS 7 
PHP код:
if(!strcmp(cmdtext"/buyweapon"true))
    {
        if(
PlayerToPoint(20.0,playerid,2442.8718,-1973.7949,13.5469))
        
ShowPlayerDialog(playeridDIALOG_BUYWEAPONSDIALOG_STYLE_LIST"Weapon list and Price""Colt45. 750$\nDeagle 1250$\nShotgun 1750$\nSpas-12 5750$ Only O.G mission level 2 and higher\nAK-47 3750$\nM4-A1 5750$ Only O.G mission level 2 and higher\nMolotovs 7500$ Only O.G mission level 4 and higher\nRocket 12.750$ Only O.G mission level 6 the highest level.""Select""Canel");
        else 
SendClientMessage(playerid0xAA3333AA"[Error]: {FFFFFF} You are not near the ammo place");
        return 
1;
    }
     if(!
strcmp(cmdtext"/Lockers"true))
    {
        new 
Skin;
        
Skin GetPlayerSkin(playerid);
        if(
Skin == 71||Skin == 281||Skin == 267||Skin == 280||Skin == 282||Skin == 288||Skin == 165||Skin == 166||Skin == 284||Skin == 285||Skin == 286||Skin == 287||Skin == 283)
        if(
PlayerToPoint(20.0,playerid,254.1121,74.1638,1003.6406))
        
ShowPlayerDialog(playeridDIALOG_LOCKERDIALOG_STYLE_LIST"Weapons and Clothes""Cadet Cloth\nOfficer | Cloth\nOfficer || Cloth\nOfficer ||| Cloth\nLSPD Motorbike Cop\nS.W.A.T Special Forces""Select""Close");
        else 
SendClientMessage(playerid0xAA3333AA"[Error]: {FFFFFF} You are not around a control pad!");
        return 
1;
    }
    return 
0;

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == DIALOG_BUYWEAPONS)
    {
        if(
response// If they clicked 'Select' or double-clicked a weapon
        
{
            
// Give them the weapon
            
if(listitem == 0// They selected the first item - Desert Eagle
            
{
                
GivePlayerWeapon(playerid22150); // Give them a desert eagle
            
}
            if(
listitem == 1// They selected the second item - AK-47
            
{
                
GivePlayerWeapon(playerid24150); // Give them an AK-47
            
}
            if(
listitem == 2// They selected the third item - Desert Eagle if(GetPlayerWantedLevel(playerid) >= 2)
            
{
            
GivePlayerWeapon(playerid25150);
            }
            if(
listitem == 3// They selected the second item - AK-47
            
{
               if(
GetPlayerWantedLevel(playerid) >= 2GivePlayerWeapon(playerid27150); // Give them an AK-47
            
}
            if(
listitem == 4// They selected the second item - AK-47
            
{
                
GivePlayerWeapon(playerid30150); // Give them an AK-47
            
}
            if(
listitem == 5// They selected the second item - AK-47
            
{
               if(
GetPlayerWantedLevel(playerid) >= 2GivePlayerWeapon(playerid31150); // Give them an AK-47
            
}
            if(
listitem == 6// They selected the second item - AK-47
            
{
               if(
GetPlayerWantedLevel(playerid) >= 4GivePlayerWeapon(playerid181); // Give them an AK-47
            
}
            if(
listitem == 7// They selected the second item - AK-47
            
{
               if(
GetPlayerWantedLevel(playerid) >= 6GivePlayerWeapon(playerid351); // Give them an AK-47
            
}
        }
        return 
1// We handled a dialog, so return 1. Just like OnPlayerCommandText.
    
}
    if(
dialogid == DIALOG_LOCKER)
    {
        if(
response// If they clicked 'Select' or double-clicked a weapon
        
{
            
// Give them the weapon
            
if(listitem == 0// Cadet
            
{
                
GivePlayerWeapon(playerid31);
                
SetPlayerArmour(playerid100.0);
                
SetPlayerSkin(playerid71);
                
GivePlayerWeapon(playerid24150);
            }
            if(
listitem == 1// They selected the second item - AK-47
            
{
                
GivePlayerWeapon(playerid31);
                
SetPlayerArmour(playerid100.0);
                
SetPlayerSkin(playerid280);
                
GivePlayerWeapon(playerid24150);
                
GivePlayerWeapon(playerid25150);
            }
            if(
listitem == 2// They selected the third item - Desert Eagle
            
{
                
GivePlayerWeapon(playerid31);
                
SetPlayerArmour(playerid100.0);
                
SetPlayerSkin(playerid281);
                
GivePlayerWeapon(playerid24150);
                
GivePlayerWeapon(playerid25150);
                
GivePlayerWeapon(playerid29150);
             }
             if(
listitem == 3// They selected the third item - Desert Eagle
            
{
                
GivePlayerWeapon(playerid31);
                
SetPlayerArmour(playerid100.0);
                
SetPlayerSkin(playerid282);
                
GivePlayerWeapon(playerid24150);
                
GivePlayerWeapon(playerid25150);
                
GivePlayerWeapon(playerid29150);
                
GivePlayerWeapon(playerid31150);
             }
             if(
listitem == 4// They selected the third item - Desert Eagle
            
{
                
GivePlayerWeapon(playerid31);
                
SetPlayerArmour(playerid100.0);
                
SetPlayerSkin(playerid284);
                
GivePlayerWeapon(playerid24150);
             }
             if(
listitem == 5// They selected the third item - Desert Eagle
            
{
                
GivePlayerWeapon(playerid27750);
                
GivePlayerWeapon(playerid24750);
                
SetPlayerArmour(playerid100.0);
                
SetPlayerSkin(playerid285);
                
GivePlayerWeapon(playerid31750);
             }
        }
        return 
1// We handled a dialog, so return 1. Just like OnPlayerCommandText.
    
}
    return 
0// You MUST return 0 here! Just like OnPlayerCommandText.

Reply
#2

It'd help if you show us the dialog's... and OnPlayerDialogResponse
Reply
#3

Does OnDialogResponse return 0 at the end of the callback?
Reply
#4

Here. I have replaced it...

I dont know it. My test server runs on my windows 7 pc.

And my Volt server runs on a Linux
Reply
#5

Is the code above from the filterscript? Make sure that you don't use dialogid 5 and 7 anywhere else (in other mode).
Reply
#6

What did you mean

Like

PHP код:
#define DIALOG_LOCKER 
#define DIALOG_BUYWEAPONS 
Removed the 5 and 7?
Reply
#7

Just redefine them to some other numbers, change 5 and 7 to something like 1005, 2007.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)