صح ؟؟
كلنت
GUIEditor = {
button = {},
edit = {}
}
هنا لوحه حقتي
addEventHandler( "onClientGUIClick", resourceRoot, function( )
if ( source == GUIEditor.button[1] ) then
setElementData( localPlayer, 'Datafix',
end
end )
سيرفر
function fix ( player )
if ( getElementData(player,'Datafix') ) then
addCommandHandler ( "fix",
function ( plr )
local rPlayer = getRandomPlayer ( );
local rVehicle = getPedOccupiedVehicle ( rPlayer );
if rVehicle then
if getElementHealth ( rVehicle ) < 1000 then
fixVehicle ( rVehicle );
givePlayerMoney ( plr, 500 );
end
end
end
);