Jump to content

السلام عليكم طلب فنكشات


Recommended Posts

السلام عليكم الحين انا مسوي لوحه فيها ازرار تعطي كيك وباند وسياره وتنتقل لشخص

واعطاء اسلحه

واعطاء فلوس

لو الاكواد بلوحه الادمنيهه قولو ب السطر الكم او جيبوها

aWarpForm = nil

function aPlayerWarp ( player )
	if ( aWarpForm == nil ) then
		local x, y = guiGetScreenSize()
		aWarpForm		= guiCreateWindow ( x / 2 - 110, y / 2 - 150, 200, 300, "Player Warp Management", false )
		aWarpList		= guiCreateGridList ( 0.03, 0.08, 0.94, 0.73, true, aWarpForm )
					   guiGridListAddColumn( aWarpList, "Player", 0.9 )
		aWarpSelect		= guiCreateButton ( 0.03, 0.82, 0.94, 0.075, "Select", true, aWarpForm )
		aWarpCancel		= guiCreateButton ( 0.03, 0.90, 0.94, 0.075, "Cancel", true, aWarpForm )

		addEventHandler ( "onClientGUIDoubleClick", aWarpForm, aClientWarpDoubleClick )
		addEventHandler ( "onClientGUIClick", aWarpForm, aClientWarpClick )
		--Register With Admin Form
		aRegister ( "PlayerWarp", aWarpForm, aPlayerWarp, aPlayerWarpClose )
	end
	aWarpSelectPointer = player
	guiGridListClear ( aWarpList )
	for id, player in ipairs ( getElementsByType ( "player" ) ) do
		guiGridListSetItemPlayerName ( aWarpList, guiGridListAddRow ( aWarpList ), 1, getPlayerName ( player ), false, false )
	end
	guiSetVisible ( aWarpForm, true )
	guiBringToFront ( aWarpForm )
end

function aPlayerWarpClose ( destroy )
	if ( ( destroy ) or ( aPerformanceWarp and guiCheckBoxGetSelected ( aPerformanceWarp ) ) ) then
		if ( aWarpForm ) then
			removeEventHandler ( "onClientGUIDoubleClick", aWarpForm, aClientWarpDoubleClick )
			removeEventHandler ( "onClientGUIClick", aWarpForm, aClientWarpClick )
			destroyElement ( aWarpForm )
			aWarpForm = nil
		end
	else
		guiSetVisible ( aWarpForm, false )
	end
end

function aClientWarpDoubleClick ( button )
	if ( button == "left" ) then
		if ( source == aWarpList ) then
			if ( guiGridListGetSelectedItem ( aWarpList ) ~= -1 ) then
				triggerServerEvent ( "aPlayer", getLocalPlayer(), aWarpSelectPointer, "warpto", getPlayerFromNick ( guiGridListGetItemPlayerName ( aWarpList, guiGridListGetSelectedItem ( aWarpList ), 1 ) ) )
				aPlayerWarpClose ( false )
			end
		end
	end
end

function aClientWarpClick ( button )
	if ( button == "left" ) then
		if ( source == aWarpSelect ) then
			if ( guiGridListGetSelectedItem ( aWarpList ) ~= -1 ) then
				triggerServerEvent ( "aPlayer", getLocalPlayer(), aWarpSelectPointer, "warpto", getPlayerFromNick ( guiGridListGetItemPlayerName ( aWarpList, guiGridListGetSelectedItem ( aWarpList ), 1 ) ) )
				aPlayerWarpClose ( false )
			end
		elseif ( source == aWarpCancel ) then
			aPlayerWarpClose ( false )
		end
	end
end

كود الوراب صحيح او لا؟

Link to comment
addEventHandler + "onClientGUIClick"
triggerServerEvent
-- Server
kickPlayer
banPlayer
giveWeapon
givePlayerMoney
createVehicle
getElementPosition
setElementPosition

رباط الويكي تجيب منه الامثله :

https://wiki.multitheftauto.com/wiki/Main_Page

لا تنسي تضيف المود لقروب الادمن

resource.namemode

عشان الكيك , والبان ,

Edited by Deativated
Link to comment

الدي بق يقلي ارقمنت حق ال guiGetVisible 

في من سطر 78

الي سطر 85

الي هم 

if (guiGetVisible(aWarpForm) == false ) then
            guiSetVisible(system_1,false)
			showCursor(false)
			guiSetInputEnabled(false)
	end
	guiSetVisible( aWarpForm ,not guiGetVisible( aWarpForm ))
	showCursor(guiGetVisible( aWarpForm ))
	guiSetInputEnabled(guiGetVisible( aWarpForm ))

 

Link to comment
3 minutes ago, #AL-J7EEEM said:

الدي بق يقلي ارقمنت حق ال guiGetVisible 

في من سطر 78

الي سطر 85

الي هم 


if (guiGetVisible(aWarpForm) == false ) then
            guiSetVisible(system_1,false)
			showCursor(false)
			guiSetInputEnabled(false)
	end
	guiSetVisible( aWarpForm ,not guiGetVisible( aWarpForm ))
	showCursor(guiGetVisible( aWarpForm ))
	guiSetInputEnabled(guiGetVisible( aWarpForm ))

 

ممكن اعرف وش تبي تسوي ؟

Link to comment
4 hours ago, Deativated said:

addEventHandler + "onClientGUIClick"triggerServerEvent-- ServerkickPlayerbanPlayergiveWeapongivePlayerMoneycreateVehiclegetElementPositionsetElementPosition

رباط الويكي تجيب منه الامثله :

https://wiki.multitheftauto.com/wiki/Main_Page

لا تنسي تضيف المود لقروب الادمن

resource.namemode

عشان الكيك , والبان ,

×××××××××××××××××××××××××××××××××××××××××××××××

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