Jump to content

Evil-Cod3r

Members
  • Posts

    370
  • Joined

  • Last visited

Everything posted by Evil-Cod3r

  1. wow then can i put it like this if (attacker) and (attacker) =~ source then outputChatBox("Darken Rules !") ?
  2. givePlayerMoney(theKiller,50) Realy ?? its shold be givePlayerMoney(killer,50)
  3. https://wiki.multitheftauto.com/wiki/TriggerClientEvent
  4. wtf i told you what is worng ! i have but the client in client side and server in server side but see the my post up the worng i post it
  5. can some one help me iam not a greate scripter
  6. no line he give me like this Bad argument addEventHandler [Expected function on argument 3 got nill]
  7. no Darken i have it as server side but its say Bad argument addEventHandler [Expected function on argument 3 got nill]
  8. some help guys i dont know what is the error i did it right talking about 2 script
  9. Hi all the Gui Script is Hard for me can some win help me with it iam making a War_Shop Panel GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Grid = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(324,201,707,349,"Shop_Panel By Evil-Cod3r",false) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Label[1] = guiCreateLabel(8,20,226,40,"Welcome :",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],0,255,0) guiSetFont(GUIEditor_Label[1],"clear-normal") GUIEditor_Label[2] = guiCreateLabel(401,23,268,24,"Press F7 To Show and Hide The Window",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[2],255,0,0) guiSetFont(GUIEditor_Label[2],"clear-normal") GUIEditor_TabPanel[1] = guiCreateTabPanel(10,73,688,267,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("Buy Weapons",GUIEditor_TabPanel[1]) GUIEditor_Button[1] = guiCreateButton(6,17,201,39,"Buy Sniper $120",false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Button[1],"clear-normal") GUIEditor_Button[2] = guiCreateButton(6,185,202,48,"Buy Armor $250",false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Button[2],"clear-normal") GUIEditor_Button[3] = guiCreateButton(467,183,204,47,"Buy M4 $190",false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Button[3],"clear-normal") GUIEditor_Button[4] = guiCreateButton(450,18,225,46,"Buy Pistol $ 80",false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Button[4],"clear-normal") GUIEditor_Image[1] = guiCreateStaticImage(215,32,231,184,"images/mtalogo.png",false,GUIEditor_Tab[1]) GUIEditor_Tab[2] = guiCreateTab("Send Money",GUIEditor_TabPanel[1]) GUIEditor_Grid[1] = guiCreateGridList(7,13,370,216,false,GUIEditor_Tab[2]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) col = guiGridListAddColumn(GUIEditor_Grid[1],"Players",0.2) if col then for _, players in pairs( getElementsByType 'player' ) do guiGridListSetItemText( GUIEditor_Grid[1],row,col,getPlayerName( players ),false,false ) end end for i = 1, 1 do row = guiGridListAddRow(GUIEditor_Grid[1]) end guiGridListSetItemColor(GUIEditor_Grid[1],0,1,0,255,0,255) GUIEditor_Image[2] = guiCreateStaticImage(413,24,240,120,"images/image.png",false,GUIEditor_Tab[2]) GUIEditor_Button[5] = guiCreateButton(411,164,257,57,"Send Money",false,GUIEditor_Tab[2]) guiSetFont(GUIEditor_Button[5],"clear-normal") GUIEditor_Label[3] = guiCreateLabel(726,260,220,22,"Money :",false) guiLabelSetVerticalAlign(GUIEditor_Label[3],"center") guiSetFont(GUIEditor_Label[3],"clear-normal") and i try fix this by my self 100 times dont work to local x,y = guiGetScreenSize() function headshot ( killer, weapon, bodypart ) if ( killer ) and ( killer ~= source ) then local image = guiCreateStaticImage ( x/5, y/5.8, 399,169, "SAMP"..math.random(1,4)..".png", false ) guiSetVisible ( image, false ) guiSetVisible ( image, true ) guiStaticImageLoadImage(image, "SAMP"..math.random(1,4)..".png") setTimer (guiSetVisible, 4000, 1, image, false ) end addEventHandler ( "onClientPlayerWasted", getLocalPlayer(), headshot ) function yasser (killer, weapon, bodypart ) if ( killer ) and ( killer ~= source ) then if (bodypart == 9) then outputChatBox("**OWned->HeadShot !!!+$50**",killer,255,255,0) owned = guiCreateStaticImage(0.45,0.6722,0.0917,0.0533,"images/owned.png",true) givePlayerMoney ( killer, 50 ) guiSetVisible(owned, false) guiSetVisible(owned, true) setTimer (guiSetVisible, 4000, 1, owned, false ) end end end end addEventHandler ( "onClientPlayerWasted", getLocalPlayer(), yasser ) function trigger ( killer, killerweapon, bodypart ) if ( killer ) and ( killer ~= source ) then if (bodypart == 9) then triggerClientEvent(killer,"playWastedSound",killer,"sounds/2.ogg") end end end addEventHandler ( "onPlayerWasted", getRootElement(), trigger) function wastedme () outputChatBox("**Woops Your Dead Try Next Time - $5**",source,255,255,0) takePlayerMoney( source, 5 ) triggerClientEvent(source,"playWastedSound",source,"sounds/3.ogg") end addEventHandler ( "onPlayerWasted", getRootElement ( ), wastedme)
  10. God i love You Castillo For Helpin Me i wish i be like you Greate Scripter You always Helping Us Thx i own You Many Time Work Fine My Bro <3
  11. guiSetVisible(GUIEditor_Window[1[, not guiGetVisible(GUIEditor_Window[1])) GUIEditor_Window[1[ Syntax error in your code, lol i alredy tryed that befoure you bost it and the Same Error Never Minde just forget this Topic Thx For all who tryed Help Me i relay owe you guys
  12. the same error i well wait for another scripter to Help Me Thx For Help me untel now Darken i owe You Man !
  13. Bad agument guiGridListAddRow'[Expected gui-element at argumnet 1, got nill] Bad argument@ 'guiGridListSetitemText'[Expected number at argument 2, got boolean]
  14. its work but dont get the Players Name function sa () GUIEditor_Window = {} GUIEditor_Grid = {} GUIEditor_Label = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(423,220,477,311,"Level_System v3.0 ",false) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Grid[1] = guiCreateGridList(9,21,264,281,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) local row = guiGridListAddRow ( playerList ) local col = guiGridListAddColumn(GUIEditor_Grid[1],"Players",0.2) GUIEditor_Label[1] = guiCreateLabel(286,43,144,23,"Level :",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],0,255,0) guiSetFont(GUIEditor_Label[1],"clear-normal") GUIEditor_Label[2] = guiCreateLabel(284,95,102,21,"EXP:",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[2],0,0,255) guiSetFont(GUIEditor_Label[2],"clear-normal") GUIEditor_Image[1] = guiCreateStaticImage(266,152,182,146,"images/mtalogo.png",false,GUIEditor_Window[1]) for i, players in ipairs(getElementsByType('player')) do guiGridListSetItemText(GUIEditor_Grid[1],row,col,getPlayerName(players),false,false) end addEventHandler ( "onClientResourceStart", getRootElement(), sa ) addEventHandler('onClientGUIClick',root, function() if source == GUIEditor_Grid[1] then local theRow, theCol = guiGridListGetSelectedItem(source) if theRow and theCol and theRow ~= -1 and theCol ~= -1 then local name = guiGridListGetItemText(source,theRow, theCol) end end end) function ToggleShop() if guiGetVisible(GUIEditor_Window[1]) == true then guiSetVisible(GUIEditor_Window[1],false) showCursor(false) else guiSetVisible(GUIEditor_Window[1],true) showCursor(true) end end end bindKey("F7","down",ToggleShop)
  15. its say attempt to index global'GuiEdtor_window'(a nill value)
  16. i copyed your last code and the same error
  17. function me2 () GUIEditor_Window[1] = guiCreateWindow(423,220,477,311,"Level_System v3.0 ",false) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Grid[1] = guiCreateGridList(9,21,264,281,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) local row = guiGridListAddRow ( playerList ) local col = guiGridListAddColumn(GUIEditor_Grid[1],"Players",0.2) GUIEditor_Label[1] = guiCreateLabel(286,43,144,23,"Level :",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],0,255,0) guiSetFont(GUIEditor_Label[1],"clear-normal") GUIEditor_Label[2] = guiCreateLabel(284,95,102,21,"EXP:",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[2],0,0,255) guiSetFont(GUIEditor_Label[2],"clear-normal") GUIEditor_Image[1] = guiCreateStaticImage(266,152,182,146,"images/mtalogo.png",false,GUIEditor_Window[1]) for i, players in ipairs(getElementsByType('player')) do guiGridListSetItemText(GUIEditor_Grid[1],row,col,getPlayerName(players),false,false) end addEventHandler('onClientGUIClick',root, function() if source == GUIEditor_Grid[1] then local theRow, theCol = guiGridListGetSelectedItem(source) if theRow and theCol and theRow ~= -1 and theCol ~= -1 then local name = guiGridListGetItemText(source,theRow, theCol) end) dont work its say unexpected symbol near ')'
  18. Evil-Cod3r

    SOLVED

    call(getResourceFromName("scoreboard"), "addScoreboardColumn", "Race Wins") function DestructionWin( ) local alivePlayers = getAlivePlayers( ) if #alivePlayers == 1 then local account = getPlayerAccount( alivePlayers[1] ) local wins = getAccountData( account,"Race Wins" ) or 0 if account then if isGuestAccount( account ) then return end setAccountData( account,"Race Wins", wins + 1 ) end local playername = getPlayerName( alivePlayers[1] ) outputChatBox ( "#FFA824The player " .. playername .. " won!", root, 255, 255, 255, true ) end end addEventHandler( "onPlayerWasted", root,DestructionWin) addEventHandler( "onPlayerWasted", root, function( ) local account = getPlayerAccount( source ) local loses = getAccountData( account,"Race Loses" ) or 0 if account then if isGuestAccount( account ) then return end setAccountData( account,"Race Loses", loses + 1 ) end end ) function updateRatio (thePlayer) local account = getPlayerAccount( theplayer ) if account then if isGuestAccount( account ) then return end local wins = getAccountData( account, "Race Wins" ) or 0 local loses = getAccountData( account, "Race Loses" ) or 0 if loses == 0 then setAccountData(account, "ratio", "-") else local kdr = round( wins / loses, 2) setAccountData(account, "ratio", kdr) end end end function publicstatsinfo( ) if isElement( source ) then local account = getPlayerAccount( source ) if account then if isGuestAccount( account ) then return end local askdname = getPlayerName( source ) local wins = getAccountData( account, "Race Wins" ) or 0 local loses = getAccountData( account, "Race Loses" ) or 0 local ratio = getAccountData( account, "Ratio" ) or N/A if loses and wins then outputChatBox("#FFA824*" .. askdname .. " won " .. tostring( wins ) .. " times and he lost " ..tostring( loses ).. " times, his ratio is " .. tostring( ratio ) .. "%", root, 255, 12, 15, true) else outputChatBox("#FFA824*" .. askdname .. " doesen't losed or won " , root, 255, 12, 15, true) end end else outputChatBox( "Error source is not player" ) end end addEvent( "stats", true ) addEventHandler( "stats", root, publicstatsinfo ) function checkCommand( message, messageType ) if messageType == 0 then if message == "!stats" then triggerEvent( "stats", source ) elseif message == "!st" then triggerEvent( "stats", source ) cancelEvent( ) end end end addEventHandler( "onPlayerChat", root, checkCommand ) function getPlayerFromNamePart(Name) local thePlayer = getPlayerFromName(thePlayerName) if thePlayer then return thePlayer end for _,thePlayer in ipairs(getElementsByType("player")) do if string.find(string.gsub(getPlayerName(thePlayer):lower(),"#%x%x%x%x%x%x", ""), thePlayerName:lower(), 1, true) then return thePlayer end end return false end restriction = {} addCommandHandler("stats", function (thePlayer, cmd, whoToCheck) local playerName = getPlayerName(thePlayer) if restriction[playerName] then outputChatBox("#FFA824You have to wait 30 seconds", thePlayer, 255, 0, 0, true) else restriction[playerName] = true setTimer(restrictionEnd, 30000, 1, playerName) local player = getPlayerFromNamePart( whoToCheck ) if (player) then local account = getPlayerAccount( player ) if account then if isGuestAccount( account ) then return end local wins = getAccountData( account, "Race Wins" ) or 0 local loses = getAccountData( account, "Race Loses" ) or 0 ratio = (tonumber(wins)/tonumber(loses))*10 or N/A outputChatBox("#FFA824*[sTATS] Player's "..tostring(player).." stats : " , root, 255, 12, 15, true) if wins then outputChatBox("#FFA824*Wins: "..tostring(wins).."!", root, 255, 12, 15, true) else outputChatBox("#FFA824*Wins: 0 !" , root, 255, 12, 15, true) end if loses then outputChatBox("#FFA824*Loses: "..tostring(loses).."!", root, 255, 12, 15, true) else outputChatBox("#FFA824*Loses: 0 !", root, 255, 12, 15, true) end if ratio then outputChatBox("#FFA824*Ratio: "..tostring(ratio).."% !", root, 255, 12, 15, true) else outputChatBox("#FFA824*Ratio: - %", root, 255, 12, 15, true) end end else outputChatBox( "Player not found!" ) end end end) function restrictionEnd(playerName) restriction[playerName] = nil end
  19. Try This function startAzan() local time = getRealTime() local hours = time.hour local minutes = time.minute local seconds = time.second if (hours == 5 and minutes == 13 and seconds == 0) then playSound("azanfajr.mp3",false) outputChatBox ( "Azan AlFajer") elseif (hours == 12 and minutes == 08 and seconds == 0) then playSound("azan.mp3",false) outputChatBox ( "Azan AlDuhr") elseif (hours == 3 and minutes == 20 and seconds == 0) then playSound("azan.mp3",false) outputChatBox ( "Azan Alasr") elseif (hours == 5 and minutes == 43 and seconds == 0) then playSound("azan.mp3",false) outputChatBox ( "Azan AlMagreb") elseif (hours == 7 and minutes == 13 and seconds == 0) then playSound("azan.mp3",false) end end addEventHandler( "onClientResourceStart", getRootElement(), startAzan)
  20. Hi all iam try Making a window with Players Name if Player Select a Player He see his Level and Exp GUIEditor_Window = {} GUIEditor_Label = {} GUIEditor_Grid = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(423,220,477,311,"Level_System v3.0 ",false) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Grid[1] = guiCreateGridList(9,21,264,281,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) for id, playeritem in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( playerList ) guiGridListSetItemText ( playerList, row, column, getPlayerName ( playeritem ), false, false ) guiGridListAddColumn(GUIEditor_Grid[1],"Players",0.2) for i = 1, 1 do guiGridListAddRow(GUIEditor_Grid[1]) end GUIEditor_Label[1] = guiCreateLabel(286,43,144,23,"Level :",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],0,255,0) guiSetFont(GUIEditor_Label[1],"clear-normal") GUIEditor_Label[2] = guiCreateLabel(284,95,102,21,"EXP:",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[2],0,0,255) guiSetFont(GUIEditor_Label[2],"clear-normal") GUIEditor_Image[1] = guiCreateStaticImage(266,152,182,146,"images/mtalogo.png",false,GUIEditor_Window[1]) and this small script wont work local x,y = guiGetScreenSize() function headshot ( killer, killerweapon, bodypart ) if ( killer ) and ( killer ~= source ) then local image = guiCreateStaticImage ( x/4, y/5.8, 399,169, "SAMP"..math.random(1,4)..".png", false ) guiSetVisible ( image, false ) guiSetVisible ( image, true ) guiStaticImageLoadImage(image, "SAMP"..math.random(1,4)..".png") setTimer (guiSetVisible, 4000, 1, image, false ) end addEventHandler ( "onClientPlayerWasted", getRootElement(), headshot ) addEventHandler("onPlayerWasted", root, function ( ammo, killer, killerweapon, bodypart ) if ( killer ) and ( killer ~= source ) then if (bodypart == 9) then outputChatBox("**OWned->HeadShot !!!+$50**",killer,255,255,0) owned = guiCreateStaticImage(0.45,0.6722,0.0917,0.0533,"images/owned.png",true) guiSetVisible(blood, false) guiSetVisible(blood, true) setTimer (guiSetVisible, 4000, 1, blood, false ) triggerClientEvent(killer,"playWastedSound",killer,"sounds/2.ogg") givePlayerMoney ( killer, 50 ) end else outputChatBox("**Woops Your Dead Try Next Time Noob ! - $5**",source,255,255,0) triggerClientEvent(source,"playWastedSound",source,"sounds/3.ogg") takePlayerMoney( source, 5 ) end end) just these tow and i well uplode my gamemode and crdits to who help me
×
×
  • Create New...