Jump to content

طلب تصحيح كود


XPro

Recommended Posts

الكودين هما

function ConvitePlayer ( inviter, key,key2, playername ) 
if key2 == "convite" then 
local group = getPlayerTeam (inviter) 
local NameTeam = getTeamName (group) 
local theplayer = getPlayerFromNick (playername) or getElementByID (playername) 
if theplayer then 
setElementData(theplayer,"invited",true) 
getElementData(inviter,"groupName",group) 
        outputChatBox ( "* You Have Invited To Team "..NameTeam.."!!", theplayer, 255, 0, 0, true ) 
        else 
        outputChatBox ( "* There is No Player Whit This Name", inviter, 255, 0, 0, true ) 
end 
end 
end 
addCommandHandler ( "gang", ConvitePlayer ) 

function AcceptInvitation ( source, key,key2,group ) 
if key2 == "accept"  and  getElementData(source,"invited") == true then 
local group = getElementData(inviter,"groupName",group) 
setPlayerTeam (source,group) 
        outputChatBox ( "* Work ", root, 255, 0, 0, true ) 
        else 
        outputChatBox ( "* Not Work", root, 255, 0, 0, true ) 
end 
end 
addCommandHandler ( "gang", AcceptInvitation ) 

:x

ابيها لما يقبل من اف8 يدخل التيم الي ارسلو

ارجو تصحيح الاخطاء او الاشارة اليها و شكرا

Edited by Guest
Link to comment

function AcceptInvitation ( p_, key,key2,group ) 
if key2 == "accept"  and  getElementData(p_,"invited") == true then 
local group = getElementData(p_,"groupName",group) 
setPlayerTeam (p_,group) 
        outputChatBox ( "* Work ", root, 255, 0, 0, true ) 
        else 
        outputChatBox ( "* Not Work", root, 255, 0, 0, true ) 
end 
end 
addCommandHandler ( "gang", AcceptInvitation ) 
Link to comment

خله كذا :

function ConvitePlayer ( inviter, key,key2, playername ) 
if key2 == "convite" then 
local group = getPlayerTeam (inviter) 
local NameTeam = getTeamName (group) 
local theplayer = getPlayerFromNick (playername) or getElementByID (playername) 
if theplayer then 
setElementData(theplayer,"invited",true) 
getElementData(theplayer,"groupName",group) 
        outputChatBox ( "* You Have Invited To Team "..NameTeam.."!!", theplayer, 255, 0, 0, true ) 
        else 
        outputChatBox ( "* There is No Player Whit This Name", inviter, 255, 0, 0, true ) 
end 
end 
end 
addCommandHandler ( "gang", ConvitePlayer ) 
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...