Sektor Posted November 29, 2011 Share Posted November 29, 2011 Вообще не срабатывает скрипт <meta> <info author="Sektor (c) Ivanov Vitaly" description="Testing mod..." version="1" type="gamemode" /> <include resource="spawnmanager" /> <include resource="freeroam" /> <file src="icons/zx.png"/> <file src="m5.dff"/> <file src="m5.txd"/> <script src="main_s.lua"type="server"/> <script src="main_c.lua"type="client"/> </meta> main_c.lua ------------------------ function fanFunction() bindKey (source,"forwards","down", function(player,key,state) outputChatBox (getPlayerName (player) .. "#FFFF00 thinks Ransom is cool.",root,255,255,0,true) end ) end addEventHandler ("onPlayerLogin",root,fanFunction) function ReplaceObject ( ) txd = engineLoadTXD( "M5.txd" ) dff = engineLoadDFF( "M5.dff", 0 ) --modelid is everytime 0, when you replace no vehicle engineImportTXD( txd, 356 ) engineReplaceModel( dff, 356 )-- replace the model at least end addEvent ( "replaceObj", true ) addEventHandler ( "replaceObj", root, ReplaceObject ) main_s.lua function spawn(source) setPedStat(source, 24, 999.0) setPedStat(source, 21, 0.0) setPedStat(source, 23, 0.0) setPedStat(source, 27, 0.0) setPedStat(source, 165, 10) spawnPlayer(source, 0.0, 0.0, 0.0, 90.0, 1) fadeCamera(source, true) setCameraTarget(source, source) showChat(source, true) setElementPosition(source, 2316.1623, 49.6955, 26.482) --put v bomjatnik --setElementModel(player, 0) setElementFrozen(source, false) end function explosionOnSpawn(source) setPedStat(source, 22, 0) end addEventHandler ( "onClientPlayerSpawn", root, explosionOnSpawn ) addEventHandler("onPlayerJoin", root, function() spawn(source) end ) function ReplaceCommand ( ) triggerClientEvent( "replaceObj", root, replaceObj ) end addCommandHandler( "replace", ReplaceCommand ) -------------- если игрок вуриблся ---------------------- addEventHandler("onPlayerWasted", root, function() setTimer(spawn, 1800, 1, source) end ) Link to comment
LoveFist Posted November 30, 2011 Share Posted November 30, 2011 onPlayerLogin серверный ивент, onClientPlayerSpawn клиентский Link to comment
Sektor Posted November 30, 2011 Author Share Posted November 30, 2011 И этот мать его не работает!!!! function funcInput ( player, key, keyState ) local state = "let go of" if ( keyState == "down" ) then state = "pressed" end outputChatBox ( getPlayerName ( player) .. " " .. state .. " the " .. key .. " key!" ) end function bindTheKeys ( player, commandName ) bindKey ( player, "F1", "down", funcInput ) -- bind the player's F1 down key bindKey ( player, "F1", "up", funcInput ) -- bind the player's F1 up key bindKey ( player, "fire", "both", funcInput ) -- bind the player's fire down and up control end addCommandHandler ( "bindme", bindTheKeys ) хоть в клиенте хоть на сервере. Что за твою меть и твою мать. 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