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(playerid, DIALOG_SIREN2, DIALOG_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] = CreateObject( 19419,0,0,0,0,0,0,80 ); // <infernus>
                    
AttachObjectToVehicle( siren[VID], VID, 0.010000, -0.060000, 0.689999, 0.000000, 0.000000, 0.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] = CreateObject( 19419,0,0,0,0,0,0,80 ); // <tURIZMO>
                    
AttachObjectToVehicle(siren[VID], VID,  0.000000, -0.519999, 0.556999, 0.000000, 0.000000, 0.000000);
                    }
                }
                case 
2:
                {
                    new 
VID = GetPlayerVehicleID(playerid);
                    if(
GetVehicleModel(GetPlayerVehicleID(playerid)) == 562) {
                    if(
hassiren[VID] == 1) {
                     
DestroyObject(siren[VID]);
                     }
                     
hassiren[VID] = 1; //
                    
siren[VID] = CreateObject( 19419,0,0,0,0,0,0,80 ); // <elegy>
                    
AttachObjectToVehicle(siren[VID], VID,  0.000000, -0.269999, 0.754999, 0.000000, 0.000000, 0.000000);
                    }
                }
                case 
3:
                {
                    new 
VID = GetPlayerVehicleID(playerid);
                    if(
GetVehicleModel(GetPlayerVehicleID(playerid)) == 560) {
                    if(
hassiren[VID] == 1) {
                     
DestroyObject(siren[VID]);
                     }
                     
hassiren[VID] = 1; //
                    
siren[VID] = CreateObject( 19419,0,0,0,0,0,0,80 ); // <sultan>
                    
AttachObjectToVehicle(siren[VID], VID, 0.000000, 0.000000, 0.829999, 0.000000, 0.000000, 0.000000);
                    }
                }
                case 
4:
                {
                    new 
VID = GetPlayerVehicleID(playerid);
                    if(
GetVehicleModel(GetPlayerVehicleID(playerid)) == 559) {
                    if(
hassiren[VID] == 1) {
                     
DestroyObject(siren[VID]);
                     }
                     
hassiren[VID] = 1; //
                    
siren[VID] = CreateObject( 19419,0,0,0,0,0,0,80 ); // <jester>
                    
AttachObjectToVehicle(siren[VID], VID,  0.000000, -0.229999, 0.709999, 0.000000, 0.000000, 0.000000);
                    }
                }
                case 
5:
                {
                    new 
VID = GetPlayerVehicleID(playerid);
                    if(
GetVehicleModel(GetPlayerVehicleID(playerid)) == 565) {
                    if(
hassiren[VID] == 1) {
                     
DestroyObject(siren[VID]);
                     }
                     
hassiren[VID] = 1; //
                    
siren[VID] = CreateObject( 19419,0,0,0,0,0,0,80 ); // <flash>
                    
AttachObjectToVehicle(siren[VID], VID,  0.000000, -0.179999, 0.679999, 0.000000, 0.000000, 0.000000);
                    }
                }
                case 
6:
                {
                    new 
VID = GetPlayerVehicleID(playerid);
                    if(
GetVehicleModel(GetPlayerVehicleID(playerid)) == 558) {
                    if(
hassiren[VID] == 1) {
                     
DestroyObject(siren[VID]);
                     }
                     
hassiren[VID] = 1; //
                    
siren[VID] = CreateObject( 19419,0,0,0,0,0,0,80 ); // <uranus>
                    
AttachObjectToVehicle(siren[VID], VID, 0.000000, -0.344999, 0.854999, 0.000000, 0.000000, 0.000000);
                    }
                }
                case 
7:
                {
                    new 
VID = GetPlayerVehicleID(playerid);
                    if(
GetVehicleModel(GetPlayerVehicleID(playerid)) == 561) {
                    if(
hassiren[VID] == 1) {
                     
DestroyObject(siren[VID]);
                     }
                     
hassiren[VID] = 1; //
                    
siren[VID] = CreateObject( 19419,0,0,0,0,0,0,80 ); // <stratum>
                    
AttachObjectToVehicle(siren[VID], VID, 0.000000, -0.024999, 0.804999, 0.000000, 0.000000, 0.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] = CreateObject( 19419,0,0,0,0,0,0,80 ); // <infernus> 
                    
AttachObjectToVehicle( siren[VID], VID, 0.010000, -0.060000, 0.689999, 0.000000, 0.000000, 0.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] = CreateObject( 19419,0,0,0,0,0,0,80 ); // <infernus> 
                    
AttachObjectToVehicle( siren[VID], VID, 0.010000, -0.060000, 0.689999, 0.000000, 0.000000, 0.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: 1 Guest(s)