Jump to content

TAPL

Retired Staff
  • Posts

    7,337
  • Joined

  • Days Won

    11

Everything posted by TAPL

  1. setPedStat ( ped thePed, int 24, float 200 ) should be setPedStat ( thePlayer, 24, 999 )
  2. TAPL

    question

    200 HP after using setPedStat. if you want more you can use https://community.multitheftauto.com/ind ... ls&id=5195
  3. viewtopic.php?f=119&t=42244#p427365
  4. I would like to apply for moderator in this section; I have knowledge of English language, as i have already understood well what you wrote in this topic. also I have a good knowledge in scripting, and i've already helped lots of people in Scripting section & Arabic section.
  5. -- Server Side -- addEventHandler("onPlayerLogin", root, function(_,acc) local accName = getAccountName(acc) if isObjectInACLGroup("user."..accName, aclGetGroup("shr6h")) then bindKey(source, "F2", "down", openWindow) end end) function openWindow(player) local accName = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup("user."..accName, aclGetGroup("shr6h")) then triggerClientEvent(player,"OpenWindow",player) end end -- Client Side -- addEvent("OpenWindow", true) addEventHandler("OpenWindow", root, function () if not guiGetVisible(theWindow) then guiSetVisible(theWindow, true) showCursor(true) else guiSetVisible(theWindow, false) showCursor(false) end end)
  6. search in https://community.multitheftauto.com/ we will not make it for you.
  7. Yes. https://wiki.multitheftauto.com/wiki/DownloadFile
  8. TAPL

    helpme!

    vehicles = {541, 506, 603, 423, 411, 536, 500, 582, 495, 562, 560, 480, 429, 502, 402, 488, 601, 487, 424, 471} function enterVehicle(veh, seat, jacked) local nm = math.random(#vehicles) setElementModel(veh, nm) end addEventHandler("onPlayerVehicleEnter", root, enterVehicle)
  9. executeSQLQuery [[ CREATE TABLE IF NOT EXISTS teams ( player TEXT, team TEXT ) ]] executeSQLCreateTable("teams", "player TEXT, team TEXT")
  10. اذا كنت انت اصلاً يا تابل متبند عشان سكربت الاف 6 الي بحرب العصابات ههه خخخخ أنا مو متبند أصلاً
  11. قدم طلب لفك الباند في الموقع التابع للسيرفر http://cit2.net/forum/index.php?board=244.0
  12. local area = createRadarArea(x,y,sizeX,sizeY,r,g,b,a) setElementData(area,"zombieProof",true)
  13. door أبحث عن
  14. try to change your resource name and reuplaod it if does not work, then your resource has something wrong, like you have added an file in meta but it does not exist with the resource files..
  15. Ssorry i do not understand. How do i give permission 777 ? http://www.stadtaus.com/en/tutorials/ch ... ssions.php http://www.phpjunkyard.com/tutorials/ft ... torial.php
  16. Not sure, i remember there was problem with delux-host that when you upload any resource you need to give him permission 777 you may have the same problem with your host, try to give the resource permission 777.
  17. can you upload an image of your script files?
  18. TAPL

    question

    Yes. https://community.multitheftauto.com/ind ... ls&id=5195
  19. i thinks you should resize your gui, or you will need to create the label without parent then you will need to calculation the position according to gui window.
  20. local theLabel = guiCreateLabel() guiSetProperty(theLabel, "AlwaysOnTop", "true")
  21. but it won't be updated, -- server side -- local root = getRootElement() createBlip ( 1552.4996337891, -1677.3264160156, 15.1953125, 30 ) addEventHandler("onPlayerLogin",root, function() local playeraccount = getPlayerAccount (source) local data = tonumber(getAccountData(playeraccount, "arrest")) -- you should finish it local acc = getAccountName(playeraccount) triggerClientEvent(source,"myEvent",data,acc) end ) function createSAPDTeam () SAPDteam = createTeam ("police", 100, 149, 237) end addEventHandler ("onResourceStart", resourceRoot, createSAPDTeam) function joinSAPD() if (isGuestAccount(getPlayerAccount(source)) == false) then local playeraccount = getPlayerAccount (source) if not getAccountData(playeraccount,"Occupation") == "police" then setPlayerTeam(source,SAPDteam) setElementModel(source, 280) giveWeapon ( source, 3 ) setAccountData( playeraccount, "Occupation", "police") outputChatBox("You are now policeman.",source,0,255,0) else outputChatBox("Error: You already have this work",source,255,0,0) end else outputChatBox ('Error: Please login or register!',source,255,255,255,true) end end addEvent("setSAPD", true) addEventHandler("setSAPD",root,joinSAPD) function removeSAPD() if (isGuestAccount(getPlayerAccount(source)) == false) then local playeraccount = getPlayerAccount (source) if not getAccountData(playeraccount,"Occupation") == "unemployed" then setPlayerTeam(source,0) setAccountData( playeraccount, "Occupation", "unemployed") outputChatBox("you left your job.",source,0,255,0) else outputChatBox ('Error: You not have work',source,255,255,255,true) end else outputChatBox ('Error: Please login or register!',source,255,255,255,true) end end addEvent("removeSAPD", true) addEventHandler("removeSAPD",root,removeSAPD) function policeJob ( attacker, attackerweapon, bodypart, loss ) theTeam = getPlayerTeam ( attacker ) theWL = getPlayerWantedLevel ( source ) theSkin = getElementModel ( attacker ) if (attackerweapon == 3) and (loss > 2 ) and (theWL > 0) then if getTeamName( theTeam ) == "police" or getTeamName( theTeam ) == "SWAT" or getTeamName( theTeam ) == "FBI" then setElementPosition (source, 4076.3999023438, -1788.5, 3.511967, true) theName = getPlayerName ( source ) theCop = getPlayerName ( attacker ) outputChatBox ( "You have been jailed by "..theCop.. " for 10 seconds.", source ) local playeraccount = getPlayerAccount ( attacker ) arrests = tonumber(getAccountData(playeraccount, "arrest")) setAccountData(playeraccount, "arrest", arrests + 1 ) setElementData(attacker, "arrest", arrests + 1 ) givePlayerMoney (attacker, 100) setTimer ( setElementPosition, 10000, 1, source, 1544.4332275391, -1674.7698974609, 13.688399200439) setPlayerWantedLevel (source, 0) end end end addEventHandler ("onPlayerDamage", getRootElement(), policeJob) -- client side -- local root = getRootElement() local marker = createMarker( 1552.4996337891, -1677.3264160156, 15.1953125, "Cylinder", 1.5, 0, 0, 255, 150) GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} function guiMyCwindow(w,h,t) local x,y = guiGetScreenSize() return guiCreateWindow((x-w)/2,(y-h)/2,w,h,t,false) end windowjob = guiMyCwindow(301,250,"police job") guiSetVisible(windowjob, false) GUIEditor_Button[1] = guiCreateButton(22,140,108,35,"Take job",false,windowjob) GUIEditor_Label[2] = guiCreateLabel(19,59,108,35,"Arrests : " ,false,windowjob) GUIEditor_Button[2] = guiCreateButton(179,200,110,36,"Close",false,windowjob) GUIEditor_Button[3] = guiCreateButton(22,200,110,36,"Quit Job",false,windowjob) GUIEditor_Memo[1] = guiCreateLabel(19,19,273,20,"are you sure you want to take this job?",false,windowjob) theTeam = getTeamFromName("police") GUIEditor_Memo[2] = guiCreateLabel(19,45,273,20,"On-duty officers : "..countPlayersInTeam(theTeam),false,windowjob) addEvent("myEvent",true) addEventHandler("myEvent",root, function(data, acc) guiSetText(GUIEditor_Label[2],"Arrests : "..data) guiSetText(GUIEditor_Label[2],"Account : "..acc) -- you need make other label, now you set text on 1 label 2 times end ) addEventHandler("onClientElementDataChange",root, function(dataName) if getElementType(source) == "player" and dataName == "arrest" then guiSetText(GUIEditor_Label[2],"Arrests : "..getElementData(source,dateName)) end end) function SAPDjob(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(windowjob) then guiSetVisible(windowjob, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", marker, SAPDjob) function FBIjobleave(leaveElement) if getElementType(leaveElement) == "player" and (leaveElement == localPlayer) then if guiGetVisible(windowjob) then guiSetVisible(windowjob, false) showCursor(false) end end end addEventHandler("onClientMarkerLeave", marker, SAPDjobleave) function joinTeam() triggerServerEvent("setSAPD",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) function removeTeam() triggerServerEvent("removeSAPD",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[3] , removeTeam, false) function removeSAPDWindow() guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[2] , removeSAPDWindow, false)
  22. هذا يمنع الزومبي يجيه سباون داخل المنطقة لاكن يمديه يمشي و يدخل المفروض أنك تسوي جدار + بوابة عشان تمنع الزومبي من الدخول إلى المنطقة
  23. line 6 in server local acc = getAccountNamee(playeraccount) should be local acc = getAccountName(playeraccount)
  24. there no benefit of it because it won't return anything.
  25. Admin Panel already have these commands.
×
×
  • Create New...