_Xander_ Posted January 14, 2015 Share Posted January 14, 2015 Приветствую всех! Столкнулся с такой проблемой. В wiki есть простой пример использования CreateProjectile: -- 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) Скопировал данный код, запустил, все работает. Но стоило изменить миниган на м4, а ракеты на гранаты - ничего не происходит ... И второй вопрос, что означате число 200 в данном коде? Link to comment
Arisu Posted January 15, 2015 Share Posted January 15, 2015 Читайте описание функции createProjectile 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