McQueen Posted February 25, 2012 Share Posted February 25, 2012 Кто-нибудь знает, есть ли в свободном доступе скрипт, набрав !buyfix !buynos соответственно получаешь нитро, репайр и т.д. Или как это сделать, имея user panel? Просто игроки жалуются, что неудобно, когда нужно нитро, нажимать F1 и покупать нитро. Удобнее набрать команду в чате. Так как это сделать? Link to comment
Kernell Posted February 25, 2012 Share Posted February 25, 2012 Вы вообще ниодной функции в МТА не знаете? addCommandHandler Link to comment
Kenix Posted February 25, 2012 Share Posted February 25, 2012 local t = { ['!buyfix'] = function( player ) if isElement( player ) then local veh = getPedOccupiedVehicle( player ) if veh then return fixVehicle( veh ) end end end; ['!nitro'] = function( player ) if isElement( player ) then local veh = getPedOccupiedVehicle( player ) if veh then return addVehicleUpgrade( veh,1010 ) end end end; } addEventHandler( 'onPlayerChat',root, function( msg,Type ) if Type == 0 then if msg == '!buyfix' or msg == '!nitro' then t[ msg ]( source ) cancelEvent( ) end end end ) Вы вообще ниодной функции в МТА не знаете? +1 На вики всё удобно сделано ... Найти не составит проблем. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now