Carmenu (CarSpawner)
#3

Код:
#include <a_samp>
new Menu:CarMenu;
new Menu:CarMenu2;
new Menu:CarMenu3;
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xCC0000AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA

#pragma tabsize 0
// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT

#if defined FILTERSCRIPT

public OnFilterScriptInit()

{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");

    CarMenu = CreateMenu("CarMenu", 1, 200.0, 100.0, 150.0, 150.0);

    AddMenuItem(CarMenu, 0, "Infernus");
    AddMenuItem(CarMenu, 0, "Sultan");
    AddMenuItem(CarMenu, 0, "Blade");
    AddMenuItem(CarMenu, 0, "Cheetah");
    AddMenuItem(CarMenu, 0, "Elegy");
    AddMenuItem(CarMenu, 0, "Comet");
    AddMenuItem(CarMenu, 0, "Bikes & stuff");
    AddMenuItem(CarMenu, 0, "Nrg-500");
    AddMenuItem(CarMenu, 0, "quad-bike");
    AddMenuItem(CarMenu, 0, "pcj-600");
    AddMenuItem(CarMenu, 0, "pizza-bike");
    AddMenuItem(CarMenu, 0, "Next");

CarMenu2 = CreateMenu("CarMenu", 1, 200.0, 100.0, 150.0, 150.0);
    AddMenuItem(CarMenu2, 0, "Go Kart");
    AddMenuItem(CarMenu2, 0, "Dirt Bike");
    AddMenuItem(CarMenu2, 0, "Police bike");
    AddMenuItem(CarMenu2, 0, "freeway");
    AddMenuItem(CarMenu2, 0, "Bmx");
    AddMenuItem(CarMenu2, 0, "bike");
    AddMenuItem(CarMenu2, 0, "MtBike");
    AddMenuItem(CarMenu2, 0, "Planes & Jets and Other");
    AddMenuItem(CarMenu2, 0, "Shamal");
    AddMenuItem(CarMenu2, 0, "Hydra");
    AddMenuItem(CarMenu2, 0, "Hunter");
    AddMenuItem(CarMenu2, 0, "More");
CarMenu3 = CreateMenu("CarMenu", 1, 200.0, 100.0, 150.0, 150.0);
    AddMenuItem(CarMenu3, 0, "Vortex");
    AddMenuItem(CarMenu3, 0, "Monster Truck");
    AddMenuItem(CarMenu3, 0, "Monster Truck2");
    AddMenuItem(CarMenu3, 0, "back");
		return 1;
}

public OnFilterScriptExit()
{



        return 1;
}

#else

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

#endif

public OnGameModeInit()
{


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 OnPlayerRequestSpawn(playerid)
{
        return 1;
}

public OnPlayerConnect(playerid)
{
        return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
        return 1;
}

public OnPlayerSpawn(playerid)
{

return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
        return 1;
}

public OnVehicleSpawn(vehicleid)
{
        return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
        return 1;
}

public OnPlayerText(playerid, text[])
{
        return 1;
}

public OnPlayerPrivmsg(playerid, recieverid, text[])
{
        return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])

{
if (strcmp(cmdtext, "/CarMenu",true)==0)
	{
	    if(!IsPlayerInAnyVehicle(playerid))
	    {
			ShowMenuForPlayer(CarMenu,playerid);
		}
		else
		{
			SendClientMessage(playerid,0xFFFFFFFF,"You are already in a vehicle");
		}
		return 1;


}
		if (strcmp(cmdtext, "/credits",true)==0)
	{
	SendClientMessage(playerid,COLOR_YELLOW,"**********Car Filterscript************");
	SendClientMessage(playerid,COLOR_YELLOW,"Filterscript made by Cale And Abhishek");
return 1;}

return 0;
}

public OnPlayerInfoChange(playerid)
{
        return 1;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
        return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
        return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
        return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
        return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
        return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
        return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
        return 1;
}

public OnRconCommand(cmd[])
{
        return 1;
}

public OnObjectMoved(objectid)
{
        return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
        return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
        return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
        new Menu:CurrentMenu = GetPlayerMenu(playerid);
        if(CurrentMenu == CarMenu)
        {
        switch(row)

        {


        case 0: //infernus
        {
            new Float:x, Float:y, Float:z, Float:a;
            GetPlayerFacingAngle(playerid,a);
            GetPlayerPos(playerid, x, y, z);
            new car;
            car=CreateVehicle(411,x,y,z+4,a,-1,-1,30000);
            PutPlayerInVehicle(playerid,car,0);
            SendClientMessage(playerid, 0xFFFFFFFF, "You Have Selected Infernus");

        }
        case 1: //armour
        {
            new Float:x, Float:y, Float:z, Float:a;
            GetPlayerFacingAngle(playerid,a);
            GetPlayerPos(playerid, x, y, z);
            new car;
            car=CreateVehicle(560,x,y,z+4,a,-1,-1,30000);
            PutPlayerInVehicle(playerid,car,0);
            SendClientMessage(playerid, 0xFFFFFFFF, "You Have Selected Sultan");

        }
        case 2: //heal+armour
        {
            new Float:x, Float:y, Float:z, Float:a;
            GetPlayerFacingAngle(playerid,a);
            GetPlayerPos(playerid, x, y, z);
            new car;
            car=CreateVehicle(536,x,y,z+4,a,-1,-1,30000);
            PutPlayerInVehicle(playerid,car,0);
            SendClientMessage(playerid, 0xFFFFFFFF, "You Have Selected Blade");

        }
        case 3: //healx2
        {
            new Float:x, Float:y, Float:z, Float:a;
            GetPlayerFacingAngle(playerid,a);
            GetPlayerPos(playerid, x, y, z);
            new car;
            car=CreateVehicle(415,x,y,z+4,a,-1,-1,30000);
            PutPlayerInVehicle(playerid,car,0);
            SendClientMessage(playerid, 0xFFFFFFFF, "You Have Selected Cheetah");

        }
        case 4: //armourx2
        {
            new Float:x, Float:y, Float:z, Float:a;
            GetPlayerFacingAngle(playerid,a);
            GetPlayerPos(playerid, x, y, z);
            new car;
            car=CreateVehicle(562,x,y,z+4,a,-1,-1,30000);
            PutPlayerInVehicle(playerid,car,0);
            SendClientMessage(playerid, 0xFFFFFFFF, "You Have Selected Elegy");

        }
        case 5: //M4
        {
            new Float:x, Float:y, Float:z, Float:a;
            GetPlayerFacingAngle(playerid,a);
            GetPlayerPos(playerid, x, y, z);
            new car;
            car=CreateVehicle(480,x,y,z+4,a,-1,-1,30000);
            PutPlayerInVehicle(playerid,car,0);
            SendClientMessage(playerid, 0xFFFFFFFF, "You Have Selected Comet");

        }
        case 6: //bikes
        {
        SendClientMessage(playerid,0xFFFFFFFF,"Select a Vehicle from the list");
        ShowMenuForPlayer(CarMenu,playerid);

                }
        case 7: //M4
        {
            new Float:x, Float:y, Float:z, Float:a;
            GetPlayerFacingAngle(playerid,a);
            GetPlayerPos(playerid, x, y, z);
            new car;
            car=CreateVehicle(522,x,y,z+4,a,-1,-1,30000);
            PutPlayerInVehicle(playerid,car,0);
            SendClientMessage(playerid, 0xFFFFFFFF, "You Have Selected Nrg-500");
                }

case 8: //M4
            {
            new Float:x, Float:y, Float:z, Float:a;
            GetPlayerFacingAngle(playerid,a);
            GetPlayerPos(playerid, x, y, z);
            new car;
            car=CreateVehicle(471,x,y,z+4,a,-1,-1,30000);
            PutPlayerInVehicle(playerid,car,0);
            SendClientMessage(playerid, 0xFFFFFFFF, "You Have Selected Quad_bike");



            }

            case 9: //next
            {
            new Float:x, Float:y, Float:z, Float:a;
            GetPlayerFacingAngle(playerid,a);
            GetPlayerPos(playerid, x, y, z);
            new car;
            car=CreateVehicle(461,x,y,z+4,a,-1,-1,30000);
            PutPlayerInVehicle(playerid,car,0);
            SendClientMessage(playerid, 0xFFFFFFFF, "You Have Selected pcj-600");



            }

case 10: //pcj-600
            {
            new Float:x, Float:y, Float:z, Float:a;
            GetPlayerFacingAngle(playerid,a);
            GetPlayerPos(playerid, x, y, z);
            new car;
            car=CreateVehicle(461,x,y,z+4,a,-1,-1,30000);
            PutPlayerInVehicle(playerid,car,0);
            SendClientMessage(playerid, 0xFFFFFFFF, "You Have Selected pizza bike");


                        }


case 11: //other vehicles
            {

            ShowMenuForPlayer(CarMenu2,playerid);
                        }

                        }
                        }

 if(CurrentMenu == CarMenu2)
        {
        switch(row)

        {


        case 0: //go kart
        {
            new Float:x, Float:y, Float:z, Float:a;
            GetPlayerFacingAngle(playerid,a);
            GetPlayerPos(playerid, x, y, z);
            new car;
            car=CreateVehicle(571,x,y,z+4,a,-1,-1,30000);
            PutPlayerInVehicle(playerid,car,0);
            SendClientMessage(playerid, 0xFFFFFFFF, "You Have Selected go kart");

        }
case 1: //dirt bike
        {
            new Float:x, Float:y, Float:z, Float:a;
            GetPlayerFacingAngle(playerid,a);
            GetPlayerPos(playerid, x, y, z);
            new car;
            car=CreateVehicle(468,x,y,z+4,a,-1,-1,30000);
            PutPlayerInVehicle(playerid,car,0);
            SendClientMessage(playerid, 0xFFFFFFFF, "You Have Selected a Dirt Bike");

        }

case 2: //police bike
        {
            new Float:x, Float:y, Float:z, Float:a;
            GetPlayerFacingAngle(playerid,a);
            GetPlayerPos(playerid, x, y, z);
            new car;
            car=CreateVehicle(523,x,y,z+4,a,-1,-1,30000);
            PutPlayerInVehicle(playerid,car,0);
            SendClientMessage(playerid, 0xFFFFFFFF, "You Have Selected a Police Bike");

        }
case 3:
        {
            new Float:x, Float:y, Float:z, Float:a;
            GetPlayerFacingAngle(playerid,a);
            GetPlayerPos(playerid, x, y, z);
            new car;
            car=CreateVehicle(463,x,y,z+4,a,-1,-1,30000);
            PutPlayerInVehicle(playerid,car,0);
            SendClientMessage(playerid, 0xFFFFFFFF, "You Have Selected a freeway");

        }
case 4:
        {
            new Float:x, Float:y, Float:z, Float:a;
            GetPlayerFacingAngle(playerid,a);
            GetPlayerPos(playerid, x, y, z);
            new car;
            car=CreateVehicle(481,x,y,z+4,a,-1,-1,30000);
            PutPlayerInVehicle(playerid,car,0);
            SendClientMessage(playerid, 0xFFFFFFFF, "You Have Selected a BMX bycicle");

        }
case 5:
        {
            new Float:x, Float:y, Float:z, Float:a;
            GetPlayerFacingAngle(playerid,a);
            GetPlayerPos(playerid, x, y, z);
            new car;
            car=CreateVehicle(509,x,y,z+4,a,-1,-1,30000);
            PutPlayerInVehicle(playerid,car,0);
            SendClientMessage(playerid, 0xFFFFFFFF, "You Have Selected a normal bycicle");

        }
case 6:
        {
            new Float:x, Float:y, Float:z, Float:a;
            GetPlayerFacingAngle(playerid,a);
            GetPlayerPos(playerid, x, y, z);
            new car;
            car=CreateVehicle(510,x,y,z+4,a,-1,-1,30000);
            PutPlayerInVehicle(playerid,car,0);
            SendClientMessage(playerid, 0xFFFFFFFF, "You Have Selected a Mountain Bike");

        }
case 7: // Planes Jets etc
        {
SendClientMessage(playerid,0xFFFFFFFF,"Please Select a Vehicle from the menu");

        }
case 8:
        {
            new Float:x, Float:y, Float:z, Float:a;
            GetPlayerFacingAngle(playerid,a);
            GetPlayerPos(playerid, x, y, z);
            new car;
            car=CreateVehicle(519,x,y,z+4,a,-1,-1,30000);
            PutPlayerInVehicle(playerid,car,0);
            SendClientMessage(playerid, 0xFFFFFFFF, "You Have Selected a Shamal");

        }
case 9:
        {
            new Float:x, Float:y, Float:z, Float:a;
            GetPlayerFacingAngle(playerid,a);
            GetPlayerPos(playerid, x, y, z);
            new car;
            car=CreateVehicle(520,x,y,z+4,a,-1,-1,30000);
            PutPlayerInVehicle(playerid,car,0);
            SendClientMessage(playerid, 0xFFFFFFFF, "You Have Selected a Hydra");

        }
case 10:
        {
            new Float:x, Float:y, Float:z, Float:a;
            GetPlayerFacingAngle(playerid,a);
            GetPlayerPos(playerid, x, y, z);
            new car;
            car=CreateVehicle(425,x,y,z+4,a,-1,-1,30000);
            PutPlayerInVehicle(playerid,car,0);
            SendClientMessage(playerid, 0xFFFFFFFF, "You Have Selected a Hunter");

        }
case 11:
        {
ShowMenuForPlayer(CarMenu3,playerid);
                }
                }
        }
if(CurrentMenu == CarMenu3)
        {
        switch(row)

        {


        case 0:
        {
            new Float:x, Float:y, Float:z, Float:a;
            GetPlayerFacingAngle(playerid,a);
            GetPlayerPos(playerid, x, y, z);
            new car;
            car=CreateVehicle(539,x,y,z+4,a,-1,-1,30000);
            PutPlayerInVehicle(playerid,car,0);
            SendClientMessage(playerid, 0xFFFFFFFF, "You Have Selected Vortex");

        }
case 1:
        {
            new Float:x, Float:y, Float:z, Float:a;
            GetPlayerFacingAngle(playerid,a);
            GetPlayerPos(playerid, x, y, z);
            new car;
            car=CreateVehicle(444,x,y,z+4,a,-1,-1,30000);
            PutPlayerInVehicle(playerid,car,0);
            SendClientMessage(playerid, 0xFFFFFFFF, "You Have Selected Monster Truck");

        }
case 2:
        {
            new Float:x, Float:y, Float:z, Float:a;
            GetPlayerFacingAngle(playerid,a);
            GetPlayerPos(playerid, x, y, z);
            new car;
            car=CreateVehicle(556,x,y,z+4,a,-1,-1,30000);
            PutPlayerInVehicle(playerid,car,0);
            SendClientMessage(playerid, 0xFFFFFFFF, "You Have Selected Monster Truck No.2");

        }
case 3:
        {
         ShowMenuForPlayer(CarMenu2,playerid);
         }
		 }
         }
                    return 1;
         }

public OnPlayerExitedMenu(playerid)
{
        return 1;
}
Reply


Messages In This Thread
Carmenu (CarSpawner) - by bulgarianmaniacs - 17.06.2011, 21:41
Re: Carmenu (CarSpawner) - by Calgon - 17.06.2011, 21:58
Re: Carmenu (CarSpawner) - by bulgarianmaniacs - 17.06.2011, 22:13
Re: Carmenu (CarSpawner) - by nickbouwhuis - 18.10.2012, 12:08
Re: Carmenu (CarSpawner) - by Roel - 18.10.2012, 12:13
Re: Carmenu (CarSpawner) - by mamorunl - 18.10.2012, 12:28
Re: Carmenu (CarSpawner) - by nickbouwhuis - 18.10.2012, 13:22
Re: Carmenu (CarSpawner) - by nickbouwhuis - 19.10.2012, 10:37
Re: Carmenu (CarSpawner) - by (SWE)Gold - 19.10.2012, 14:19
Re: Carmenu (CarSpawner) - by nickbouwhuis - 19.10.2012, 14:38

Forum Jump:


Users browsing this thread: 2 Guest(s)