Jump to content

طلب كود


Recommended Posts

function chatBox(plr,mezo) 
outputChatBox(plr.."has Slapped By "..getPlayerName (source).."Reason:"..mezo, 255, 0, 0, false) 
end 
addEvent("ChatBox_playerHaveSlap", true) 
addEventHandler("ChatBox_playerHaveSlap", root, chatBox) 

#Client Side

addEventHandler("onClientGUIClick",root, 
function ( ) 
if ( source == SlapButton ) then 
if ( guiGridListGetSelectedItem(pList ) ~= -1 ) then 
local plr = guiGridListGetItemText(pList ,guiGridListGetSelectedItem(pList ),1) 
local myPlayer = getPlayerFromName ( plr ) 
local mezo = guiGetText ( Edit ) -- اسم الايديت 
triggerServerEvent("ChatBox_playerHaveSlap", localPlayer,  plr, mezo) 
setElementHealth(myPlayer, 0, true) 
guiSetVisible(SlapWnd,false) 
guiSetInputEnabled(false) 
showCursor(false) 
end 
end 
end 
) 

Link to comment
addEventHandler("onClientGUIClick",root, 
function ( ) 
if ( source == SlapButton ) then 
if ( guiGridListGetSelectedItem(pList ) ~= -1 ) then 
local plr = guiGridListGetItemText(pList ,guiGridListGetSelectedItem(pList ),1) 
local myPlayer = getPlayerFromName ( plr ) 
local mezo = guiGetText ( Edit ) 
triggerServerEvent("ChatBox_playerHaveSlap", resourceRoot, plr, mezo) 
setElementHealth(myPlayer, 0, true) 
guiSetVisible(SlapWnd,false) 
guiSetInputEnabled(false) 
showCursor(false) 
end 
end 
end 
) 

العيب من ال

Server Side

على حسب ما بيقول الدي بق

Link to comment
addEventHandler("onClientGUIClick",root, 
function ( ) 
if ( source == SlapButton ) then 
if ( guiGridListGetSelectedItem(pList ) ~= -1 ) then 
local plr = guiGridListGetItemText(pList ,guiGridListGetSelectedItem(pList ),1) 
local myPlayer = getPlayerFromName ( plr ) 
local mezo = guiGetText ( Edit ) 
triggerServerEvent("ChatBox_playerHaveSlap", resourceRoot, plr, mezo) 
setElementHealth(myPlayer, 0, true) 
guiSetVisible(SlapWnd,false) 
guiSetInputEnabled(false) 
showCursor(false) 
end 
end 
end 
) 

العيب من ال

Server Side

على حسب ما بيقول الدي بق

عدلت الكود فوق

ووريني وش يقول الدي بق

Link to comment

شوف

لما يكون الكود كدا :

addEventHandler("onClientGUIClick",root, 
function ( ) 
if ( source == SlapButton ) then 
if ( guiGridListGetSelectedItem(pList ) ~= -1 ) then 
local plr = guiGridListGetItemText(pList ,guiGridListGetSelectedItem(pList ),1) 
local myPlayer = getPlayerFromName ( plr ) 
local mezo = guiGetText ( Edit ) -- اسم الايديت 
triggerServerEvent("ChatBox_playerHaveSlap", resourceRoot,  plr, mezo) 
setElementHealth(myPlayer, 0, true) 
guiSetVisible(SlapWnd,false) 
guiSetInputEnabled(false) 
showCursor(false) 
end 
end 
end 
) 

بيقول

ERROR : Police\Server.lua:33: attempt to concatenate a boolean value

Link to comment

# Server :

addEvent("slap",true) 
addEventHandler("slap",root, 
function (plr,reasons) 
outputChatBox(plr.." Has Slapped By "..getPlayerName (source).." Reason : "..reasons,source, 255, 0, 0, false) 
end 

# Client :

addEventHandler("onClientGUIClick",root, 
function ( ) 
if ( source == SlapButton ) then 
if ( guiGridListGetSelectedItem(pList ) ~= -1 ) then 
local plr = guiGridListGetItemText(pList ,guiGridListGetSelectedItem(pList ),1) 
local player = getPlayerFromName ( plr ) 
local reasons = guiGetText ( Edit ) -- اسم الايديت 
triggerServerEvent("slap", root, plr, reasons) 
setElementHealth(player, 0) 
guiSetVisible(SlapWnd,false) 
guiSetInputEnabled(false) 
showCursor(false) 
end 
end 
end 
) 

Link to comment
# Server :
addEvent("slap",true) 
addEventHandler("slap",root, 
function (plr,reasons) 
outputChatBox(plr.." Has Slapped By "..getPlayerName (source).." Reason : "..reasons,source, 255, 0, 0, false) 
end 

# Client :

addEventHandler("onClientGUIClick",root, 
function ( ) 
if ( source == SlapButton ) then 
if ( guiGridListGetSelectedItem(pList ) ~= -1 ) then 
local plr = guiGridListGetItemText(pList ,guiGridListGetSelectedItem(pList ),1) 
local player = getPlayerFromName ( plr ) 
local reasons = guiGetText ( Edit ) -- اسم الايديت 
triggerServerEvent("slap", root, plr, reasons) 
setElementHealth(player, 0) 
guiSetVisible(SlapWnd,false) 
guiSetInputEnabled(false) 
showCursor(false) 
end 
end 
end 
) 

بالكلنت مسوي التريقر root ?????

بدلها بلوكل بلاير

Link to comment

# Server :

addEvent("slap",true) 
addEventHandler("slap",root, 
function (plr,reasons) 
outputChatBox(plr.." Has Slapped By "..getPlayerName (source).." Reason : "..reasons,source, 255, 0, 0, false) 
end 

# Client :

addEventHandler("onClientGUIClick",root, 
function ( ) 
if ( source == SlapButton ) then 
if ( guiGridListGetSelectedItem(pList ) ~= -1 ) then 
local plr = guiGridListGetItemText(pList ,guiGridListGetSelectedItem(pList ),1) 
local player = getPlayerFromName ( plr ) 
local reasons = guiGetText ( Edit ) -- اسم الايديت 
triggerServerEvent("slap", localPlayer, plr, reasons) 
setElementHealth(player, 0) 
guiSetVisible(SlapWnd,false) 
guiSetInputEnabled(false) 
showCursor(false) 
end 
end 
end 
) 

^ جرب الحين ، غلط ب لوكال بلاير لأني نسخت الكود سريع سريع وما عدلته

Link to comment
شوف

لما يكون الكود كدا :

addEventHandler("onClientGUIClick",root, 
function ( ) 
if ( source == SlapButton ) then 
if ( guiGridListGetSelectedItem(pList ) ~= -1 ) then 
local plr = guiGridListGetItemText(pList ,guiGridListGetSelectedItem(pList ),1) 
local myPlayer = getPlayerFromName ( plr ) 
local mezo = guiGetText ( Edit ) -- اسم الايديت 
triggerServerEvent("ChatBox_playerHaveSlap", resourceRoot,  plr, mezo) 
setElementHealth(myPlayer, 0, true) 
guiSetVisible(SlapWnd,false) 
guiSetInputEnabled(false) 
showCursor(false) 
end 
end 
end 
) 

بيقول

ERROR : Police\Server.lua:33: attempt to concatenate a boolean value

العيب من ملف السيرفر السطر رقم 33

اطرح السطر رقم 33 بملف السيرفر

Link to comment
#Server Side

')' expected (to close '(' ate line 33) near ''

الدي بق ^

شوف

لما يكون الكود كدا :

addEventHandler("onClientGUIClick",root, 
function ( ) 
if ( source == SlapButton ) then 
if ( guiGridListGetSelectedItem(pList ) ~= -1 ) then 
local plr = guiGridListGetItemText(pList ,guiGridListGetSelectedItem(pList ),1) 
local myPlayer = getPlayerFromName ( plr ) 
local mezo = guiGetText ( Edit ) -- اسم الايديت 
triggerServerEvent("ChatBox_playerHaveSlap", resourceRoot,  plr, mezo) 
setElementHealth(myPlayer, 0, true) 
guiSetVisible(SlapWnd,false) 
guiSetInputEnabled(false) 
showCursor(false) 
end 
end 
end 
) 

بيقول

ERROR : Police\Server.lua:33: attempt to concatenate a boolean value

اطرح ملف السيرفر كامل

Link to comment

# Server :

addEvent("slap",true) 
addEventHandler("slap",root, 
function (plr,reasons) 
outputChatBox(plr.." Has Slapped By "..getPlayerName (source).." Reason : "..reasons,source, 255, 0, 0, false) 
end 
) 

Link to comment
اشتغل شباب

الخطا من عند بﻻك نيكست

حاطط root بدل localPlayer

بالتوفيق

صلحت كودي وعطيته هو وجربه واشتغل ، وانت باقي تقول الخطأ عندي

:/

Link to comment

شباب الخطأ كان فى القوس الكان فى اخر الكود حق السيرفر

addEvent("slap",true) 
addEventHandler("slap",root, 
function (plr,reasons) 
outputChatBox(plr.." Has Slapped By "..getPlayerName (source).." Reason : "..reasons,source, 255, 0, 0, false) 
end 
) 

سطر 6

ما كان موجود

Link to comment
شباب الخطأ كان فى القوس الكان فى اخر الكود حق السيرفر
addEvent("slap",true) 
addEventHandler("slap",root, 
function (plr,reasons) 
outputChatBox(plr.." Has Slapped By "..getPlayerName (source).." Reason : "..reasons,source, 255, 0, 0, false) 
end 
) 

سطر 6

ما كان موجود

يب عدلته لك بعدها

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