Jump to content

كود بسيط


Recommended Posts

7 minutes ago, KhaledAlamri said:

وين مود الساعات اللي تستعمله ؟

شوي اجيبه بس خدلك ضيافة الأكواد هادي ماعمتصير كانت شغالة بس ضفتلها يجيب اسم الاعب ويطلع في الدي بق السطر 3 فيه مشكلة

 

xAddToGroupFunction_ = function ( Group,Price,Name )
    local account = getAccountName(getPlayerAccount(source));
    local PlayerName = getPlayerName(getLocalPlayer())
    if isGuestAccount(getPlayerAccount(source)) then return outputChatBox("اَ",source,255,0,0,true); end
    if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("",source,255,0,0,true); end
	if isObjectInACLGroup("user."..account, aclGetGroup(exAdmin)) then return outputChatBox(" ",source,255,0,0,true); end
	local sValue = getElementData( source,'PlayTime' )
	if not sValue then sValue = '0:0:0' end
	local data = split(sValue,':')
	local hour = tonumber( data[1] )  
	if hour == nil or not tonumber(hour) then hour = 0 end
	if ( hour >= tonumber(Price))  then
		removeGroups ( source )
		aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account);
exports.guimessages:outputServer( root,..Name.. "بشراء رتبة ~[" ..PlayerName.. "]~ |  #ffffff*قام الاعب ",source,0,255,0,true);

 

15 minutes ago, KhaledAlamri said:

وين مود الساعات اللي تستعمله ؟

-- Server Side : 
--[[ 
------------------------------------------------- 
original script 
credits to Yakuza.Real and solidsnake and kenix 
viewtopic.php?f=91&t=40132 
  
------------------------------------------------- 
  
booo just fix it 
Mr.Pres[T]ege : 
  
Remake the script using ( SQL ) To Save it . 
  PlayTime
]] 
exports.scoreboard:addScoreboardColumn('PlayTime') 

 

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