-
Posts
4,121 -
Joined
-
Last visited
-
Days Won
2
Everything posted by Kenix
-
What you mean? You mean this https://wiki.multitheftauto.com/wiki/OnClientGUIChanged ?
-
Yes. Maybe I did not see any errors. Only this.
-
Same incorrect. Read all. local spam = false local Money = getPlayerMoney(source) -- source use only in event ( NOT OUTSIDE ) local reward = math.random(10,100) GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(470,264,608,378,"Money_System By Dev-PoinT",false) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Image[1] = guiCreateStaticImage(219,20,116,124,"images/money.png",false,GUIEditor_Window[1]) GUIEditor_Image[2] = guiCreateStaticImage(37,238,129,91,"images/yes.png",false,GUIEditor_Window[1]) GUIEditor_Image[3] = guiCreateStaticImage(421,247,129,79,"images/no.png",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(41,339,196,18,"Yes To Show Your Money",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,0) guiSetFont(GUIEditor_Label[1],"clear-normal") GUIEditor_Label[2] = guiCreateLabel(410,340,158,15,"No To Hide The Window",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[2],255,0,0) guiSetFont(GUIEditor_Label[2],"clear-normal") GUIEditor_Button[1] = guiCreateButton(195,174,173,36,"Give Me Money",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Button[1],"clear-normal") addEventHandler('onClientGUIClick',root, function() if source == GUIEditor_Image[2] then if spam then outputChatBox("You have to wait 30 sec",255,0,0) return end local sound = playSound("sounds/cash.mp3") setSoundVolume(sound, 0.5) triggerServerEvent ("showMoney", localPlayer) spam = true setTimer(function() spam = false end,30000,1) elseif source == GUIEditor_Image[3] then guiSetVisible(GUIEditor_Window[1],false) end end ) -- you should add false to argument addEventHandler ( getPropagated = false ) addEventHandler('onClientGUIClick',root, function() if source == GUIEditor_Button[1] then givePlayerMoney(source,reward) -- you give money button ? end end ) -- some viewtopic.php?f=91&t=40807 viewtopic.php?f=91&t=39678 Tabulate code!
-
Client bindKey( 'F7', 'down', function( ) if isPedInVehicle( localPlayer ) then local uVehicle = getPedOccupiedVehicle( localPlayer ) if uVehicle then fixVehicle( uVehicle ) end end end ) You not define function. Syntax error function bindTheKeys -- You forgot ( ) bindKey("F7","down",fix) end addEventHandler("onClientResourceStart", resourceRoot, bindTheKeys) function fix -- You forgot ( ) local theVehicle = getPedOccupiedVehicle( localPlayer ) fixVehicle(theVehicle) end addEvent("fix",true) addEventHandler("fix",resourceRoot,fix)
-
viewtopic.php?f=91&t=40807
-
You lol i said you convert scripts to UTF-without BOM you not listen me:/ http://www.mediafire.com/?dzeela68z3t9zab I tested race working.
-
Can you upload full resource please?
-
Forgot cut and paste checkModels table in client .... Probably, because I want to sleep. Try again . Updated.
-
Updated. My bad Not changed event name, when writing code.
-
Download notepad++ Install. Open your code. Select tab Encode. Select convert to UTF-8 without BOM. Save.
-
What your text program use? Notepad++?
-
Convert your code to UTF-8 without BOM.
-
Try Server addEvent( 'onStartModInfo', true ) local tModInfo = { } addEventHandler ( 'onPlayerModInfo', root, function( filename, modList ) tModInfo[ source ] = modList end ) addEventHandler ( 'onPlayerQuit', root, function( ) tModInfo[ source ] = nil end ) addEventHandler ( 'onStartModInfo', root, function( ) triggerClientEvent( 'onClientStartModInfo',source,tModInfo[ source ] ) end ) Client addEvent ( 'onClientStartModInfo', true ) local checkModels = { [602] = true; [545] = true; [496] = true; [517] = true; [401] = true; [410] = true; [518] = true; [600] = true; [527] = true; [436] = true; [589] = true; [580] = true; [419] = true; [439] = true; [533] = true; [549] = true; [526] = true; [491] = true; [474] = true; [445] = true; [467] = true; [604] = true; [426] = true; [507] = true; [547] = true; [585] = true; [405] = true; [587] = true; [409] = true; [466] = true; [550] = true; [492] = true; [566] = true; [546] = true; [540] = true; [551] = true; [421] = true; [516] = true; [529] = true; [485] = true; [552] = true; [431] = true; [438] = true; [437] = true; [574] = true; [420] = true; [525] = true; [408] = true; [416] = true; [596] = true; [433] = true; [597] = true; [427] = true; [599] = true; [490] = true; [432] = true; [528] = true; [601] = true; [407] = true; [428] = true; [544] = true; [470] = true; [598] = true; [499] = true; [588] = true; [609] = true; [403] = true; [498] = true; [514] = true; [524] = true; [423] = true; [532] = true; [414] = true; [578] = true; [443] = true; [486] = true; [515] = true; [531] = true; [456] = true; [455] = true; [459] = true; [543] = true; [422] = true; [583] = true; [482] = true; [478] = true; [605] = true; [554] = true; [530] = true; [418] = true; [572] = true; [582] = true; [413] = true; [440] = true; [536] = true; [575] = true; [534] = true; [567] = true; [535] = true; [576] = true; [412] = true; [402] = true; [542] = true; [603] = true; [475] = true; [441] = true; [564] = true; [568] = true; [424] = true; [504] = true; [495] = true; [457] = true; [483] = true; [508] = true; [71] = true; [500] = true; [429] = true; [411] = true; [541] = true; [559] = true; [415] = true; [61] = true; [480] = true; [560] = true; [562] = true; [506] = true; [565] = true; [451] = true; [434] = true; [558] = true; [494] = true; [555] = true; [502] = true; [477] = true; [503] = true; [579] = true; [400] = true; [404] = true; [489] = true; [505] = true; [479] = true; [442] = true; [458] = true; [45] = true; [18] = true; [10] = true; [62] = true; [162] = true; [23] = true; [29] = true; [49] = true; [46] = true; [53] = true; [60] = true; [97] = true; [108] = true; [123] = true; [137] = true; [160] = true; [170] = true; [188] = true; [212] = true; [230] = true; [285] = true; } addEventHandler ( 'onClientStartModInfo', root, function ( modList ) if modList then for _,mod in pairs( modList ) do for index,checkName in pairs( checkModels ) do local nModel = engineGetModelIDFromName ( mod.name:sub( 1,#mod.name - 4 ) ) if nModel == index then setElementHealth( source, 0 ) outputChatBox ( "Not allowed to used modified weapons. Please restore The original" ) else outputChatBox( "You Ped Model is Clean Enjoy Playing" ) end end end end end ) triggerServerEvent( 'onStartModInfo', localPlayer ) Again updated.
-
Better Solidsnake14 create all in one timer.
-
local uTimers = { } local tPos = { { 1220.068359375, -1314.8447265625, 32.610733032227, 1171.732421875, -1341.1748046875, 31.475393295288 } } function fShow( uPlayer ) local x, y, z, lx, ly, lz = unpack( tPos [ math.random( #tPos ) ] ) fadeCamera( uPlayer, true, 5 ) toggleAllControls( uPlayer,false ) setCameraMatrix( uPlayer, x, y, z, lx, ly, lz ) uTimers[ uPlayer ] = setTimer( function( uPlayer ) setCameraTarget( uPlayer, uPlayer ) fadeCamera( uPlayer, true ) toggleAllControls( uPlayer, true ) end, 1000, -- Change this if you want. 1, uPlayer ) end addEventHandler( 'onPlayerQuit', root, function( ) uTimers[ source ] = nil end ) addEventHandler( 'onPlayerWasted', root, function( ) fShow( source ) end ) Updated.
-
Идея суперская. Сам гм делаю не первый, не второй. Инструмента для нормальной разработки нет, приходится всё вручную делать.
-
Maybe he want animation camera?
-
function changeTheSkin( source ) local playerAccount = getPlayerAccount( source ) if playerAccount and not isGuestAccount( playerAccount ) then for i = 0,17 do local arg1,arg2 = getPedClothes( source, i ) setAccountData( playerAccount, "player.clothes."..tostring( i ),tostring( arg1 )..","..tostring( arg2 ) ) end setAccountData( playerAccount, "player.skin", getElementModel( source ) ) outputChatBox("#FF0000*INFO: #0095FFYour skin was successfully saved!", source, 0, 255, 0, true) end end function fLogout( ) local playerAccount = getPlayerAccount( source ) if playerAccount then local playerMoney = getPlayerMoney( source ) --local nSkin = getElementModel( source ) setAccountData( playerAccount, "player.money", playerMoney ) --setAccountData( playerAccount, "player.skin", nSkin ) for i = 1,12 do setAccountData ( playerAccount, "player.weaponID" .. tostring( i ), getPedWeapon ( source, i ) ) setAccountData ( playerAccount, "player.weaponAmmo" .. tostring( i ), getPedTotalAmmo ( source, i ) ) end end end addEventHandler( 'onPlayerLogout', root, fLogout ) addEventHandler( 'onPlayerQuit', root, fLogout ) addCommandHandler( "skinsave", changeTheSkin ) addEventHandler( "onPlayerWasted", root, function( ) local playerAccount = getPlayerAccount( source ) if playerAccount then local playerSkin = getAccountData( playerAccount, "player.skin" ) if playerSkin then spawnPlayer( 2155, -99, 3, 0, math.random( 0, 258 ),tonumber( playerSkin ) ) else spawnPlayer( 2155, -99, 3, 0, math.random( 0, 258 ) ) end end end ) addEventHandler( "onPlayerLogin", root, function( ) local playerAccount = getPlayerAccount( source ) if playerAccount then for i = 1,12 do local nWeapon = getAccountData ( playerAccount, "player.weaponID" ..tostring( i ) ) local nAmmo = getAccountData ( playerAccount, "player.weaponAmmo" ..tostring( i ) ) giveWeapon( source, tonumber( nWeapon ), tonumber( nAmmo ), tonumber ( nWeapon ) == 1 ) end local playerMoney = getAccountData( playerAccount, "player.money" ) setPlayerMoney( source, playerMoney ) local playerSkin = getAccountData( playerAccount, "player.skin" ) if playerSkin then setElementModel( source, playerSkin ) for i = 0,17 do local acc = getAccountData( playerAccount, 'player.clothes.'..i ) if not acc:find 'false' then addPedClothes( source,acc:sub( 1,acc:find( ',' ) - 1 ),acc:sub( acc:find( ',' ) + 1,acc:len( ) ),i ) end end end end end ) Updated.