Doffy Posted February 28, 2017 Posted February 28, 2017 ابي اول ما اللاعب يختار الرو من الي في الايديهات الي في الجدول ويضغط علي زر الشراء يعطيه سيارة وياخذ منه فلوس --Client function buyV() local sel = guiGridListGetSelectedItem (BuyCars.gridlist[1]) if sel ~= -1 and source == takecar then local cost = guiGridListGetItemText (BuyCars.gridlist[1],sel,2) local id = guiGridListGetItemData (BuyCars.gridlist[1],sel,1) if getPlayerMoney() <= tonumber(cost) then return outputChatBox ("Sorry, you don't have enough money.",255,0,0) end triggerServerEvent ("Vehicle",localPlayer,id,cost) triggerEvent ("whenPlayerBuyVehicle",localPlayer) guiSetVisible(wnd,false) showCursor(false) end end --Server s={} addEvent ("Vehicle",true) addEventHandler ("Vehicle",root, function (id,price) takePlayerMoney (source,price) if isElement(s[source]) then destroyElement(s[source]) end s[source] = createVehicle (id,getElementPosition(source)) warpPedIntoVehicle (source,s[source]) end)
iMr.WiFi..! Posted February 28, 2017 Posted February 28, 2017 نسيت تضيف الحدث السطر العشرين امسح getElementPosition وعرفها x,y,z = getElementPosition x,y,z حطه بدل getElementPosition في السطر 20 وسوي بدل triggerEvent حطه triggerServerEvent Experienced MTA developer for 4 years. | MTA خبرة 4 سنين في برمجة ليس عليك اسعاد الجميع , ولكن عليك بإن لا تؤذي أحداً =========You do not have to make everyone happy, But you should not hurt anyone Want to contact with me? Discord: JustCarry#2616 (Always there)Skype: Live:JustCarry10 (Not always)
Doffy Posted February 28, 2017 Author Posted February 28, 2017 13 minutes ago, iMr.WiFi..! said: نسيت تضيف الحدث السطر العشرين امسح getElementPosition وعرفها x,y,z = getElementPosition x,y,z حطه بدل getElementPosition في السطر 20 وسوي بدل triggerEvent حطه triggerServerEvent ما نفع --ServerSide x,y,z = getElementPosition s={} addEvent ("Vehicle",true) addEventHandler ("Vehicle",root, function (id,price) takePlayerMoney (source,price) if isElement(s[source]) then destroyElement(s[source]) end s[source] = createVehicle (id,x,y,z(source)) warpPedIntoVehicle (source,s[source]) end) --ClientSide function buyV() local sel = guiGridListGetSelectedItem (BuyCars.gridlist[1]) if sel ~= -1 and source == takecar then local cost = guiGridListGetItemText (BuyCars.gridlist[1],sel,2) local id = guiGridListGetItemData (BuyCars.gridlist[1],sel,1) if getPlayerMoney() <= tonumber(cost) then return outputChatBox ("Sorry, you don't have enough money.",255,0,0) end triggerServerEvent ("Vehicle",localPlayer,id,cost) triggerServerEvent ("whenPlayerBuyVehicle",localPlayer) guiSetVisible(wnd,false) showCursor(false) end end takecar للمعلومة الي هو الزر حق الشراء
iMr.WiFi..! Posted February 28, 2017 Posted February 28, 2017 --ServerSide s = { } addEvent ("Vehicle",true) addEventHandler ("Vehicle",root, function (id,price) takePlayerMoney (source,price) if isElement(s[source]) then return destroyElement(s[source]) end x,y,z = getElementPosition(source) s[source] = createVehicle (id,x,y,z) warpPedIntoVehicle (source,s[source]) end) --ClientSide function buyV() local sel = guiGridListGetSelectedItem (BuyCars.gridlist[1]) if sel ~= -1 and source == takecar then local cost = guiGridListGetItemText (BuyCars.gridlist[1],sel,2) local id = guiGridListGetItemData (BuyCars.gridlist[1],sel,1) if getPlayerMoney() < tonumber(cost) then return outputChatBox ("Sorry, you don't have enough money.",255,0,0) end triggerServerEvent ("Vehicle",localPlayer,id,cost) --triggerServerEvent ("whenPlayerBuyVehicle",localPlayer) guiSetVisible(wnd,false) showCursor(false) end end addEventHandler("onClientGUIClick",root,buyV) Experienced MTA developer for 4 years. | MTA خبرة 4 سنين في برمجة ليس عليك اسعاد الجميع , ولكن عليك بإن لا تؤذي أحداً =========You do not have to make everyone happy, But you should not hurt anyone Want to contact with me? Discord: JustCarry#2616 (Always there)Skype: Live:JustCarry10 (Not always)
^iiEcoo'x_) Posted February 28, 2017 Posted February 28, 2017 6 hours ago, iMr.WiFi..! said: --ServerSide s = { } addEvent ("Vehicle",true) addEventHandler ("Vehicle",root, function (id,price) takePlayerMoney (source,price) if isElement(s[source]) then return destroyElement(s[source]) end x,y,z = getElementPosition(source) s[source] = createVehicle (id,x,y,z) warpPedIntoVehicle (source,s[source]) end) --ClientSide function buyV() local sel = guiGridListGetSelectedItem (BuyCars.gridlist[1]) if sel ~= -1 and source == takecar then local cost = guiGridListGetItemText (BuyCars.gridlist[1],sel,2) local id = guiGridListGetItemData (BuyCars.gridlist[1],sel,1) if getPlayerMoney() < tonumber(cost) then return outputChatBox ("Sorry, you don't have enough money.",255,0,0) end triggerServerEvent ("Vehicle",localPlayer,id,cost) --triggerServerEvent ("whenPlayerBuyVehicle",localPlayer) guiSetVisible(wnd,false) showCursor(false) end end addEventHandler("onClientGUIClick",root,buyV) عندك خطا صديقي بسطر 7 بدآل price cost - Hashemite Kingdom Of Jordan -
iMr.WiFi..! Posted March 1, 2017 Posted March 1, 2017 15 hours ago, #_iMr.[E]coo said: عندك خطا صديقي بسطر 7 بدآل price cost تقدر تغير الاسم بعد الاستقبال يعني مو لازم يمشي نفس الاسم Experienced MTA developer for 4 years. | MTA خبرة 4 سنين في برمجة ليس عليك اسعاد الجميع , ولكن عليك بإن لا تؤذي أحداً =========You do not have to make everyone happy, But you should not hurt anyone Want to contact with me? Discord: JustCarry#2616 (Always there)Skype: Live:JustCarry10 (Not always)
^iiEcoo'x_) Posted March 1, 2017 Posted March 1, 2017 1 hour ago, iMr.WiFi..! said: تقدر تغير الاسم بعد الاستقبال يعني مو لازم يمشي نفس الاسم لا ي صديقي , يطلع خطا , لو تعرفه بعد الاستقبال لازم :- triggerServerEvent ("Vehicle",localPlayer,id,guiGridListGetItemText (BuyCars.gridlist[1],sel,2)) - Hashemite Kingdom Of Jordan -
Master_MTA Posted March 2, 2017 Posted March 2, 2017 On ١/٣/٢٠١٧ at 15:30, #_iMr.[E]coo said: لا ي صديقي , يطلع خطا , لو تعرفه بعد الاستقبال لازم :- triggerServerEvent ("Vehicle",localPlayer,id,guiGridListGetItemText (BuyCars.gridlist[1],sel,2)) كلام الاخ وايفاي صحيح اهم شي يكون باي بارتمر حسب الرقم اللي سوا فيه تراقر وبكيفك تغير الاسم مافي مشاكل 1 Skype : 01100001 01101100 01101001 01011111 01101101 01110100 00110001 00111001 00111001 00111001 every thing is gonna be alright every thing is gonna be okay it's gonna be a good good life that's what my therapist say
Dr.Marco Posted March 2, 2017 Posted March 2, 2017 كما قال لك الاخ وايفاي Signature removed by administrator due to large images
^iiEcoo'x_) Posted March 2, 2017 Posted March 2, 2017 5 hours ago, Master_MTA said: كلام الاخ وايفاي صحيح اهم شي يكون باي بارتمر حسب الرقم اللي سوا فيه تراقر وبكيفك تغير الاسم مافي مشاكل ما كنت اعرف 1 - Hashemite Kingdom Of Jordan -
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now