Search the Community
Showing results for tags 'كود خطا'.
-
executeSQLQuery("CREATE TABLE IF NOT EXISTS `player_stats` (`username` TEXT, `Thirst` INT, `Hunger` INT)") addEventHandler("onPlayerQuit", function (Player) local atsh = getElementData(source, "Thirst") local hungry = getElementData(source, "Hunger") local username = getAccountName(getPlayerAccount(thePlayer)) local result = executeSQLQuery("SELECT * FROM player_stats WHERE `username` = ?", username) if (#result > 1) then executeSQLQuery("UPDATE `player_stats` SET `Hunger` = ?, `Thirst` = ? WHERE `username` = ?", hungry, atsh, username) else executeSQLQuery("INSERT INTO health (username, Thirst, Hunger) VALUES (?, ?, ?)", username, atsh, hungry) end end) addEventHandler("onPlayerLogin", root, function(_, account) local accountName = getAccountName(account) local result = executeSQLQuery("SELECT * FROM player_stats WHERE username = ?", accountName) if (#result > 1) then setElementData(source, "Thirst", result[1].Thirst) setElementData(source, "Hunger", result[1].Hunger) end end) it isn't working please help
-
addEvent ( "Take:Vehiclee", true) addEventHandler( "Take:Vehiclee",root, function ( ) x,y,z = getElementPosition ( source ) destroyElement(getPedOccupiedVehicle(source)) Vehicle[source] = createVehicle ( 502, x, y, z ) warpPedIntoVehicle ( source, Vehicle[source] ) outputChatBox( "* Done you give Car.",source,0,255,0,true) end ) السلام عليكم -- في لوحة اعطاء سيارة عندما اضغط علي الزر يسحب السياره الاولي ويعطيني سياره الكود شغال مافيه مشاكل والسياره تظهر عندي واقدر اتحرك بها لكن الشخص الثاني ( من جهاز اخخر ) يشوفني اتحرك بشخصيتي ( بدون سيارة ) فا وش المشكلة هنا ؟