open/close hood and trunk
#1

Hi guys I am looking for a command for /hood and /trunk. It would be this.

Hood - Open/Close

Trunk - Open/Close

So when I use hood it will open and when use hood again it will close same with trunk.

Waiting for you reply. Big Thanks!
Reply
#2

There's stocks in the sa-mp includes for such a thing this isn't the script request thread.

But here. Hope its some use http://pastebin.com/qxQbz46a

Credits to whoever it was. I forgot who.
Reply
#3

here's a /trunk cmd I use
Код:
if(strcmp(cmd, "/trunk", true) == 0)
	{
	    new counter = 0;
	    new vid;
	    new check = 0;
	    for(new i = 0; i < MAX_VEHICLES; i++)
	    {
	        new dist = CheckPlayerDistanceToVehicle(4, playerid, i);
	        if(dist)
	        {
	            vid = i;
	            counter++;
	        }
	    }
	    switch(counter)
	    {
	        case 0:
	        {
	            SendClientMessage(playerid, COLOR_GREY, "No cars with trunk near you");
	        }

	        case 1:
	        {
	            for(new i = 0; i < sizeof(CreatedCars); i++)
				{
					if(CreatedCars[i] == vid)
					{
					    check = 1;
					    CreatedCars[i] = INVALID_VEHICLE_ID;
					    break;
					}
				}
	   			if(check == 1)
		        {
	               	SendClientMessage(playerid, COLOR_RED, "This vehicle trunk is not available");
	   				return 1;
	   			}
				if(IsAPlane(vid) || IsABike(vid) || IsAHelicopter(vid) || IsATrain(vid) || IsABoat(vid) || IsABus(vid) || GetVehicleModel(GetPlayerVehicleID(vid)) == 523)
       			{
       			    SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a trunk");
       			    return 1;
       			}
				ShowPlayerDialog(playerid,TRUNKDIALOG,DIALOG_STYLE_LIST,"Trunk","Open / Close\nCheck\nPut stuff\nTake stuff","Ok","Cancel"); //Trunk
				return 1;
	        }

	        default:
	        {
	            SendClientMessage(playerid, COLOR_GREY, "Found more then one car in range");
	            return 1;
	        }
	    }
	}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)