Cant to use Scpirt with...
#1

Hey i have something with my server
i cannot to use commands with those Console :
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
like at this script :
Quote:

// This is a comment
// uncomment the line below if you want to write a filterscript
//Wheels and Spoilers By DexToxz
//#define FILTERSCRIPT

#include <a_samp>
#define COLOR_DARKORANGE 0xFF3F00AA
#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Spoilers and Wheels By DexToxz");
print("--------------------------------------\n");
return 1;
}

public OnFilterScriptExit()
{
return 1;
}

#else

main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("Drift/Race/Stunt/Drag");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}

public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/toys", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid,1223,DIALOG_STYLE_LIST," Car Things By : DexToxz","Spoilers\nWheels","Ok", "Cancel");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new vehicleid;
vehicleid = GetPlayerVehicleID(playerid);
switch(dialogid)
{
case 1223:
{
if(!response)
{
SendClientMessage(playerid, 0xFF0000FF, "You cancelled.");
return 1;
}
switch(listitem)
{
case 0:
{
if(GetVehicleModel(vehicleid) == 562||565||559||560||558||561)
{
ShowPlayerDialog(playerid,1226,DIALOG_STYLE_LIST," Spoilers","Just Click here","Ok", "Cancel");
}
else
{
SendClientMessage(playerid,COLOR_DARKORANGE,"You have to be in a Tuner");
}
}
case 1:
{
ShowPlayerDialog(playerid,1225,DIALOG_STYLE_LIST," Wheels","Wheels","Ok", "Cancel");
}
}
}
case 1226:
{
if(!response)
{
SendClientMessage(playerid, 0xFF0000FF, "You cancelled.");
return 1;
}
switch(listitem)
{
case 0:
{

if(IsTuner(GetVehicleModel(vehicleid)))
{
ShowPlayerDialog(playerid,1240,DIALOG_STYLE_LIST," Spoilers","Spoiler Pro\nSpoiler Win\nSpoiler Drag\nSpoiler Alpha\nSpoiler Race\nSpoiler Worx","Ok", "Cancel");
return 1;
}
else
{
SendClientMessage(playerid,COLOR_DARKORANGE,"You have to be in a Tuner");
}
}
}
}
case 1227:
{
if(!response)
{
SendClientMessage(playerid, 0xFF0000FF, "You cancelled.");
return 1;
}
switch(listitem)
{
case 0:
{
ShowPlayerDialog(playerid,1246,DIALOG_STYLE_LIST," Rims","Ahab\nVirtual\nAccess\nShadow\nMega\nRimshi ne\nWires\nClassic\nTwist\nCutter\nSwitch\nGrove\n Import\nDollar\nTrance\nAtomic","Ok", "Cancel");
}
case 1:
{
ShowPlayerDialog(playerid,1247,DIALOG_STYLE_LIST," Extra","Bas Boost\nHydraulics\nNitro x2\nNitro x5\nNitro x10","Ok", "Cancel");
}
}
}
case 1240:
{
if(!response)
{
SendClientMessage(playerid, 0xFF0000FF, "You cancelled.");
return 1;
}

switch(listitem)
{
case 0:
{
if(GetVehicleModel(vehicleid) >=1)
{
AddVehicleComponent(vehicleid, 1000);
GivePlayerMoney(playerid,-800);
SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added");
}
else
{
SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
}
}
case 1:
{
if(GetVehicleModel(vehicleid) >=1)
{
AddVehicleComponent(vehicleid, 1001);
GivePlayerMoney(playerid,-800);
SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added");
}
else
{
SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
}
}
case 2:
{
new vehicle;
vehicle = GetPlayerVehicleID(playerid);
if(GetVehicleModel(vehicleid) >=1)
{
AddVehicleComponent(vehicle, 1002);
GivePlayerMoney(playerid,-800);
SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added");
}
else
{
SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
}
}
case 3:
{
new vehicle;
vehicle = GetPlayerVehicleID(playerid);
if(GetVehicleModel(vehicleid) >=1)
{
AddVehicleComponent(vehicle, 1003);
GivePlayerMoney(playerid,-800);
SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added");
}
else
{
SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
}
}
case 4:
{
new vehicle;
vehicle = GetPlayerVehicleID(playerid);
if(GetVehicleModel(vehicleid) >=1)
{
AddVehicleComponent(vehicle, 1015);
GivePlayerMoney(playerid,-800);
SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added");
}
else
{
SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
}
}
case 5:
{
new vehicle;
vehicle = GetPlayerVehicleID(playerid);
if(GetVehicleModel(vehicleid) >=1)
{
AddVehicleComponent(vehicle, 1016);
GivePlayerMoney(playerid,-800);
SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added");
}
else
{
SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
}
}
}
}
case 1246:
{
if(!response)
{
SendClientMessage(playerid, 0xFF0000FF, "You cancelled.");
return 1;
}

switch(listitem)
{
case 0:
{
if(GetVehicleModel(vehicleid) >=1)
{
AddVehicleComponent(vehicleid, 1096);
GivePlayerMoney(playerid,-800);
SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added");
}
else
{
SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
}
}
case 1:
{
if(GetVehicleModel(vehicleid) >=1)
{
AddVehicleComponent(vehicleid, 1097);
GivePlayerMoney(playerid,-800);
SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added");
}
else
{
SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
}
}
case 2:
{
if(GetVehicleModel(vehicleid) >=1)
{
AddVehicleComponent(vehicleid, 109;
GivePlayerMoney(playerid,-800);
SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added");
}
else
{
SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
}
}
case 3:
{
if(GetVehicleModel(vehicleid) >=1)
{
AddVehicleComponent(vehicleid, 1073);
GivePlayerMoney(playerid,-800);
SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added");
}
else
{
SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
}
}
case 4:
{
if(GetVehicleModel(vehicleid) >=1)
{
AddVehicleComponent(vehicleid, 1074);
GivePlayerMoney(playerid,-800);
SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added");
}
else
{
SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
}
}
case 5:
{
if(GetVehicleModel(vehicleid) >=1)
{
AddVehicleComponent(vehicleid, 1075);
GivePlayerMoney(playerid,-800);
SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added");
}
else
{
SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
}
}
case 6:
{
if(GetVehicleModel(vehicleid) >=1)
{
AddVehicleComponent(vehicleid, 1076);
GivePlayerMoney(playerid,-800);
SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added");
}
else
{
SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
}
}
case 7:
{
if(GetVehicleModel(vehicleid) >=1)
{
AddVehicleComponent(vehicleid, 1077);
GivePlayerMoney(playerid,-800);
SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added");
}
else
{
SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
}
}
case 8:
{
if(GetVehicleModel(vehicleid) >=1)
{
AddVehicleComponent(vehicleid, 107;
GivePlayerMoney(playerid,-800);
SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added");
}
else
{
SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
}
}
case 9:
{
if(GetVehicleModel(vehicleid) >=1)
{
AddVehicleComponent(vehicleid, 1079);
GivePlayerMoney(playerid,-800);
SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added");
}
else
{
SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
}
}
case 10:
{
if(GetVehicleModel(vehicleid) >=1)
{
AddVehicleComponent(vehicleid, 1080);
GivePlayerMoney(playerid,-800);
SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added");
}
else
{
SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
}
}
case 11:
{
if(GetVehicleModel(vehicleid) >=1)
{
AddVehicleComponent(vehicleid, 1081);
GivePlayerMoney(playerid,-800);
SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added");
}
else
{
SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
}
}
case 12:
{
if(GetVehicleModel(vehicleid) >=1)
{
AddVehicleComponent(vehicleid, 1082);
GivePlayerMoney(playerid,-800);
SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added");
}
else
{
SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
}
}
case 13:
{
if(GetVehicleModel(vehicleid) >=1)
{
AddVehicleComponent(vehicleid, 1083);
GivePlayerMoney(playerid,-800);
SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added");
}
else
{
SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
}
}
case 14:
{
if(GetVehicleModel(vehicleid) >=1)
{
AddVehicleComponent(vehicleid, 1084);
GivePlayerMoney(playerid,-800);
SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added");
}
else
{
SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
}
}
case 15:
{
if(GetVehicleModel(vehicleid) >=1)
{
AddVehicleComponent(vehicleid, 1085);
GivePlayerMoney(playerid,-800);
SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added");
}
else
{
SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
}
}
}
}
}
return 0;
}
stock IsTuner(modelid)
{
switch(modelid)
{
case 562, 565, 559,
560, 558, 561: return true;
}
return false;
}

i can only to see the First Dialog i chose a option and the dialog is closed an nothing happends :/
Reply
#2

pawn Код:
//#define FILTERSCRIPT

#include <a_samp>
#define COLOR_DARKORANGE 0xFF3F00AA
#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Spoilers and Wheels By DexToxz");
print("--------------------------------------\n");
return 1;
}

public OnFilterScriptExit()
{
return 1;
}

#else

main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("Drift/Race/Stunt/Drag");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}

public OnGameModeExit()
{
return 1;
}
First, you should consider whether you are creating FS or GM. Need to remove unnecessary.

//EDIT:
The code is not laid, but at first glance, I see this error:
pawn Код:
if(GetVehicleModel(vehicleid) == 562||565||559||560||558||561)
In my opinion, ID models should be in brackets
pawn Код:
if(GetVehicleModel(vehicleid) == (562 || 565 || 559 || 560 || 558 || 561))
Reply
#3

i tryed this already its didnt changed :/
Reply
#4

And you checked whether the given ID to agree?
Reply
#5

yeah :/
Reply
#6

Perhaps the mistake buckle. Try to arrange the code and just come out
Reply
#7

pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//Wheels and Spoilers By DexToxz
//#define FILTERSCRIPT

#include <a_samp>

#define COLOR_DARKORANGE 0xFF3F00AA

#if defined FILTERSCRIPT

#else

main()
{
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
}

#endif


public OnGameModeInit()
{
    // Don't use these lines if it's a filterscript
    SetGameModeText("Drift/Race/Stunt/Drag");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
   
    return 1;
}

public OnGameModeExit()
{
    return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/toys", cmdtext, true, 10) == 0)
    {
        ShowPlayerDialog(playerid,1223,DIALOG_STYLE_LIST," Car Things By : DexToxz","Spoilers\nWheels","Ok", "Cancel");
        return 1;
    }
    return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    new vehicleid;
    vehicleid = GetPlayerVehicleID(playerid);
    switch(dialogid)
    {
        case 1223:
        {
            if(!response)
            {
                SendClientMessage(playerid, 0xFF0000FF, "You cancelled.");
                return 1;
            }
            switch(listitem)
            {
                case 0:
                {
                    if(GetVehicleModel(vehicleid) == 562 || 565 || 559 || 560 || 558 || 561)
                    {
                        ShowPlayerDialog(playerid,1226,DIALOG_STYLE_LIST," Spoilers","Just Click here","Ok", "Cancel");
                        return 1;
                    }
                    else
                    {
                        SendClientMessage(playerid,COLOR_DARKORANGE,"You have to be in a Tuner");
                        return 1;
                    }
                }
                case 1:
                {
                    ShowPlayerDialog(playerid,1225,DIALOG_STYLE_LIST," Wheels","Wheels","Ok", "Cancel");
                    return 1;
                }
            }
        }
        case 1226:
        {
            if(!response)
            {
                SendClientMessage(playerid, 0xFF0000FF, "You cancelled.");
                return 1;
            }
            switch(listitem)
            {
                case 0:
                {
                    if(IsTuner(GetVehicleModel(vehicleid)))
                    {
                        ShowPlayerDialog(playerid,1240,DIALOG_STYLE_LIST," Spoilers","Spoiler Pro\nSpoiler Win\nSpoiler Drag\nSpoiler Alpha\nSpoiler Race\nSpoiler Worx","Ok", "Cancel");
                        return 1;
                    }
                    else
                    {
                        SendClientMessage(playerid,COLOR_DARKORANGE,"You have to be in a Tuner");
                        return 1;
                    }
                }
            }
        }
        case 1227:
        {
            if(!response)
            {
                SendClientMessage(playerid, 0xFF0000FF, "You canceled.");
                return 1;
            }
            switch(listitem)
            {
                case 0:
                {
                    ShowPlayerDialog(playerid,1246,DIALOG_STYLE_LIST," Rims","Ahab\nVirtual\nAccess\nShadow\nMega\nRimshi ne\nWires\nClassic\nTwist\nCutter\nSwitch\nGrove\n Import\nDollar\nTrance\nAtomic","Ok", "Cancel");
                    return 1;
                }
                case 1:
                {
                    ShowPlayerDialog(playerid,1247,DIALOG_STYLE_LIST," Extra","Bas Boost\nHydraulics\nNitro x2\nNitro x5\nNitro x10","Ok", "Cancel");
                    return 1;
                }
            }
        }
        case 1240:
        {
            if(!response)
            {
                SendClientMessage(playerid, 0xFF0000FF, "You cancelled.");
                return 1;
            }
            switch(listitem)
            {
                case 0:
                {
                    if(GetVehicleModel(vehicleid) >=1)
                    {
                        AddVehicleComponent(vehicleid, 1000);
                        GivePlayerMoney(playerid,-800);
                        SendClientMessage(playerid,COLOR_DARKORANGE,"Vehicle Component added");
                        return 1;
                    }
                    else
                    {
                        SendClientMessage(playerid,COLOR_DARKORANGE,"Thisis not an Vehicle");
                        return 1;
                    }
                }
                case 1:
                {
                    if(GetVehicleModel(vehicleid) >=1)
                    {
                        AddVehicleComponent(vehicleid, 1001);
                        GivePlayerMoney(playerid,-800);
                        SendClientMessage(playerid,COLOR_DARKORANGE,"Vehicle Component added");
                        return 1;
                    }
                    else
                    {
                        SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
                        return 1;
                    }
                }
                case 2:
                {
                    new vehicle;
                    vehicle = GetPlayerVehicleID(playerid);
                    if(GetVehicleModel(vehicleid) >=1)
                    {
                        AddVehicleComponent(vehicle, 1002);
                        GivePlayerMoney(playerid,-800);
                        SendClientMessage(playerid,COLOR_DARKORANGE,"Vehicle Component added");
                        return 1;
                    }
                    else
                    {
                        SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
                        return 1;
                    }
                }
                case 3:
                {
                    new vehicle;
                    vehicle = GetPlayerVehicleID(playerid);
                    if(GetVehicleModel(vehicleid) >=1)
                    {
                        AddVehicleComponent(vehicle, 1003);
                        GivePlayerMoney(playerid,-800);
                        SendClientMessage(playerid,COLOR_DARKORANGE,"Vehicle Component added");
                        return 1;
                    }
                    else
                    {
                        SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
                        return 1;
                    }
                }
                case 4:
                {
                    new vehicle;
                    vehicle = GetPlayerVehicleID(playerid);
                    if(GetVehicleModel(vehicleid) >=1)
                    {
                        AddVehicleComponent(vehicle, 1015);
                        GivePlayerMoney(playerid,-800);
                        SendClientMessage(playerid,COLOR_DARKORANGE,"Vehicle Component added");
                        return 1;
                    }
                    else
                    {
                        SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
                        return 1;
                    }
                }
                case 5:
                {
                    new vehicle;
                    vehicle = GetPlayerVehicleID(playerid);
                    if(GetVehicleModel(vehicleid) >=1)
                    {
                        AddVehicleComponent(vehicle, 1016);
                        GivePlayerMoney(playerid,-800);
                        SendClientMessage(playerid,COLOR_DARKORANGE,"Vehicle Component added");
                        return 1;
                    }
                    else
                    {
                        SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
                        return 1;
                    }
                }
            }
        }
        case 1246:
        {
            if(!response)
            {
                SendClientMessage(playerid, 0xFF0000FF, "You cancelled.");
                return 1;
            }
            switch(listitem)
            {
                case 0:
                {
                    if(GetVehicleModel(vehicleid) >=1)
                    {
                        AddVehicleComponent(vehicleid, 1096);
                        GivePlayerMoney(playerid,-800);
                        SendClientMessage(playerid,COLOR_DARKORANGE,"Vehicle Component added");
                        return 1;
                    }
                    else
                    {
                        SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
                        return 1;
                    }
                }
                case 1:
                {
                    if(GetVehicleModel(vehicleid) >=1)
                    {
                        AddVehicleComponent(vehicleid, 1097);
                        GivePlayerMoney(playerid,-800);
                        SendClientMessage(playerid,COLOR_DARKORANGE,"Vehicle Component added");
                        return 1;
                    }
                    else
                    {
                        SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
                        return 1;
                    }
                }
                case 2:
                {
                    if(GetVehicleModel(vehicleid) >=1)
                    {
                        AddVehicleComponent(vehicleid, 109);
                        GivePlayerMoney(playerid,-800);
                        SendClientMessage(playerid,COLOR_DARKORANGE,"Vehicle Component added");
                        return 1;
                    }
                    else
                    {
                        SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
                        return 1;
                    }
                }
                case 3:
                {
                    if(GetVehicleModel(vehicleid) >=1)
                    {
                        AddVehicleComponent(vehicleid, 1073);
                        GivePlayerMoney(playerid,-800);
                        SendClientMessage(playerid,COLOR_DARKORANGE,"Vehicle Component added");
                        return 1;
                    }
                    else
                    {
                        SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
                        return 1;
                    }
                }
                case 4:
                {
                    if(GetVehicleModel(vehicleid) >=1)
                    {
                        AddVehicleComponent(vehicleid, 1074);
                        GivePlayerMoney(playerid,-800);
                        SendClientMessage(playerid,COLOR_DARKORANGE,"Vehicle Component added");
                        return 1;
                    }
                    else
                    {
                        SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
                        return 1;
                    }
                }
                case 5:
                {
                    if(GetVehicleModel(vehicleid) >=1)
                    {
                        AddVehicleComponent(vehicleid, 1075);
                        GivePlayerMoney(playerid,-800);
                        SendClientMessage(playerid,COLOR_DARKORANGE,"Vehicle Component added");
                        return 1;
                    }
                    else
                    {
                        SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
                        return 1;
                    }
                }
                case 6:
                {
                    if(GetVehicleModel(vehicleid) >=1)
                    {
                        AddVehicleComponent(vehicleid, 1076);
                        GivePlayerMoney(playerid,-800);
                        SendClientMessage(playerid,COLOR_DARKORANGE,"Vehicle Component added");
                        return 1;
                    }
                    else
                    {
                        SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
                        return 1;
                    }
                }
                case 7:
                {
                    if(GetVehicleModel(vehicleid) >=1)
                    {
                        AddVehicleComponent(vehicleid, 1077);
                        GivePlayerMoney(playerid,-800);
                        SendClientMessage(playerid,COLOR_DARKORANGE,"Vehicle Component added");
                        return 1;
                    }
                    else
                    {
                        SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
                        return 1;
                    }
                }
                case 8:
                {
                    if(GetVehicleModel(vehicleid) >=1)
                    {
                        AddVehicleComponent(vehicleid, 107);
                        GivePlayerMoney(playerid,-800);
                        SendClientMessage(playerid,COLOR_DARKORANGE,"Vehicle Component added");
                        return 1;
                    }
                    else
                    {
                        SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
                        return 1;
                    }
                }
                case 9:
                {
                    if(GetVehicleModel(vehicleid) >=1)
                    {
                        AddVehicleComponent(vehicleid, 1079);
                        GivePlayerMoney(playerid,-800);
                        SendClientMessage(playerid,COLOR_DARKORANGE,"Vehicle Component added");
                        return 1;
                    }
                    else
                    {
                        SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
                        return 1;
                    }
                }
                case 10:
                {
                    if(GetVehicleModel(vehicleid) >=1)
                    {
                        AddVehicleComponent(vehicleid, 1080);
                        GivePlayerMoney(playerid,-800);
                        SendClientMessage(playerid,COLOR_DARKORANGE,"Vehicle Component added");
                        return 1;
                    }
                    else
                    {
                        SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
                        return 1;
                    }
                }
                case 11:
                {
                    if(GetVehicleModel(vehicleid) >=1)
                    {
                        AddVehicleComponent(vehicleid, 1081);
                        GivePlayerMoney(playerid,-800);
                        SendClientMessage(playerid,COLOR_DARKORANGE,"Vehicle Component added");
                        return 1;
                    }
                    else
                    {
                        SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
                        return 1;
                    }
                }
                case 12:
                {
                    if(GetVehicleModel(vehicleid) >=1)
                    {
                        AddVehicleComponent(vehicleid, 1082);
                        GivePlayerMoney(playerid,-800);
                        SendClientMessage(playerid,COLOR_DARKORANGE,"Vehicle Component added");
                        return 1;
                    }
                    else
                    {
                        SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
                        return 1;
                    }
                }
                case 13:
                {
                    if(GetVehicleModel(vehicleid) >=1)
                    {
                        AddVehicleComponent(vehicleid, 1083);
                        GivePlayerMoney(playerid,-800);
                        SendClientMessage(playerid,COLOR_DARKORANGE,"Vehicle Component added");
                        return 1;
                    }
                    else
                    {
                        SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
                        return 1;
                    }
                }
                case 14:
                {
                    if(GetVehicleModel(vehicleid) >=1)
                    {
                        AddVehicleComponent(vehicleid, 1084);
                        GivePlayerMoney(playerid,-800);
                        SendClientMessage(playerid,COLOR_DARKORANGE,"Vehicle Component added");
                        return 1;
                    }
                    else
                    {
                        SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
                        return 1;
                    }
                }
                case 15:
                {
                    if(GetVehicleModel(vehicleid) >=1)
                    {
                        AddVehicleComponent(vehicleid, 1085);
                        GivePlayerMoney(playerid,-800);
                        SendClientMessage(playerid,COLOR_DARKORANGE,"Vehicle Component added");
                        return 1;
                    }
                    else
                    {
                        SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle");
                        return 1;
                    }
                }
            }
        }
    }
    return 0;
}


stock IsTuner(modelid)
{
    switch(modelid)
    {
        case 562, 565, 559,
        560, 558, 561: return true;
    }
    return false;
}
Went through the whole script and fixed everything. And you understand that the dialogs only work with these vehicle models: 562 || 565 || 559 || 560 || 558 || 561 ?

https://sampwiki.blast.hk/wiki/Vehicle_Model_ID_List
Reply
#8

pawn Код:
if(GetVehicleModel(vehicleid) == 562 || 565 || 559 || 560 || 558 || 561)
pawn Код:
new model = GetVehicleModel(vehicleid);
if(model == 562 || model == 565 || model == 559 || model == 560 || model == 558 || model == 561)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)