Jump to content

ALw7sH

Members
  • Posts

    1,165
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by ALw7sH

  1. ALw7sH

    Rainbow tags

    in TfF it's something like that setTimer( function() setTeamColor(getTeamFromName("TFG~"),math.random(50,255),math.random(50,255),math.random(50,255)) setTimer(setTeamColor,100,1,getTeamFromName("TFG~"),255,87,0) end,1101,0)
  2. i'm sure you didn't stole it function addvip( thePlayer, commandName, playername ) if getElementData( thePlayer,"admin") == true then if playername then local vipplayer = getPlayerFromName ( playername ) if vipplayer then setElementData( vipplayer,"VIP", true) outputChatBox("CongratZ the Player is now vip -->"..getPlayerName(vipplayer),root,255,255,255,true) else outputChatBox ( "Player does not exist!", thePlayer ) end else outputChatBox ( "You MUST define a player to add him!", thePlayer ) end end end addCommandHandler("add", addvip)
  3. function vipdayz( source ) if getElementData( source,"VIP") == true then setElementData( source,"blood", 15000) outputChatBox("HEALED", source, 255, 0, 0) end addCommandHandler("heal", vipdayz)
  4. ALw7sH

    callRemote

    this is the same code but with fetchRemote. function result(bool,errono) if errono == 0 then outputChatBox(bool) else outputChatBox("ERROR:"..errono) end end function sendEmail( subject, sendto, message ) local header = "From: " .. subject .. " <" .. globalEmail .. ">" local call = fetchRemote ( "www.exmaple.com/myPHP.php?subject="..subject.."&header="..header.."&sendto="..sendto.."&message="..message, result, "", false) end <?php $subject = $_GET["subject"]; $header = $_GET["header"]; $sendto = $_GET["sendto"]; $message = $_GET["message"]; if ($subject && $header && $sendto && $message) { echo "true"; } else { echo "false"; }?>
  5. ALw7sH

    need help

    addEventHandler( "onClientElementStreamIn", root, function () if getElementType(source) == "vehicle" then ... end end )
  6. ALw7sH

    callRemote

    idont know if this effect but it's not should be like that? function result(bool) outputChatBox ( tostring ( bool ) ); if ( bool == "true" ) then outputChatBox ( "test1" ); return true; elseif ( bool == "false" ) then return false; end end function sendEmail ( subject, sendto, message ) local header = "From: " .. subject .. " <" .. globalEmail .. ">"; local call = callRemote ( ***, result, subject, header, sendto, message ); outputChatBox ( tostring ( call ) ); end
  7. function getPos() local account = getPlayerAccount(source) if (account) then local x,y,z = getElementPosition( source ) setAccountData( account, "save.position", {x,y,z} ) -- x,y,z you cant save them like that, it's like 3 arguments when the function need just 1 argument end end addEventHandler("onPlayerQuit", getRootElement(), getPos) function setPos() local account = getPlayerAccount(source) if (account) then local position = getAccountData( account, "save.position") if (position) then -- also here if position then, but position wasn't defined setElementPosition ( source, position[1], position[2], position[3] ) end end end addEventHandler("onPlayerLogin", getRootElement(), setPos)
  8. ALw7sH

    callRemote

    mta_sdk.php, is it in the same folder with your php file ?
  9. المشكله اذا تدخل سيرفرات او في سيرفرك ؟
  10. احذف ملفات سكربت scoreboard المفروض تلقاها في ذا المسار C:\Program Files (x86)\MTA San Andreas 1.4\mods\deathmatch\resources
  11. ALw7sH

    Rainbow tags

    source is not defined in the timer and in the function isInClan why you are doing loop and there's player argument and you dont have to put [] in the table name and the varbs. the whole code is worng can you just explain what you are trying to do?
  12. لو انك تعبت على نفسك شوي بس وخشيت ويكي فنكشن سباون بلاير بتلقى في الساينتكس ارقمنت رقم الشخصيه الي تبيه يرسبن فيها bool spawnPlayer ( player thePlayer, float x, float y, float z, [ int rotation = 0, int skinID = 0, int interior = 0, int dimension = 0, team theTeam = nil ] )
  13. ALw7sH

    On playSound

    you have missed ends, but i have already fix the code you can check my reply
  14. ALw7sH

    On playSound

    yea, sorry i'm just too tired i'll edit it, and thanks -- if string.find(song,".mp3") or string.find(song,".wav") then
  15. viewtopic.php?f=108&t=86435 مادري اذا السكربت فيه فنكشنات اكسبورت او لا php بس حتى لو مافيه الي مسوي السكربت ناشره للفايده معى ملف ال يعني تقدر تستفيد من سكربته وتتعلم منه ولاتنسى لو بتستخدم شي من اكواده اذكر حقوقه بالسكربت حقك
  16. ALw7sH

    On playSound

    for _,resource in ipairs(getResources()) do if getResourceInfo(resource,"type") == "map" then local resourceName = getResourceName(resource) local metaPath = ":"..resourceName.."/meta.xml" local meta = xmlLoadFile(metaPath) if meta then local childIndex = 0 local child = xmlFindChild(meta,"file",childIndex) if child then repeat local song = xmlNodeGetAttribute(child,"src") if string.find(song,".mp3") or string.find(song,".wav") then xmlNodeSetAttribute(child,"download","false") end childIndex = childIndex+1 child = xmlFindChild(meta,"file",childIndex) until child == false end xmlSaveFile(meta) xmlUnloadFile(meta) end end end idont know but this should works fine
  17. ALw7sH

    On playSound

    without a custom script loader, idont think this is possible
  18. بيد الاولى تستبدلها باللاعب او البيد الي تبيه يسوي الانميشن بيد الثانيه ذي اسم البلوك الي داخله الانميشن المستعمل
  19. انا مو جالس اطلب افكار لنفسي لول أي احد عنده فكره يبي يشوفها في ام تي اي ومايقدر يطبقها يكتبها هنا وأي مبرمج يقدر يسويها بشرط انه ينشرها
  20. in this code the data name is Zombie kills and the other codes Zombie Kills, take care of the small/capital letters
  21. ALw7sH

    need help

    addEventHandler("onPlayerDamage", root, function(attacker) if (getElementType(attacker) == "vehicle") then if (getElementModel(attacker) == vehicleID) then -- change it to your vehicle id killPed(source) end end end)
  22. on your race gamemode open race_server.lua search for this line: g_MapOptions.ghostmode = map.ghostmode == 'true' maybe you'll find it at line 149 change it to g_MapOptions.ghostmode = 'true'
  23. it must be client side, otherwise the players wont see the map objects expect who hide them
  24. السلام عليكم ورحمة الله كان فيه موضوع بنفس الفكرة وألي مايعرف فكرة الموضوع كثير من المبرمجين ماعندهم افكار لسكربتات وكثير من الي ماهم مبرمجين او مبتدئين عندهم افكار بس مايقدرون يطبقونها الي معه افكار يحطها بالموضوع ويقدر أي مبرمج يطبقها بشرط أنه ينشرها
  25. This is an exmaple code local flags = { "Flag" "Flag2" } local flagsShaders = {} addEventHandler("onClientResourceStart",root, function() for k,image in ipairs(flags) do local flagTexture = dxCreateTexture(image..".png","dxt3") local flagShader = dxCreateShader("shader.fx") dxSetShaderValue(flagShader,"YourShaderTextureName",flagTexture) flagsShaders[image] = flagShader end end ) addEventHandler("onClientElementStreamIn",root, function() if getElementType(source) == "object" then if getElementModel(source) == 0 then -- Your flag object id local flagIMG = getElementData(source,"flagIMG") engineApplyShaderToWorldTexture(flagsShaders[flagIMG],"YourObjectTextureName",source) end end end )
×
×
  • Create New...