Jump to content

طلب ضروري


EL-JoKeR

Recommended Posts

setTeamFriendlyFire(createTeam("Grove",   0, 500, 0   ), false) 
setTeamFriendlyFire(createTeam("Vagos",   255, 200, 0 ), false) 
setTeamFriendlyFire(createTeam("Ballas",   128, 0, 128), false) 
setTeamFriendlyFire(createTeam("Mafia",   154,205,50  ), false) 
setTeamFriendlyFire(createTeam("Russians",   160,82,45), false) 
setTeamFriendlyFire(createTeam("Triads",   104,104,104), false) 
setTeamFriendlyFire(createTeam("Rifa",    250,128,114 ), false) 
setTeamFriendlyFire(createTeam("Street",    250,128,0 ), false) 
setTeamFriendlyFire(createTeam("Aztecas", 24, 198, 238), false) 
setTeamFriendlyFire(createTeam("Medic",  24, 255, 255 ), false) 
setTeamFriendlyFire(createTeam("Police",    0, 0, 255 ), false) 
createTeam("No Team", 255, 255, 255) 
  
  
  
addEvent("spawnMe", true) 
addEventHandler("spawnMe", root, 
function(skinID, sX, sY, sZ, sR, team) 
    local team = getTeamFromName(team) 
    spawnPlayer(source, sX, sY, sZ, sR, skinID, 0, 0, team) 
    setCameraTarget(source) 
    showChat(source, true) 
end) 
  
addEventHandler("onPlayerSpawn", root, 
function(_, _, _, _, team) 
    local team = team and getTeamName(team) or "N/A" 
    if team == "Police" then 
        giveWeapon(source, 3, 1) 
        takeWeapon(source, 41) 
    elseif team == "Medic" then 
        giveWeapon(source, 41, 9999) 
        takeWeapon(source, 3) 
    else 
        takeWeapon(source, 3) 
        takeWeapon(source, 41) 
    end 
    local account = getPlayerAccount(source) 
    if account and not isGuestAccount(account) then 
        local wData = getAccountData(account, "newPlayerData")  
        if not wData then 
            givePlayerMoney(source, 2500) 
            giveWeapon(source, 23, 20) 
            giveWeapon(source, 31, 50) 
            setAccountData(account, "newPlayerData", true)  
        end 
    end 
end) 
  
  
addEvent("Login-Register", true) 
addEventHandler("Login-Register", root, 
function(action, userName, passWord) 
    if (action == "Login") then 
        local account = getAccount(userName, passWord) 
        if account then 
            logIn(source, account, passWord) 
            triggerClientEvent(source, "onLoginSuccess", source) 
        else 
            exports.TopBarChat:sendClientMessage ("Wrong username or password!", source, 255, 255, 0) 
        end 
    elseif (action == "Register") then 
        local serial = getPlayerSerial(source) 
        local TotalAcc = TotalAccounts(serial) or 0 
        if TotalAcc < 3 then 
            if not getAccount(userName) then 
                local accountAdded = addAccount(userName, passWord) 
                if accountAdded then 
                    exports.TopBarChat:sendClientMessage("You have successfully registered!, you can now login with your username and password.", source, 0, 255, 50) 
                    setAccountData(accountAdded, "reg-Serial", serial) 
                else 
                    exports.TopBarChat:sendClientMessage("Error creating account, please contact the admin.", source, 255, 0, 50) 
                end 
            else 
                exports.TopBarChat:sendClientMessage("Account with this name already exists!", source, 255, 0, 0) 
            end 
        else 
            exports.TopBarChat:sendClientMessage("You can register up to 3 accounts only!", source, 255, 0, 0) 
        end 
    end 
end) 
  
function TotalAccounts(serial) 
    aCount = 0 
    for i, account in ipairs(getAccounts()) do 
        local accSerial = getAccountData(account, "reg-Serial") 
        if accSerial and accSerial == serial then 
            aCount = aCount + 1 
        end 
    end 
    return aCount 
end 
  
  
-----------------------------------|Medic|----------------------------------- 
addEvent("healP", true ) 
addEventHandler("healP", root, 
function(healer) 
    local Health = getElementHealth(source) 
    if (Health < 99) then 
        local hp = 2*Health 
        if getPlayerMoney(source) >= hp then 
            setElementHealth(source, Health+15) 
            givePlayerMoney(healer, hp) 
            takePlayerMoney(source, hp) 
            exports.TopBarChat:sendClientMessage("You earned $"..hp, healer, 0, 255, 0) 
        end 
    end 
end) 
-----------------------------------|Medic|----------------------------------- 

Link to comment
setTeamFriendlyFire(createTeam("Grove",   0, 500, 0   ), false) 
setTeamFriendlyFire(createTeam("Vagos",   255, 200, 0 ), false) 
setTeamFriendlyFire(createTeam("Ballas",   128, 0, 128), false) 
setTeamFriendlyFire(createTeam("Mafia",   154,205,50  ), false) 
setTeamFriendlyFire(createTeam("Russians",   160,82,45), false) 
setTeamFriendlyFire(createTeam("Triads",   104,104,104), false) 
setTeamFriendlyFire(createTeam("Rifa",    250,128,114 ), false) 
setTeamFriendlyFire(createTeam("Street",    250,128,0 ), false) 
setTeamFriendlyFire(createTeam("Aztecas", 24, 198, 238), false) 
setTeamFriendlyFire(createTeam("Medic",  24, 255, 255 ), false) 
setTeamFriendlyFire(createTeam("Police",    0, 0, 255 ), false) 
createTeam("No Team", 255, 255, 255) 
  
  
  
addEvent("spawnMe", true) 
addEventHandler("spawnMe", root, 
function(skinID, sX, sY, sZ, sR, team) 
    local team = getTeamFromName(team) 
    spawnPlayer(source, sX, sY, sZ, sR, skinID, 0, 0, team) 
    setCameraTarget(source) 
    showChat(source, true) 
end) 
  
addEventHandler("onPlayerSpawn", root, 
function(_, _, _, _, team) 
    local team = team and getTeamName(team) or "N/A" 
    if team == "Police" then 
        giveWeapon(source, 3, 1) 
        takeWeapon(source, 41) 
    elseif team == "Medic" then 
        giveWeapon(source, 41, 9999) 
        takeWeapon(source, 3) 
    else 
        takeWeapon(source, 3) 
        takeWeapon(source, 41) 
    end 
    local account = getPlayerAccount(source) 
    if account and not isGuestAccount(account) then 
        local wData = getAccountData(account, "newPlayerData")  
        if not wData then 
            givePlayerMoney(source, 2500) 
            giveWeapon(source, 23, 20) 
            giveWeapon(source, 31, 50) 
            setAccountData(account, "newPlayerData", true)  
        end 
    end 
end) 
  
  
addEvent("Login-Register", true) 
addEventHandler("Login-Register", root, 
function(action, userName, passWord) 
    if (action == "Login") then 
        local account = getAccount(userName, passWord) 
        if account then 
            logIn(source, account, passWord) 
  
            triggerClientEvent(source, "onLoginSuccess", source) 
  
        else 
  
            exports.TopBarChat:sendClientMessage ("Wrong username or password!", source, 255, 255, 0) 
  
        triggerClientEvent(source, "wrongPass", source) -- اذا الباس او الاسم خطأ نسوي ترايقر . 
         
        end 
  
    elseif (action == "Register") then 
  
        local serial = getPlayerSerial(source) 
  
        local TotalAcc = TotalAccounts(serial) or 0 
  
        if TotalAcc < 3 then 
  
            if not getAccount(userName) then 
  
                local accountAdded = addAccount(userName, passWord) 
                if accountAdded then 
                    exports.TopBarChat:sendClientMessage("You have successfully registered!, you can now login with your username and password.", source, 0, 255, 50) 
                    setAccountData(accountAdded, "reg-Serial", serial) 
                else 
                    exports.TopBarChat:sendClientMessage("Error creating account, please contact the admin.", source, 255, 0, 50) 
                end 
            else 
                exports.TopBarChat:sendClientMessage("Account with this name already exists!", source, 255, 0, 0) 
            end 
        else 
            exports.TopBarChat:sendClientMessage("You can register up to 3 accounts only!", source, 255, 0, 0) 
        end 
    end 
end) 
  
function TotalAccounts(serial) 
    aCount = 0 
    for i, account in ipairs(getAccounts()) do 
        local accSerial = getAccountData(account, "reg-Serial") 
        if accSerial and accSerial == serial then 
            aCount = aCount + 1 
        end 
    end 
    return aCount 
end 
  
  
-----------------------------------|Medic|----------------------------------- 
addEvent("healP", true ) 
addEventHandler("healP", root, 
function(healer) 
    local Health = getElementHealth(source) 
    if (Health < 99) then 
        local hp = 2*Health 
        if getPlayerMoney(source) >= hp then 
            setElementHealth(source, Health+15) 
            givePlayerMoney(healer, hp) 
            takePlayerMoney(source, hp) 
            exports.TopBarChat:sendClientMessage("You earned $"..hp, healer, 0, 255, 0) 
        end 
    end 
end) 
-----------------------------------|Medic|----------------------------------- 

استبدل كود السيرفر بالكود الي فوق

وسوي ليبل على اللوحه بالمكان الي تبي

وحط في الكلينت هذا الكود

  
local wrongPassLabel = اسم الليبل 
-- ضروري تحط اسم الليبل الي سويته 
-- Label = guiCreateLabel(...) 
-- local wrongPassLabel = Label 
  
addEvent("wrongPass", true) 
  
addEventHandler("wrongPass", root, function() 
  
guiSetText("الكلام الي تبيه ينحط بالليبل", wrongPassLabel) 
  
end ) 
  

Link to comment
guiSetText("الكلام الي تبيه ينحط بالليبل", wrongPassLabel) 

اسم الليبل يجي قبل الكلام

guiSetText(wrongPassLabel, "الكلام الي تبيه ينحط بالليبل") 

JV8ZDQs.png

وانا مثل الاهبل اروح على الالمنت حق الجيو نفسه ادور بالفنكشنات عن شي يغير النص

شكرا تابل

Link to comment
guiSetText("الكلام الي تبيه ينحط بالليبل", wrongPassLabel) 

اسم الليبل يجي قبل الكلام

guiSetText(wrongPassLabel, "الكلام الي تبيه ينحط بالليبل") 

JV8ZDQs.png

وانا مثل الاهبل اروح على الالمنت حق الجيو نفسه ادور بالفنكشنات عن شي يغير النص

شكرا تابل

:lol::lol:

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