Dialog help
#1

My script crash with this, can you guys help me out, thanks in advance!


PHP код:
        if(dialogid == DIALOG_SIREN && response)
        {
            switch(
listitem)
            {
                case 
0:
                {
                    
ShowPlayerDialog(playeridDIALOG_SIREN2DIALOG_STYLE_LIST"{FF8040}Siren.. ""Infernus\nTurismo\nElegy\nSultan\nJester\nFlash\nUranus\nstratum""Ok""Kembali");
                    return 
1;
                }
                case 
1:
                {
                    new 
VID GetPlayerVehicleID(playerid);
                    if(
hassiren[VID]) {
                    
DestroyObject(siren[VID]);
                    
hassiren[VID] = 0;
                    
siren[VID] = -1;
                    
SendClientMessage(playerid, -1"{FFFF00}[SIREN] : Your siren has been removed !");
                    return 
1;
                }
            }
        }
        if(
dialogid == DIALOG_SIREN2 && response)
        {
            switch(
listitem)
            {
                case 
0:
                {
                    new 
VID GetPlayerVehicleID(playerid);
                    if(
GetVehicleModel(GetPlayerVehicleID(playerid)) == 411) {
                    if(
hassiren[VID] == 1) {
                     
DestroyObject(siren[VID]);
                     }
                     
hassiren[VID] = 1//
                    
siren[VID] = CreateObject19419,0,0,0,0,0,0,80 ); // <infernus>
                    
AttachObjectToVehiclesiren[VID], VID0.010000, -0.0600000.6899990.0000000.0000000.000000 ); // <1>
                    
}
                 }
                case 
1:
                {
                    new 
VID GetPlayerVehicleID(playerid);
                    if(
GetVehicleModel(GetPlayerVehicleID(playerid)) == 451) {
                    if(
hassiren[VID] == 1) {
                     
DestroyObject(siren[VID]);
                     }
                     
hassiren[VID] = 1//
                    
siren[VID] = CreateObject19419,0,0,0,0,0,0,80 ); // <tURIZMO>
                    
AttachObjectToVehicle(siren[VID], VID,  0.000000, -0.5199990.5569990.0000000.0000000.000000);
                    }
                }
                case 
2:
                {
                    new 
VID GetPlayerVehicleID(playerid);
                    if(
GetVehicleModel(GetPlayerVehicleID(playerid)) == 562) {
                    if(
hassiren[VID] == 1) {
                     
DestroyObject(siren[VID]);
                     }
                     
hassiren[VID] = 1//
                    
siren[VID] = CreateObject19419,0,0,0,0,0,0,80 ); // <elegy>
                    
AttachObjectToVehicle(siren[VID], VID,  0.000000, -0.2699990.7549990.0000000.0000000.000000);
                    }
                }
                case 
3:
                {
                    new 
VID GetPlayerVehicleID(playerid);
                    if(
GetVehicleModel(GetPlayerVehicleID(playerid)) == 560) {
                    if(
hassiren[VID] == 1) {
                     
DestroyObject(siren[VID]);
                     }
                     
hassiren[VID] = 1//
                    
siren[VID] = CreateObject19419,0,0,0,0,0,0,80 ); // <sultan>
                    
AttachObjectToVehicle(siren[VID], VID0.0000000.0000000.8299990.0000000.0000000.000000);
                    }
                }
                case 
4:
                {
                    new 
VID GetPlayerVehicleID(playerid);
                    if(
GetVehicleModel(GetPlayerVehicleID(playerid)) == 559) {
                    if(
hassiren[VID] == 1) {
                     
DestroyObject(siren[VID]);
                     }
                     
hassiren[VID] = 1//
                    
siren[VID] = CreateObject19419,0,0,0,0,0,0,80 ); // <jester>
                    
AttachObjectToVehicle(siren[VID], VID,  0.000000, -0.2299990.7099990.0000000.0000000.000000);
                    }
                }
                case 
5:
                {
                    new 
VID GetPlayerVehicleID(playerid);
                    if(
GetVehicleModel(GetPlayerVehicleID(playerid)) == 565) {
                    if(
hassiren[VID] == 1) {
                     
DestroyObject(siren[VID]);
                     }
                     
hassiren[VID] = 1//
                    
siren[VID] = CreateObject19419,0,0,0,0,0,0,80 ); // <flash>
                    
AttachObjectToVehicle(siren[VID], VID,  0.000000, -0.1799990.6799990.0000000.0000000.000000);
                    }
                }
                case 
6:
                {
                    new 
VID GetPlayerVehicleID(playerid);
                    if(
GetVehicleModel(GetPlayerVehicleID(playerid)) == 558) {
                    if(
hassiren[VID] == 1) {
                     
DestroyObject(siren[VID]);
                     }
                     
hassiren[VID] = 1//
                    
siren[VID] = CreateObject19419,0,0,0,0,0,0,80 ); // <uranus>
                    
AttachObjectToVehicle(siren[VID], VID0.000000, -0.3449990.8549990.0000000.0000000.000000);
                    }
                }
                case 
7:
                {
                    new 
VID GetPlayerVehicleID(playerid);
                    if(
GetVehicleModel(GetPlayerVehicleID(playerid)) == 561) {
                    if(
hassiren[VID] == 1) {
                     
DestroyObject(siren[VID]);
                     }
                     
hassiren[VID] = 1//
                    
siren[VID] = CreateObject19419,0,0,0,0,0,0,80 ); // <stratum>
                    
AttachObjectToVehicle(siren[VID], VID0.000000, -0.0249990.8049990.0000000.0000000.000000);
                }
            }
        }
    }
    return 
1
Reply
#2

PHP код:
 if(dialogid == DIALOG_SIREN2 && response
        { 
            switch(
listitem
            { 
                case 
0
                { 
                    new 
VID GetPlayerVehicleID(playerid); 
                    if(
GetVehicleModel(GetPlayerVehicleID(playerid)) == 411) { 
                    if(
hassiren[VID] == 1) { 
                     
DestroyObject(siren[VID]); 
                     
//}  //-----------------------Removedhere
                     
hassiren[VID] = 1// 
                    
siren[VID] = CreateObject19419,0,0,0,0,0,0,80 ); // <infernus> 
                    
AttachObjectToVehiclesiren[VID], VID0.010000, -0.0600000.6899990.0000000.0000000.000000 ); // <1> 
                    

                 } 
             }  
// added it here 
Try this and do the same to the other codes as well.
Reply
#3

Quote:
Originally Posted by Karan007
Посмотреть сообщение
PHP код:
 if(dialogid == DIALOG_SIREN2 && response
        { 
            switch(
listitem
            { 
                case 
0
                { 
                    new 
VID GetPlayerVehicleID(playerid); 
                    if(
GetVehicleModel(GetPlayerVehicleID(playerid)) == 411) { 
                    if(
hassiren[VID] == 1) { 
                     
DestroyObject(siren[VID]); 
                     
//}  //-----------------------Removedhere
                     
hassiren[VID] = 1// 
                    
siren[VID] = CreateObject19419,0,0,0,0,0,0,80 ); // <infernus> 
                    
AttachObjectToVehiclesiren[VID], VID0.010000, -0.0600000.6899990.0000000.0000000.000000 ); // <1> 
                    

                 } 
             }  
// added it here 
Try this and do the same to the other codes as well.
Still same.
Reply
#4

use crashdetect plugin may it give you more infos about the crash
Reply
#5

You don't explain which code exactly makes crash your server.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)