Jump to content

[Help]With


Recommended Posts

Hello :D

I need your help

first i want to disable tank invulnerable and make it misiles go like rpg or smth like that it would be visible :)  because original is instant explode :( 

Next thing i need help is with tanks or something like that kill people fast and make it like every kill or if explosion touches two people and they die it would -25hp from tank or other if players on(glued)  or in one car when tank explodes them it will only -25hp from tank

and last thing car repair i have script but i have two problems

1.when driver types rp or repair it fixes the car but passenger gets -500 also(price for repair) or reverse 

2.i want to disable rp or repair with tanks and etc

code: 

 

function rp (thePlayer) 
     local money = getPlayerMoney ( thePlayer )     local vehicle = getPedOccupiedVehicle ( thePlayer )     if ( not vehicle ) then         outputChatBox( "Wait..You want to fix your foot?", thePlayer, 255, 0, 0, true )         return     end     if ( money >= 500 ) then         takePlayerMoney( thePlayer, 500)         fixVehicle( vehicle )         outputChatBox ( "Your Car fixed for 500$", thePlayer, 0, 255, 0, true )     else         outputChatBox ( "Too poor for repair!", thePlayer, 255, 0, 0, true )     endend addCommandHandler ("rp" , rp)

 

:/:/:/ 

Thanks xD:);):|;):)xD 

 

Edited by Dziugasc
code :/
Link to comment
1 hour ago, Dziugasc said:

1.when driver types rp or repair it fixes the car but passenger gets -500 also(price for repair) or reverse 

I am not sure if problem 1 has been resolved ..

Invalids = { [432] = true, }

function rp(player) 
	local money = getPlayerMoney ( player )     
	local vehicle = getPedOccupiedVehicle ( player )     
	if ( not vehicle ) then        
		outputChatBox( "Wait..You want to fix your foot?", player, 255, 0, 0, true )         
		return     
	elseif getElementModel(vehicle) == Invalids[getElementModel(vehicle)] then
		outputChatBox( "Wait..Your vehicle is Invalid!", player, 255, 0, 0, true )         
		return    
	end    
	if ( money >= 500 ) then        
		takePlayerMoney( player, 500)         
		fixVehicle( vehicle )        
		outputChatBox ( "Your Car fixed for 500$", player, 0, 255, 0, true )    		
	else         
		outputChatBox ( "Too poor for repair!", player, 255, 0, 0, true )     
	end
end 
addCommandHandler ("rp", rp)

 

 

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...