Jump to content

[Help] frozen


The Killer

Recommended Posts

hello

i have a problem that when i select a player and press ' freeze' nothing happend but

when i select my self it happend what is the problem in this code ?

addEventHandler("onClientGUIClick", root, 
function () 
   if (source == frez) then 
     local row, col = guiGridListGetSelectedItem(playerlist) 
       local selectp = guiGridListGetItemText(playerlist, row, col) 
         if selectp and selectp ~= "" then 
            local player = getPlayerFromName(selectp) 
            if player then 
            setElementFrozen(player, true) 
            outputChatBox("You Have Been Frozen By " .. getPlayerName(localPlayer),  255, 0, 0) 
          end 
        else 
       outputChatBox("Please Select  Player.", 255, 0, 0) 
     end 
   end 
end 
) 

Link to comment

so i did the trigger but not working,

debug : ERROR: Freeze/server.lua:5: attempt to concatenate a boolean value

addEvent("freeze", true) 
addEventHandler("freeze", root, 
function (player) 
setElementFrozen(source, true) 
outputChatBox("You Have Been Frozen By " .. getPlayerName(player) .. ".", source,  255, 0, 0) 
end 
) 

Link to comment
addEventHandler("onClientGUIClick", root, 
function () 
   if (source == frez) then 
     local row, col = guiGridListGetSelectedItem(playerlist) 
       local select = guiGridListGetItemText(playerlist, row, col) 
         if select and select ~= "" then 
            local player = getPlayerFromName(select) 
            if player then 
            triggerServerEvent("freeze", getLocalPlayer()) 
          end 
        else 
       outputChatBox("Please Select  Player.", 255, 0, 0) 
     end 
   end 
end 
) 
  

Link to comment
addEvent("freeze", true) 
addEventHandler("freeze", root, 
function (player) 
    setElementFrozen(player, true) 
    outputChatBox("You Have Been Frozen By "..getPlayerName(source)..".", player, 255, 0, 0) 
end) 

addEventHandler("onClientGUIClick", root, 
function () 
   if (source == frez) then 
        local row, col = guiGridListGetSelectedItem(playerlist) 
        local select = guiGridListGetItemText(playerlist, row, col) 
        if select and select ~= "" then 
            local player = getPlayerFromName(select) 
            if player then 
                triggerServerEvent("freeze", getLocalPlayer(), player) 
            end 
        else 
            outputChatBox("Please Select Player.", 255, 0, 0) 
        end 
    end 
end) 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...