Jump to content

ارجو الحل


Recommended Posts

السلام عليكم ,,

اليوم سويت كود بس مدري وش المشكلة :?

addEventHandler("onClientGUIClick",GUIEditor.button[6],  
function ()  
local sel = guiGridListGetSelectedItem(gridList)  
    if sel ~= -1 then  
    local player = getPlayerFromName(guiGridListGetItemText(gridList,sel,1))  
    if isElement(player) then  
        triggerServerEvent("wanted1",localPlayer,player)  
        end  
    end 
end 
) 

ذا كلينت

addEvent("wanted1",true)  
addEventHandler("wanted1",root,  
function (thePlayer) 
if isElement(thePlayer) then 
setPlayerWantedLevel ( thePlayer, 1 ) 
outputChatBox ( getPlayerName ( thePlayer ) .. " has become a 1 star" ) 
        end 
    end  
) 

وذا سيرفر :roll:

Link to comment
السلام عليكم ,,

اليوم سويت كود بس مدري وش المشكلة :?

addEventHandler("onClientGUIClick",GUIEditor.button[6],  
function ()  
local sel = guiGridListGetSelectedItem(gridList)  
    if sel ~= -1 then  
    local player = getPlayerFromName(guiGridListGetItemText(gridList,sel,1))  
    if isElement(player) then  
        triggerServerEvent("wanted1",localPlayer,player)  
        end  
    end 
end 
) 

ذا كلينت

addEvent("wanted1",true)  
addEventHandler("wanted1",root,  
function (thePlayer) 
if isElement(thePlayer) then 
setPlayerWantedLevel ( thePlayer, 1 ) 
outputChatBox ( getPlayerName ( thePlayer ) .. " has become a 1 star" ) 
        end 
    end  
) 

وذا سيرفر

addEventHandler("onClientGUIClick",GUIEditor.button[6],  
function ()  
         Player = guiGridListGetItemText ( gridList, guiGridListGetSelectedItem ( gridList ), 1 ) 
     if Player then  
        triggerServerEvent("wanted1",localPlayer,tostring(Player))  
        end  
end) 

# سيرفر ما اشوف فيه اي خطأ , والتحقق خله

# getPlayerFromName مأ ادري حطها بسيرفر ممكن ذذ

Link to comment
-- Client Side 
addEventHandler("onClientGUIClick",GUIEditor.button[6], 
    function ( ) 
        local sel, col = guiGridListGetSelectedItem(gridList) 
        if sel ~= -1 then 
            triggerServerEvent("wanted1",localPlayer,tostring(guiGridListGetItemText(gridList,sel,1))) 
        end 
    end 
, false ) 

-- Server Side 
addEvent("wanted1",true) 
addEventHandler("wanted1",root, 
    function ( name ) 
        local player = getPlayerFromName ( name ) 
        if player then 
            setPlayerWantedLevel ( player, 1 ) 
            outputChatBox ( getPlayerName ( player ) .. " has become a 1 star", source ) 
        end 
    end 
) 

Link to comment
-- Server Side 
addEvent("wanted1",true) 
addEventHandler("wanted1",root, 
    function ( name ) 
        local player = getPlayerFromName ( name ) 
        if player then 
            setPlayerWantedLevel ( player, 1 ) 
            outputChatBox ( getPlayerName ( player ) .. " has become a 1 star", source)  
        end 
    end 
) 

1- ليش السكربت معرف

player

وتحط في الرسالة source

2- طيب اذا مضمون الرسالة يطلع للاعبين يعني مثلا عناد عنده نجمة

انت كذا الرسالة تطلع للشخص نفسه ماتطلع للجميع #

Link to comment
-- Server Side 
addEvent("wanted1",true) 
addEventHandler("wanted1",root, 
    function ( name ) 
        local player = getPlayerFromName ( name ) 
        if player then 
            setPlayerWantedLevel ( player, 1 ) 
            outputChatBox ( getPlayerName ( player ) .. " has become a 1 star", source)  
        end 
    end 
) 

1- ليش السكربت معرف

player

وتحط في الرسالة source

2- طيب اذا مضمون الرسالة يطلع للاعبين يعني مثلا عناد عنده نجمة

انت كذا الرسالة تطلع للشخص نفسه ماتطلع للجميع #

player = اللاعب الي زادت نجومه

source = الأدمن أو المتسبب في زيادة النجوم

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...