Jump to content

MR.S3D

Members
  • Posts

    732
  • Joined

  • Last visited

Everything posted by MR.S3D

  1. local restriction = {} function getPlayerFromNamePart(name) if name then for i, player in ipairs(getElementsByType("player")) do if string.find(getPlayerName(player):lower(), tostring(name):lower(), 1, true) then return player end end end return false end addCommandHandler("likeu", function(player, cmd, players) if (not restriction[player]) then restriction[player] = {} end if not restriction[player][cmd] then restriction[player][cmd] = true setTimer(function () restriction[player][cmd] = false end, 5000, 1) if players then local playerss = getPlayerFromNamePart(players) if playerss then outputChatBox("#FFFFFF".. getPlayerName(player) .."#ffa500: I like you #ffffff" .. getPlayerName(playerss) .. "! #ffffff(type: /likeu )", root, 255, 165, 0, true) end else outputChatBox("#ffffff".. getPlayerName(player) .."#ffa500: I like you! #ffffff(type: /likeu)", player, 255, 165, 0, true) end else outputChatBox("-LaB-: #ffffffYou must wait 5 seconds to write this command again.", player, 255, 165, 0, true) end end ) function hateMap(player, cmd) if (not restriction[player]) then restriction[player] = {} end if not restriction[player][cmd] then outputChatBox("#FFFFFF".. getPlayerName(player) .."#ffa500: I hate this map! #ffffff(type: /hatemap)", root, 255, 255, 255, true) restriction[player][cmd] = true setTimer(function () restriction[player][cmd] = false end, 5000, 1) else outputChatBox("#ffa500-LaB-: #ffffffYou must wait 5 seconds to write this command again.", player, 255, 255, 255, true) end end addCommandHandler("hatemap", hateMap)
  2. this repeat? outputChatBox("-LaB-: #ffffffYou must wait 5 seconds to write this command again.", player, 255, 165, 0, true)
  3. local restriction = {} function getPlayerFromNamePart(name) if name then for i, player in ipairs(getElementsByType("player")) do if string.find(getPlayerName(player):lower(), tostring(name):lower(), 1, true) then return player end end end return false end addCommandHandler("likeu", function(player, cmd, players) if not restriction[player] then restriction[player] = true setTimer(function () restriction[player] = false end, 5000, 1) if players then local playerss = getPlayerFromNamePart(players) if playerss then outputChatBox("#FFFFFF".. getPlayerName(player) .."#ffa500: I like you #ffffff" .. getPlayerName(playerss) .. "! #ffffff(type: /likeu )", root, 255, 165, 0, true) end else outputChatBox("#ffffff".. getPlayerName(player) .."#ffa500: I like you! #ffffff(type: /likeu)", player, 255, 165, 0, true) end else outputChatBox("-LaB-: #ffffffYou must wait 5 seconds to write this command again.", player, 255, 165, 0, true) end end )
  4. local restriction = {} function getPlayerFromNamePart(name) if name then for i, player in ipairs(getElementsByType("player")) do if string.find(getPlayerName(player):lower(), tostring(name):lower(), 1, true) then return player end end end return false end addCommandHandler("likeu", function(player, cmd, players) if not restriction[player] then restriction[player] = true setTimer(function () restriction[player] = false end, 5000, 1) else return outputChatBox("-LaB-: #ffffffYou must wait 5 seconds to write this command again.", player, 255, 165, 0, true) end if players then local playerss = getPlayerFromNamePart(players) if playerss then outputChatBox("#FFFFFF".. getPlayerName(player) .."#ffa500: I like you #ffffff" .. getPlayerName(playerss) .. "! #ffffff(type: /likeu )", root, 255, 165, 0, true) end else outputChatBox("#ffffff".. getPlayerName(player) .."#ffa500: I like you! #ffffff(type: /likeu)", player, 255, 165, 0, true) end end )
  5. yes show me your screen this my screen
  6. i tested it its work for me
  7. local restriction = {} function getPlayerFromNamePart(name) if name then for i, player in ipairs(getElementsByType("player")) do if string.find(getPlayerName(player):lower(), tostring(name):lower(), 1, true) then return player end end end return false end addCommandHandler("likeu", function(player, cmd, players) if restriction[player] == true then return outputChatBox("-LaB-: #ffffffYou must wait 5 seconds to write this command again.", player, 255, 165, 0, true) end restriction[player] = true setTimer(function () restriction[player] = false end, 5000, 1) if players then local name = getPlayerName(player) local playerss = getPlayerFromNamePart(players) if playerss then outputChatBox("#FFFFFF".. name ..": #ffa500I like you #ffffff" .. getPlayerName(playerss) .. "", root, 255, 165, 0, true) end else outputChatBox("#ffa500 I like you", player, 255, 165, 0, true) end end )
  8. copy my code agin i tested it Now worked
  9. local restriction = {} function getPlayerFromNamePart(name) if name then for i, player in ipairs(getElementsByType("player")) do if string.find(getPlayerName(player):lower(), tostring(name):lower(), 1, true) then return player end end end return false end addCommandHandler("likeu", function(player, cmd, players) if restriction[player] then return outputChatBox("-LaB-: #ffffffYou must wait 5 seconds to write this command again.", player, 255, 165, 0, true) end if players then local name = getPlayerName(player) local playerss = getPlayerFromNamePart(players) if playerss then outputChatBox("#FFFFFF".. name ..": #ffa500I like you #ffffff" .. getPlayerName(playerss) .. "", root, 255, 165, 0, true) end else outputChatBox("#ffa500 I like you", player, 255, 165, 0, true) end restriction[player] = true setTimer(function () restriction[player] = false end, 5000, 1) end )
  10. local restriction = {} function getPlayerFromNamePart(name) if name then for i, player in ipairs(getElementsByType("player")) do if string.find(getPlayerName(player):lower(), tostring(name):lower(), 1, true) then return player end end end return false end addCommandHandler("likeu", function(player, cmd, players) if players then if restriction[player] then return outputChatBox("-LaB-: #ffffffYou must wait 5 seconds to write this command again.", player, 255, 165, 0, true) end local name = getPlayerName(player) local playerss = getPlayerFromNamePart(players) if playerss then outputChatBox("#FFFFFF".. name ..": #ffa500I like you #ffffff" .. getPlayerName(playerss) .. "", root, 255, 165, 0, true) end else outputChatBox("#ffa500 I like you", player, 255, 165, 0, true) end restriction[player] = true setTimer(function () restriction[player] = false end, 5000, 1) end )
  11. local restriction = {} function getPlayerFromNamePart(name) if name then for i, player in ipairs(getElementsByType("player")) do if string.find(getPlayerName(player):lower(), tostring(name):lower(), 1, true) then return player end end end return false end addCommandHandler("likeu", function(player, cmd, players) if players then if restriction[player] then return outputChatBox("-LaB-: #ffffffYou must wait 5 seconds to write this command again.", player, 255, 165, 0, true) end local name = getPlayerName(player) local playerss = getPlayerFromNamePart(players) if playerss then outputChatBox("#FFFFFF".. name ..": #ffa500I like you #ffffff" .. getPlayerName(playerss) .. "", root, 255, 165, 0, true) restriction[player] = true setTimer(function () restriction[player] = false end, 5000, 1) end else outputChatBox("#ffa500 I like you", player, 255, 165, 0, true) end end )
  12. function likeYou(player, cmd, players) if players then local players = getPlayerFromNamePart(players) if not restriction[player][cmd] then outputChatBox("#FFFFFF".. getPlayerName(player) ..": #ffa500I like you #ffffff" .. players .. "", root, 255, 165, 0, true) restriction[player][cmd] = true setTimer(function () restriction[player][cmd] = false end, 5000, 1) else outputChatBox("-LaB-: #ffffffYou must wait 5 seconds to write this command again.", player, 255, 165, 0, true) end else outputChatBox("#ffa500 I like you", player, 255, 165, 0, true) end end addCommandHandler("likeu", likeYou)
  13. I did not understand what you want
  14. local restriction = {} function getPlayerFromNamePart(name) if name then for i, player in ipairs(getElementsByType("player")) do if string.find(getPlayerName(player):lower(), tostring(name):lower(), 1, true) then return player end end end return false end function likeYou(player, cmd, players) local players = getPlayerFromNamePart(players) if players then if not restriction[player][cmd] then outputChatBox("#FFFFFF".. getPlayerName(player) ..": #ffa500I like you #ffffff" .. players .. "", root, 255, 165, 0, true) restriction[player][cmd] = true setTimer(function () restriction[player][cmd] = false end, 5000, 1) else outputChatBox("-LaB-: #ffffffYou must wait 5 seconds to write this command again.", player, 255, 165, 0, true) end else outputChatBox("|type| /likeu [player Name]",player) end end addCommandHandler("likeu", likeYou)
  15. function paynspray(hitElement,matchingDimension) if (hitElement and getElementType(hitElement) == "player" and matchingDimension) then local money = getPlayerMoney(hitElement) if ( money>=1000 ) then outputChatBox("Please wait whilst we work on your vehicle!", hitElement) setTimer (fixVehicle, 5000, 1, getPedOccupiedVehicle(hitElement)) end end end addEventHandler("onMarkerHit", dutymarker, paynspray)
  16. ماتلاحظ انك مطول الشغله كان مايحتاج انك تكرر الحدثين في الكلنت استخدمت حدث واحد وخلاص
  17. ههههههههههههههههههههههههههههههههههههههههههههه
  18. function click1() local row,col = guiGridListGetSelectedItem ( grid ) local row2,col2 = guiGridListGetSelectedItem ( grid2 ) if source == grid then if ( row == 0 ) and ( col == 1 ) then guiSetText(text,english) elseif ( row == 1 ) and ( col == 1 ) then guiSetText(text,lithuanian) elseif ( row == 2 ) and ( col == 1 ) then guiSetText(text,portugese) elseif ( row == 3 ) and ( col == 1 ) then guiSetText(text,spanish) elseif ( row == 4 ) and ( col == 1 ) then guiSetText(text,italian) elseif ( row == 5 ) and ( col == 1 ) then guiSetText(text,latvian) elseif ( row == 6 ) and ( col == 1 ) then guiSetText(text,polish) end elseif source == grid2 then if ( row2 == 0 ) and ( col2 == 1 ) then guiSetText(text,commands) elseif ( row2 == 1 ) and ( col2 == 1 ) then guiSetText(text,website) elseif ( row2 == 2 ) and ( col2 == 1 ) then guiSetText(text,updates) elseif ( row2 == 3 ) and ( col2 == 1 ) then guiSetText(text,staff) end end end addEventHandler('onClientGUIClick',root, click1)
  19. yes you need Cancle event onPlayerChat Like That? local root = getRootElement() function chatbox(text, type) cancelEvent() if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Big.Admin")) then cancelEvent() elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("msol-admin")) then cancelEvent() end end addEventHandler("onPlayerChat", root, chatbox) Also i want to hide the chat : function Hide() showChat (false) end addEventHandler ( "onResourceStart", getRootElement(), Hide ) i want to cancel the chat for ever =D local root = getRootElement() addEventHandler("onPlayerChat", root, function() cancelEvent() end)
  20. yes you need Cancle event onPlayerChat
×
×
  • Create New...