iMr ~ MnHmAr Posted October 6, 2016 Posted October 6, 2016 اريد فانكشنات اذا مات الاعب يحفظ اسلحته و يرجعه له و كل مايموت يجيب الاسلحه ويديه ياه
iPrestege Posted October 6, 2016 Posted October 6, 2016 addEventHandler ( 'onPlayerWasted' ) addEventHandler ( 'onPlayerSpawn' ) getPedWeapon getPedTotalAmmo giveWeapon table
iMr ~ MnHmAr Posted October 6, 2016 Author Posted October 6, 2016 مشكور اخوي برستيج طيب انا ما ابي اسوي موضوع بس بستفسر استفسار الان انا مسوي مود بي قاعدة بيانات مثل انا ضرب زر و ضافني لقاعدة البيانات طيب لو اضرب الزر مره ثانيه يضيفني ثاني طيب لو ابي اسوي تحقق اذا كان سريال الاعب في القاعده مايضيفه كيف اسويها
iPrestege Posted October 6, 2016 Posted October 6, 2016 (edited) سوي تحقق انة السريال موجود او لا مثل كذا : local serial = getPlayerSerial ( player ) local result = executeSQLQuery ( 'SELECT * FROM `TABLE` WHERE serial=?',serial ) if ( type ( result ) == "table" and #result == 0 or not result ) then executeSQLQuery ( "INSERT INTO `TABLE` ( serial,pSerial ) VALUES(?,?)",serial,serial ) else return outputDebugString ( 'The Player '..getPlayerName ( player)..' is already added to the database!',1 ) end Edited October 6, 2016 by FaHaD Mistake
iMr ~ MnHmAr Posted October 6, 2016 Author Posted October 6, 2016 Just now, FaHaD said: سوي تحقق انة السريال موجود او لا مثل كذا : local serial = getPlayerSerial ( player ) local result = executeSQLQuery ( 'SELECT * FROM `TABLE` WHERE serial=?',serial ) if ( type ( result ) == "table" and #result == 0 or not result ) then executeSQLQuery ( "INSERT INTO `TABLE` ( serial,pSerial ) VALUES(?,?)",serial,serial ) else return outputDebugString ( 'The Player '..getPlayerName ( player)..' is already added to the database!',1 ) end مشكور اخوي برستيج
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