-
Posts
7,337 -
Joined
-
Days Won
11
Everything posted by TAPL
-
showChat(false) showCursor(true) m_window = guiCreateWindow(0.63, 0.01, 0.37, 0.46, "Login panel", true) guiWindowSetMovable(m_window, false) guiWindowSetSizable(m_window, false) guiSetAlpha(m_window, 1.00) m_button1 = guiCreateButton(15, 103, 263, 22, "LOGIN", false, m_window) m_edit1 = guiCreateEdit(78, 178, 200, 20, "", false, m_window) m_edit2 = guiCreateEdit(78, 202, 200, 20, "", false, m_window) addEventHandler("onClientGUIClick", root, function (button, state) if button == "left" and state == "up" then if (source == m_button1) then local username = guiGetText(m_edit1) local password = guiGetText(m_edit2) if username and password and username ~= "" and password ~= "" then triggerServerEvent("onRequestLogin", localPlayer, username, password) guiSetVisible(m_window, false) end end end end)
-
https://community.multitheftauto.com/index.php?p=resources&s=details&id=8200 Original: https://community.multitheftauto.com/index.php?p=resources&s=details&id=7537 And seems he is the same idiot. DONE
-
print on the example was meant to output it on the console, but in your case you don't need to use print because you will set it on the label.
-
https://wiki.multitheftauto.com/wiki/ConvertNumber
-
https://forum.multitheftauto.com/viewtopic.php?f=91&t=66842
-
That's because you didn't follow this: addEventHandler("onClientGUIClick", root, function () if (source == warp) then local row, col = guiGridListGetSelectedItem(grid) local select = guiGridListGetItemText(grid, row, col) if select and select ~= "" then local player = getPlayerFromName(select) if player then local x, y, z = getElementPosition(player) setElementPosition(localPlayer, x+1, y+1, z+1) end end end end) No need for server side.
-
This code was for ***update*** the list ONLY, you still need to use the example of guiGridListAddRow.
-
https://wiki.multitheftauto.com/wiki/Scripting_Introduction
-
You can use this and be sure to replace gridList and column with your. function updateList(old, new) if eventName == "onClientPlayerJoin" then local row = guiGridListAddRow(gridList) guiGridListSetItemText(gridList, row, column, getPlayerName(source), false, false) elseif eventName == "onClientPlayerQuit" then for i=0, guiGridListGetRowCount(gridList) do if guiGridListGetItemText(gridList, i, column) == getPlayerName(source) then guiGridListRemoveRow(gridList, i) end end elseif eventName == "onClientPlayerChangeNick" then for i=0, guiGridListGetRowCount(gridList) do if guiGridListGetItemText(gridList, i, column) == old then guiGridListSetItemText(gridList, i, column, new, false, false) end end end end addEventHandler("onClientPlayerJoin", root, updateList) addEventHandler("onClientPlayerQuit", root, updateList) addEventHandler("onClientPlayerChangeNick", root, updateList)
-
numbers = {"1","2","3","4","5","6","7","8","9"} function antiVoteSpam ( msg, msgType ) if isPollActive then for i, v in pairs ( numbers ) do if string.find ( msg, v ) then cancelEvent() end end end end addEventHandler("onPlayerChat", root, antiVoteSpam) addEventHandler("onPollStart", root, function() isPollActive = true end) addEventHandler("onPollEnd", root, function() isPollActive = false end) addEventHandler("onPollStop", root, function() isPollActive = false end)
-
You know what is getPlayerFromName does? This is much stupid to do such thing. You trying to get the local player using getPlayerFromName which it's require string not element and it actually make no sense to do because local player is already predefined!? This make no sense at all. local pla = getPlayerFromName(getLocalPlayer()) pla is not table and it's not even a element because it would be always false regarding to what you did above. for _,v in ipairs (pla) do This is not a magic, it only will add the row and you also need to set a text to the row using guiGridListSetItemText guiGridListAddRow(v) I don't understand why you did all this mess which you can simply open the wiki and copy the example of function guiGridListAddRow.
-
This actually totally wrong and make no sense. Where did you test it? on the moon? or maybe mars.
-
ذا كوبي بست و هو ما يدري وش السالفه
-
Can't you just use the meta (include resource)?
-
I don't get what you want to do, but source is not what you thinks (read wiki for info about source). function guiClick1 ( button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement ) if (clickedElement == withraw) then local r, g, b = 0, 255, 0 removeEventHandler("onClientRender", getRootElement(), chadi) guiSetVisible ( edit, false ) showCursor ( false ) end end addEventHandler ( "onClientClick", getRootElement(), guiClick1 )
-
if getElementData(source, "spawnedboss") + 1 <= gameplayVariables.playerboss then Where is gameplayVariables.playerboss defined?
-
All accounts and accounts data is saved in (internal.db).
-
Why he even need a timer, it does not save because it was wrong. function saveThings(thePreviousAccount) local x, y, z = getElementPosition(source) local accountName = getAccountName(thePreviousAccount) dbExec(connection, "UPDATE players SET skin=?, x=?, y=?, z=?, int=?, dim=?, wanted=?, money=?, occupation=?, team=?, nick=?, wp=? WHERE account=?", tostring(getElementModel(source)), tostring(x), tostring(y), tostring(z), tostring(getElementInterior(source)), tostring(getElementDimension(source)), tostring(getPlayerWantedLevel(source)), tostring(getPlayerMoney(source)), tostring(getElementData(source, "Occupation")), tostring(getTeamName(getPlayerTeam(source))), tostring(getPlayerName(source)), tostring(getElementData(source, "wantedPoints")), accountName) dbExec(connection, "UPDATE weapons SET playerWeaponAmmo0=?, playerWeaponAmmo1=?, playerWeaponAmmo2=?, playerWeaponAmmo3=?, playerWeaponAmmo4=?, playerWeaponAmmo5=?, playerWeaponAmmo6=?, playerWeaponAmmo7=?, playerWeaponAmmo8=?, playerWeaponAmmo9=?, playerWeaponAmmo10=?, playerWeaponAmmo11=?, playerWeaponAmmo10=?, pistolstat=?, silencedstat=?, desertstat=?, shotgunstat=?, sawnoffstat=?, spazstat=?, microstat=?, mp5stat=?, akstat=?, m4stat=?, sniperstat=? WHERE account=?", getPedTotalAmmo(source, 0), getPedTotalAmmo(source, 1), getPedTotalAmmo(source, 2), getPedTotalAmmo(source, 3), getPedTotalAmmo(source, 4), getPedTotalAmmo(source, 5), getPedTotalAmmo(source, 6), getPedTotalAmmo(source, 7), getPedTotalAmmo(source, 8 ) , getPedTotalAmmo(source, 9), getPedTotalAmmo(source, 10), getPedTotalAmmo(source, 11), getPedTotalAmmo(source, 12), getPedStat(source,69), getPedStat(source,70), getPedStat(source,71), getPedStat(source,72), getPedStat(source,73), getPedStat(source,74), getPedStat(source,75), getPedStat(source,76), getPedStat(source,77), getPedStat(source,78), getPedStat(source,79), accountName) end addEventHandler("onPlayerLogout", root, saveThings)
-
thePreviousAccount is an account not string (account name), so you can't use it this way you need to get the account name also you might need to pass it to the timer just like the source.
-
1- onClientHitMarker createMarker guiGetVisible guiSetVisible showCursor 2- كيف يعني سيارة من النافذه؟ تضغط على زر يعطيك سيارة و تضغط على زر ثاني يعطيك سيارة ثانية .. مثلاً؟ onClientGUIClick في جميع الحالات بتستخدم افنت الضغط على زر و بتسوي تريقر من الكلينت إلى السيرفر عشان تسوي السيارة triggerServerEvent getElementPosition createVehicle warpPedIntoVehicle 3- هذا راح تسوي ماركر او كول شيب في مكان البوابة و تستخدم الأفنت إذا كان ماركر تستخدم افنت لمس ماركر و إذا كان كول شيب تستخدم افنت لمس كول onMarkerHit onColShapeHit و تحرك البوابة بالفنكشن هذا moveObject
