VH:RP Forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Hood/Trunk

2 posters

Go down

Hood/Trunk Empty Hood/Trunk

Post by Outcast Mon Aug 08, 2011 10:02 am

Simple, make a /trunk and /hood command that would open the car's trunk/hood. It's 2 minutes of scripting.
Outcast
Outcast
Developer
Developer

Posts : 254
Join date : 2011-04-25
Age : 30
Location : Croatia

Back to top Go down

Hood/Trunk Empty Re: Hood/Trunk

Post by Max Woods Mon Aug 08, 2011 11:11 am

Hmm... Seen it on other servers, pretty nice to store weapons in, will bring more RP into the server too. When someone makes car shows it would be good for showing engine with /bonnet :/, for the trunk, yea, store weapons in, cash maybe... Clothes? Anyways, /support this suggestion.
Max Woods
Max Woods
Donator
Donator

Posts : 1171
Join date : 2011-01-02
Location : Croatia, Sea Side

Back to top Go down

Hood/Trunk Empty Re: Hood/Trunk

Post by Outcast Mon Aug 08, 2011 11:47 am

Doesn't have to store anything in it. I just want to be able to open it lol Very Happy

EDIT: Here's the simple command that would do it.

Code:

CMD:trunk
{
    new engine, lights, alarm, doors, bonnet, boot, objective;
    GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
    if(boot==1) return SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, false, objective);
    else SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, true, objective);
}

CMD:hood
{
    new engine, lights, alarm, doors, bonnet, boot, objective;
    GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
    if(bonnet==1) return SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, false, boot, objective);
    else SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, true, boot, objective);
}

EDIT2: Tested it and it works.
Outcast
Outcast
Developer
Developer

Posts : 254
Join date : 2011-04-25
Age : 30
Location : Croatia

Back to top Go down

Hood/Trunk Empty Re: Hood/Trunk

Post by Outcast Mon Aug 08, 2011 2:07 pm

Okay, I made a better version of it.

Features: Openable hood and trunk of the vehicle. Automated /me message.

Usage: To open a trunk you need to be outside of the vehicle, near it and the vehicle needs to be unlocked. You open it by typing /trunk

To open a hood of the car you need to be inside of the vehicle in the driver's seat. You do it by typing /hood.

/me and error colors are a bit off, but the server scripter can change it easily.

I tested it and haven't found any bugs, but I won't guarantee 100% for it, cause I always over-look some details by accident lol.
Made as a filterscript, no includes needed.


Source: [You must be registered and logged in to see this link.]
AMX dl: [You must be registered and logged in to see this link.]
Outcast
Outcast
Developer
Developer

Posts : 254
Join date : 2011-04-25
Age : 30
Location : Croatia

Back to top Go down

Hood/Trunk Empty Re: Hood/Trunk

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum