-
Posts
7,337 -
Joined
-
Days Won
11
Everything posted by TAPL
-
how much often size of the login panel? 10 kb? 20 kb? 30 kb? 50 kb? this can be downloaded in less than 1 sec i thinks the only things that should be saved is images and sounds and txd - dff or whatever the files that have large size.
-
what joke is this? when you use the command /quitteam do you know what is will happen? you will get your currently skin and set it as element data then you will get the same element data and set the skin your currently skin is the same as the element data so, old skin is same currently skin. lol! of course your skin will remaining the same! you need to make a command to save the skin and other command to get the skin.
-
I Dont Understand What Your Mean By Special Who It Is? You just put thePlayer and you don't know who it's? lol. show your client, did you try source? it's often will be source.
-
thePlayer is not defined. show your trigger, it's often will be source not thePlayer. about the timer it's won't work, you have to special who is thePlayer.
-
since you haven't add 'send button' at the event function, of course it wouldn't do anything look you have add this if ( source == GUIEditor_Button[2] ) then and this button aren't send button, i think you mixed it GUIEditor_Button[2] = guiCreateButton(144,137,230,19,"ignore this button",false,GUIEditor_Window[1]) and send button is this GUIEditor_Button[1] = guiCreateButton(472,60,69,30,"Send",false,GUIEditor_Window[1]) so this if ( source == GUIEditor_Button[2] ) then should be if ( source == GUIEditor_Button[1] ) then
-
line 36; client side addEventHandler("onClientGuiGlick", getRootElement(), event name is wrong, it's should be addEventHandler("onClientGUIClick", getRootElement(), also you have extra 'end' Edit: about debugscript, it's should notice you about the extra 'end if you are using the black console windows it's debug only for server side, this can't help as much as /debugscript 3 in game debug for client and server.
-
https://wiki.multitheftauto.com/wiki/CountPlayersInTeam In Wiki Example 3
-
addCommandHandler("noteam", function(thePlayer) outputChatBox("All Players is now without team.",thePlayer) for _, player in ipairs(getElementsByType("player")) do setPlayerTeam(player, nil) end end)
-
addEvent("tdmstart", true) addEventHandler("tdmstart",root, function() addEventHandler("onClientRender", root, drawthetext) end) function drawthetext() local redteamname = getTeamFromName("Red Team") local blueteamname = getTeamFromName("Blue Team") local redp = countPlayersInTeam( redteamname ) local bluep = countPlayersInTeam( blueteamname ) local screenWidth, screenHeight = guiGetScreenSize() local ax, ay = screenWidth - 90, 200 local ax1, ay1 = screenWidth - 92, 180 dxDrawText("Red Team: "..tostring(redp), ax,ay) dxDrawText("Blue Team: "..tostring(bluep), ax1,ay1) end
-
addEventHandler("onResourceStart",resourceRoot, function() createTeam("Red Team",255,0,0) createTeam("Blue Team",0,0,255) end)
-
They are addEventHandler("onResourceStart",root function(thePlayer) createTeam("Red Team" 255,0,0) createTeam("Blue Team" 0,0,255) end ) you forgot to put ',' after "RedTeam" and "Blue Team" addEventHandler("onResourceStart",resourceRoot function() createTeam("Red Team",255,0,0) createTeam("Blue Team",0,0,255) end)
-
Do You have Teams with name 'Red Team' and 'Blue Team' ? seems like you don't.
-
addEventHandler("onClientRender", root, function() local redp = countPlayersInTeam(getTeamFromName("Red Team")) local bluep = countPlayersInTeam(getTeamFromName("Blue Team")) local screenWidth, screenHeight = guiGetScreenSize() local ax, ay = screenWidth - 34, 70 local ax1, ay1 = screenWidth - 34, 65 dxDrawText("Red Team:"..tostring(redp), ax,ay) dxDrawText("Blue Team:"..tostring(bluep), ax1,ay1) end)
-
addEventHandler("onClientRender", root, function() local redp = countPlayersInTeam(getTeamFromName("Red Team")) local bluep = countPlayersInTeam(getTeamFromName("Blue Team")) local screenWidth, screenHeight = guiGetScreenSize() local ax, ay = screenWidth - 34, 70 local ax1, ay1 = screenWidth - 34, 65 dxDrawText("Red Team:"..redp, ax,ay) dxDrawText("Blue Team:"..bluep, ax1,ay1) end)
-
Bad argument means incorrect argument arguments is what you put inside the brackets ( ) local IP = getPlayerIP(thePlayer) thePlayer is Bad argument which this means the argument (thePlayer) is not defined.
-
--Client Side-- addEventHandler ("onClientGUIClick", root, function() if ( source == CopySer ) then setClipboard(getPlayerSerial()) guiSetVisible(GUIEditor_Image[1], false) guiSetVisible(Note, true) playSound("other/newW.mp3") elseif ( source == CopyIP ) then triggerServerEvent("onGetPlayerIP", localPlayer) guiSetVisible(GUIEditor_Image[1], false) guiSetVisible(Note, true) playSound("other/newW.mp3") elseif ( source == ok ) then guiSetVisible(Note, false) showCursor(false) guiSetInputEnabled(false) end end ) addEvent("PlayerIP",true) addEventHandler("PlayerIP",root, function(IP) setClipboard(IP) end) --Server Side-- addEvent("onGetPlayerIP",true) function copyip() triggerClientEvent(source,"PlayerIP",source,getPlayerIP(source)) end addEventHandler("onGetPlayerIP",root, copyip)
-
triggerServerEvent("ip",localPlayer) addEvent("ip",true) addEventHandler("ip",root, function(ip) guiSetText(GUIEditor_Label[16],tostring(ip)) end ) addEvent("ip",true) function ip() local IP = getPlayerIP(source) triggerClientEvent(source,"ip", source,IP) end addEventHandler("ip",root,ip)
-
https://community.multitheftauto.com/ind ... ls&id=3472
-
Try function playerListKeyPressed (button, state) if state == "down" then toggleControl ( "next_weapon", false ) toggleControl ( "previous_weapon", false ) addEventHandler("onClientPlayerRadioSwitch", localPlayer, Radio) if isTimer ( playerListUpdateTimer ) then killTimer ( playerListUpdateTimer ) end scollBarAdjustTimer = setTimer ( reAdjustPlayerListScollBar, 50, 1) bindKey ( "mouse_wheel_up", "down", playerListScrollUp ) bindKey ( "mouse_wheel_down", "down", playerListScrollDown ) showPlayerList () else removeEventHandler("onClientPlayerRadioSwitch", localPlayer, Radio) toggleControl ( "next_weapon", true ) toggleControl ( "previous_weapon", true ) if isTimer(scollBarAdjustTimer) then killTimer(scollBarAdjustTimer) end unbindKey ( "mouse_wheel_up", "down", playerListScrollUp ) unbindKey ( "mouse_wheel_down", "down", playerListScrollDown ) guiSetVisible ( gImage["playerList"], false ) end end bindKey("tab", "both", playerListKeyPressed) function Radio() cancelEvent() end
-
You may need to use this event to disable radio. https://wiki.multitheftauto.com/wiki/OnC ... adioSwitch
-
remove source, it's not needed client side.
-
https://wiki.multitheftauto.com/wiki/GetPlayerIP
-
https://wiki.multitheftauto.com/wiki/Resource:Mapmanager when server start? i think onResourceStart can do the job https://wiki.multitheftauto.com/wiki/OnResourceStart and you can make the resource start when the server start from file 'mtaserver.conf'
