[FilterScript] Tuning System
#1

I decided to release a tuning system, made from scratch by sampplayer12. Enjoy


PasteBin: http://pastebin.com/jSguXSGy
Reply
#2

It's pretty simple and could be improved since it's better practice to use switch and handle it that way rather than using an if statement each time:
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 30000)
    {
        if(response)
        {
            switch(listitem)
            {
                case 0: {
                    AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
                    SendClientMessage(playerid,0xFF0606FF,"You Have Added 10x Nos Onto Your Vehicle");
                }
                case 1: {
                    AddVehicleComponent(GetPlayerVehicleID(playerid), 1079);
                    SendClientMessage(playerid,0xFF0606FF,"You Have Added Cutter Rims Onto Your Vehicle");
                }
                case 2: {
                    AddVehicleComponent(GetPlayerVehicleID(playerid), 1080);
                    SendClientMessage(playerid,0xFF0606FF,"You Have Added Golden Rims Onto Your Vehicle");
                }
                case 3: {
                    AddVehicleComponent(GetPlayerVehicleID(playerid), 1087);
                    SendClientMessage(playerid,0xFF0606FF,"You Have Added Hydraulics Onto Your Vehicle");
                }
            }
        }
        return 1;
    }
 
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)