Jump to content

تصحيح كود


Recommended Posts

وش الخطأ هنا

سيرفر

    local sValue = getElementData( source,'PlayTime' ) 
    if not sValue then sValue = '0:0:0' end 
    local data = split(sValue,':') 
    local hour = tonumber( data[1] )   
        local Name = getPlayerName(source)
    if hour == nil or not tonumber(hour) then hour = 0 end 
    if ( hour >= tonumber(Price))  then 
-------------------Money-------------------------------
if money == nil or not tonumber(money) then money = 0 end 
    if ( money >= tonumber(money))  then 

كلنت

xMainFunctions_ = function ( )
 local row, col = guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) 
local Group = tostring ( guiGridListGetItemText(GUIEditor.gridlist[1],row,1 ));
local Price = tostring ( guiGridListGetItemText(GUIEditor.gridlist[1],row,2 ));
local money = tostring ( guiGridListGetItemText(GUIEditor.gridlist[1],row,3 ));
   if ( row and col and row ~= -1 and col ~= -1 ) then

الفكرة

يشتري رتب بفلوس وساعات

الساعات شغالة بس نبي تصحيح للفلوس

وشكرا 

Edited by No_name
Link to comment
------------------Client--------------------------

local row, col = guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) 
local Group = tostring ( guiGridListGetItemText(GUIEditor.gridlist[1],row,1 ));
local Price = tonumber ( guiGridListGetItemText(GUIEditor.gridlist[1],row,2 )); -- عدلت تو سترنج
local money = tonumber ( guiGridListGetItemText(GUIEditor.gridlist[1],row,3 )); -- نفس الكلام
if ( row and col and row ~= -1 and col ~= -1 ) then
triggerServerEvent("gettherank",localPlayer,Group,Price,money)
------------------Server--------------------------
addEvent("gettherank",true)
addEventHandler("gettherank",root,
function ( Group,Price,money )
local mo = getPlayerMoney(source)
if (mo >= tonumber(money)) then
takePlayerMoney ( source, tonumber(money) )
end
end
)

 

Edited by [T]|O|[P]George
  • Thanks 1
  • Haha 1
Link to comment
        local sValue = getElementData( source,'PlayTime' ) 
        if not sValue then sValue = '0:0:0' end 
        local data = split(sValue,':') 
        local hour = tonumber( data[1] )   
            local Name = getPlayerName(source)
			local money = getPlayerMoney(source)
        if hour == nil or not tonumber(hour) then hour = 0 end 
        if ( hour >= tonumber(Price))  then 
    -------------------Money-------------------------------
    if money == nil or not tonumber(money) then money = 0 end 
        if ( money >= tonumber(PriceM))  then 

حق جورج كمان شغال

  • Like 1
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...