-
Posts
1,312 -
Joined
-
Last visited
Everything posted by KariiiM
-
Edit the function spawnPlayer
-
Try this --client side -----* Created by Core -----* cG_AccountSystem client.lua file. local X = 0.375 local Y = 0.375 local Width = 0.25 local Height = 0.25 local alap = guiCreateWindow(X, Y, Width, Height, "Please Log In", true) local userNameClick = guiCreateEdit(60, 60, 250, 30, "Username", false, alap) guiSetAlpha(userNameClick,1) local passWordClick = guiCreateEdit(60, 120, 250, 30, "Password", false, alap) local loginClick = guiCreateButton(80, 160, 200, 50, "Log In", false, alap) -- x, y, z, meret local timeElapsed = 0 guiSetInputMode("no_binds") fadeCamera(true, 0.5) showCursor(true) local userNameTable = {} local passWordTable = {} function cC() for i = 0, 25 do outputChatBox(" ") end outputChatBox("#FFFFFFÜdvözöllek a #217AA2Core Game System #FFFFFFszerveren " .. getPlayerName(localPlayer) .. ".", 0, 0, 0, true) end function windowHandler( ) local playername = getPlayerName(localPlayer) guiSetText(userNameClick, "") guiSetText(userNameClick, "") guiSetText(userNameClick, playername) guiSetText(userNameClick, playername) guiSetVisible ( alap, true ) guiSetInputEnabled(true) showCursor ( true ) end function onClickBtn ( button, state ) if button == "left" and state == "up" then if (source == loginClick) then local username = guiGetText(LoginUsername) local password = guiGetText(LoginPassword) if username and password then showChat(true) triggerServerEvent ( "logIn", getRootElement(), localPlayer, username, password ) else outputChatBox ("Enter unsername and password!",255,0,0) end end end end function hideLGP() guiSetInputEnabled(false) guiSetVisible ( GUIEditor_Window[1], false ) showCursor ( false ) end addEvent( "hideLGP", true ) addEventHandler( "hideLGP", getRootElement(), hideLGP ) addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), windowHandler ) addEventHandler ( "onClientGUIClick", loginClick, onClickBtn, false )
-
Use onPlayerWasted event
-
Any Error in debugscript / console?
-
You've to loggin with an account because setAccountData / getAccountData works only with accounts not with guests
-
Yeah true, tested by me too not only the good FPS in MTA but also it's fast in searching stuffs from the windows, i tested the preview / beta versions and they were awesome than windows 7 or 8, now the full version of 10 is great one and working fine for MTA.
-
Packy유ft.유Ceeser유Ancient Civilizations[Troy's Release]
KariiiM replied to TroyRecordings's topic in Showroom
You can do from here http://plod.mooo.com/#ultrathingy -
You can post your problem at the Portugais section, then you can explain your problem clearly and better. https://forum.multitheftauto.com/viewforum.php?f=120
-
and must be client-side?? or what i must use? player localPlayer getLocalPlayer() source or what? localPlayer is client sided only also if you say getLocalPlayer() like you said localPlayer because it equal to it and define itself
-
Do something like function onQuitPlayer () if isElement(objectname) then destroyElement(objectname) end end addEventHandler ( "onPlayerQuit", getRootElement(), onQuitPlayer )
-
This have no sense and will cause errors
-
Ah, my bad i understood you by wrong, try this i think thats what you need Do it ,at the client side because the event "onClientPlayerDamage" is client sided ! addEventHandler("onClientPlayerDamage", root, function (attacker, weapon, loss) if ( isElement ( attacker ) and weapon and attacker== localPlayer and getElementModel(source) == 165) then if (weapon == 51 and getElementModel(source) == 165) then cancelEvent() setElementHealth(source,getElementHealth(source) - 5) end end end)
-
Try this addEventHandler("onClientPedDamage",root, function () if ( getElementModel(source) == 165) then cancelEvent() end end)
-
Try this addEventHandler('onPlayerCommand',root, function(comm) if comm == get('cinemaCommand') then local acls = get('cinemaACLAccess') local gnames = split(acls, ';') for i, group in ipairs(gnames)do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup(group)) then triggerClientEvent('openViewer',source) else triggerClientEvent('stvi',source,"You do not have access to this command.") end end end end)
-
No need to send me all the resource, i thought you going to send just a part of it Anyway, go to definitions.lua in the killmessage resource the first line OF it you'll find a table named "iconWidths" change the first line of it from this iconWidths = { [0] = 21, } To this iconWidths = { [0] = 61, } It should do what you are looking for
-
That's because when you replaced the image you forgot to set the default size of hydra image it should be 61x20. So, change the size from 21x20 to 61x20 and it will works
-
Hey Hyper, -If im not wrong,It's not possible because in this picture you hit the player with the "520 ID" (Hydra) not with rockets and in killmessage resource 520 ID is replaced with hydra image, so when you send the rockets to someone he get killed with "fist" or "brassknuckle" ammos not with hydra, you have to hit the player for showing this image by rockets no, thats because if you're inside the hydra you can't change weapons, you can only see the "fist" and "brassknuckle" ammos in the HUD since the driveby resource doesn't works for planes also, if the player is inside the car and it's explosed, because you sent him these rockets then the "generic image" will show in the kill message GUI. -There's a one solution for that you've to remplace those weapons IDs, "fist" and "brassknuckle" to "Hydra image (520 ID) BUT the issues is, when the player kill other player with the fist, the hydra image with shows up not fist and brassknuckle.
-
MTA have a default resource named killmessage, start it with the admin panel then after killing players with hydra you will see what you are looking for
-
What's wrong with this code?
-
getWeaponNameFromID -- This function is for getting player weapons ID. giveWeapon -- This is for giving player weapon Try by yourself, if you failed then post the code and explain the problem more clear than before, you can learn from your fails
-
Im not sure if people in this section can helps you, since it's out of MTA scripting, i suggest you to watch some tutorials in youtube or talk to someone in mta as a web developer maybe he know how to handle it