Jump to content

Second Rhino


Xwad

Recommended Posts

What do you mean by second rhino? if you mean to replace the model(look) of a other vehicle to a rhino then it's possible with the following functions,

engineLoadTXD 
engineImportTXD 
engineLoadDFF 
engineReplaceModel 

Rhino model is 432

If you mean to create a vehicle which can damage/shot like a rhino then use,

createProjectile 

Link to comment

No i dont want skins i just want to make one more tank:D yeah demage/shoot like a rhino!:D

createprojectile?need i copy the example?:D this?

-- This function gets triggered everytime player shoots.

function onClientPlayerWeaponFireFunc(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement)

if weapon == 38 then -- if source is a local player and he uses minigun...

x,y,z = getElementPosition(getLocalPlayer())

if not createProjectile(getLocalPlayer(),19,x,y,z,200) then -- then we either create a projectile...

outputChatBox ( "Rocket minigun overheated! Give it a rest pal!", source ) -- or if projectile limit is reached we output player a chat message

end

end

end

-- Don't forget to add the onClientPlayerWeaponFireFunc function as a handler for onClientPlayerWeaponFire.

addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), onClientPlayerWeaponFireFunc)

Link to comment
bindKey 
getPedOccupiedVehicle  
getElementModel 
getElementPosition 
createProjectile 
setTimer  

I guess you'll need to use the following functions to create it, i never tried to create this so if i'm wrong someone correct me please. Or seach on forum or community for "shooter" ,idk.

Link to comment

Scripting isn't a work of copy-pasting. The tutorials on wiki are pretty clear though. But if you desire to just copy, here is the suggestion given:

you sad not copy and pase xD here it tells me to copy and paste xD

Note that in the tag above, the .lua file is not under another directory. Therefore we'll create the file in the same folder as meta.xml. Now you can copy and paste the following code into script.lua:

Link to comment

Xwad I understand your problem, I also agree on improving the introduction to scripting with more explanation about the types like variable, etc. But apart from that I've occured the same problem and would like to give you some basics of scripting in my spare time. Add me on my scripting skype; viruzgamiing or PM me.

Regards Viruz

Link to comment
  • 2 weeks later...
  • 1 month later...

Just replace SWAT tank with your tank and include this vehicle in my vreload community resource, shouldn't be too hard. I have currently no time left to do this myself but there is not much more to do than this:

if veh == 432 then

Change to

if veh == 432 or veh == 601 then

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...