Jump to content

iPrestege

Members
  • Posts

    10,056
  • Joined

  • Last visited

  • Days Won

    27

Everything posted by iPrestege

  1. من خيارات الايديتور : Relative بس مافية للدي اكس انت سويها زر واستخرج الاحداثيات وبس ( =
  2. -- # Server Side object = { } addEvent("CreateTheObject",true) addEventHandler("CreateTheObject",getRootElement(), function ( Model ) if ( object[source] and isElement ( object[source] ) ) then destroyElement ( object[source] ) end local x,y,z = getElementPosition ( source ) object[source] = createObject ( Model , x , y , z ) setAccountData ( getPlayerAccount ( source ) , "Model" , getElementModel ( object[source] ) ) exports.bone_attach:attachElementToBone(object[source],source,1,0,0,0.1,0,0,0) if getElementModel ( object[source] ) == 3515 then setObjectScale ( object[source] , 0.2 ) end if getElementModel ( object[source] ) == 1248 then setObjectScale ( object[source] , 1.3 ) exports.bone_attach:attachElementToBone(object[source],source,1,0,0.03,0.1,0,0,180) end if getElementModel ( object[source] ) == 2045 then setObjectScale ( object[source] , 1 ) exports.bone_attach:attachElementToBone(object[source],source,12,-0.2,0,0.08,0,0,90) end if getElementModel ( object[source] ) == 13562 then setObjectScale ( object[source] , 0.2 ) exports.bone_attach:attachElementToBone(object[source],source,1,0,0.03,0.2,0,0,0) end if getElementModel ( object[source] ) == 1512 then setObjectScale ( object[source] , 0.1 ) setElementAlpha ( object[source] , 0 ) exports.bone_attach:attachElementToBone(object[source],source,1,0,0.03,0.1,0,0,180) end if getElementModel ( object[source] ) == 3524 then setObjectScale ( object[source] , 0.4 ) exports.bone_attach:attachElementToBone(object[source],source,1,0,0.036,-0.8,0,0,180) end if getElementModel ( object[source] ) == 2908 then setObjectScale ( object[source] , 1.4 ) exports.bone_attach:attachElementToBone(object[source],source,1,0,0.1,0.1,270,90,0) end if getElementModel ( object[source] ) == 1485 then setObjectScale ( object[source] , 1.4 ) exports.bone_attach:attachElementToBone(object[source],source,1, -0.01, -0.01, -0.035, 0, 90, 0 ) end if getElementModel ( object[source] ) == 330 then setObjectScale ( object[source] , 1 ) exports.bone_attach:attachElementToBone(object[source],source,12, 0, 0, 0.01, 0, -50, 0 ) end if getElementModel ( object[source] ) == 3027 then setObjectScale ( object[source] , 1.3 ) exports.bone_attach:attachElementToBone(object[source],source,1, -0.01, 0.09, 0, 90, 90, 90 ) smoke = createObject ( 1485 , x , y , z ) exports.bone_attach:attachElementToBone(smoke,source,1, -0.02, 0.06, 0.03, 90, 90, 0 ) setElementAlpha ( smoke , 0 ) end if getElementModel ( object[source] ) == 1485 then setObjectScale ( object[source] , 1.4 ) exports.bone_attach:attachElementToBone(object[source],source,1, -0.01, -0.01, -0.035, 90, 0, 0 ) end if getElementModel ( object[source] ) == 1736 then setElementDoubleSided ( object[source], true ) exports.bone_attach:attachElementToBone(object[source],source,1, 0, 0, 0, 0, 0, 180 ) end if getElementModel ( object[source] ) == 2589 then setElementDoubleSided ( object[source], true ) exports.bone_attach:attachElementToBone(object[source],source,1, 0, 0, -0.9, 0, 180, 180 ) end if getElementModel ( object[source] ) == 1786 then setElementDoubleSided ( object[source], true ) exports.bone_attach:attachElementToBone(object[source],source,1, 0, -0.15, -0.2, 0, 0, 180 ) end if getElementModel ( object[source] ) == 16779 then setElementDoubleSided ( object[source], true ) exports.bone_attach:attachElementToBone(object[source],source,1, 0, 0, -0.1, 0, 180, 180 ) end if getElementModel ( object[source] ) == 3528 then setObjectScale ( object[source] , 0.09 ) setElementDoubleSided ( object[source], true ) exports.bone_attach:attachElementToBone(object[source],source,1, 0.018, 0.1, 0.1, 0, 0, 90 ) end if getElementModel ( object[source] ) == 7093 then setObjectScale ( object[source] , 0.2 ) setElementDoubleSided ( object[source], true ) setElementCollisionsEnabled ( object[source], true ) exports.bone_attach:attachElementToBone(object[source],source,1, 0, 0.6, 0.2, 0, 0, 0 ) end end ) addEventHandler ( "onPlayerLogin", root, function ( _,account ) local ObjectID = getAccountData ( account,"Model" ) if ( object[source] and isElement ( object[source] ) ) then destroyElement ( object[source] ) object[source] = nil end local x,y,z = getElementPosition ( source ) object[ source ] = createObject ( ObjectID , x,y,z ) if ( object[source] and isElement ( object[source] ) ) then exports.bone_attach:attachElementToBone(object[source],source,1,0,0,0.1,0,0,0) end end )
  3. اكوادك حولها ريلاتف ثم سويها باول ارقمنتين بنفس الطريقة
  4. There's no need to save it when the player quit just save the model when the player create an object.
  5. مثال : addEventHandler("onClientRender",getRootElement(), function ( ) local x,y = RelativeToAbsolute ( 0.5,0.5 ) dxDrawText ( "iMr.Prestege",x,y ) end )
  6. I mean something like this : -- # Server Side addEventHandler ( "onPlayerLogin", root, function ( _,account ) local ObjectID = getAccountData ( account,"Object" ) if ( object[source] and isElement ( object[source] ) ) then destroyElement ( object[source] ) object[source] = nil end local x,y,z = getElementPosition ( source ) object[ source ] = createObject ( ObjectID , x,y,z ) if ( object[source] and isElement ( object[source] ) ) then exports.bone_attach:attachElementToBone(object[source],source,1,0,0,0.1,0,0,0) end end )
  7. لا Ctrl + alt + delete مدير المهام # دور MTA Close اغلاق # ( =
  8. حمل اخر نسخة + LShift + G Drawing > DxText !
  9. قفلها من مدير المهام و شغلها ثاانية "MTA"
  10. First when the player create the object you have to set the account data and get the object model using the following : getPlayerAccount getElementModel setAccountData -- When player login : getAccountData createObject -- attach the element's then!
  11. سوية بالـ "Guieditor" !
  12. You have to set the account data when the player creating the object for the first time and save it then get the data when login and create another one that's all .
  13. Post the whole server side script if you don't mind .
  14. Lol! I think you are joking ? Or what? And you're asking why the script doesn't work? Add the code with the resource server side file .
  15. iPrestege

    Pls help

    Try my code and see the results .
  16. Where's the object defined at?
  17. iPrestege

    Pls help

    -- # Server Side addEventHandler("onResourceStart",resourceRoot, function ( ) executeSQLQuery("CREATE TABLE IF NOT EXISTS 'SQLRegisterTable' ( serial )") end ) function onPlayerRegister(user,pass) if (user) and (pass) then local account = getAccount(user,pass) if (account == false) then local serial = getPlayerSerial(source) local serialCheck = executeSQLQuery( "SELECT * FROM 'SQLRegisterTable' WHERE serial = ?",serial ) if ( type ( serialCheck ) == "table" and #serialCheck == 0 ) or not serialCheck then executeSQLQuery ( "INSERT INTO SQLRegisterTable ( serial ) VALUES ( ? )", serial ) elseif #serialCheck == 1 then executeSQLQuery ( "INSERT INTO SQLRegisterTable ( serial ) VALUES ( ? )", serial ) else return exports.SCGhelp:createNewHelpMessageForPlayer( source,"You can only register 2 accounts for each serial!", 225, 0, 0 ) end addAccount(user,pass) local account = getAccount(user,pass) logIn(source,account,pass) exports.SCGhelp:createNewHelpMessageForPlayer( source,"You have registered!", 0, 255, 0) showPlayerHudComponent(source,'all',true) showChat(source,true) else exports.SCGhelp:createNewHelpMessageForPlayer( source,"That account already exists.", 255, 0, 0) end else exports.SCGhelp:createNewHelpMessageForPlayer( source,"Fatal Register Error ~ Server Side", 255, 0, 0) return end end addEvent("Login:onPlayerRegister",true) addEventHandler("Login:onPlayerRegister",root,onPlayerRegister) Try it.
  18. iPrestege

    Pls help

    I mean create a new table for you're register system .
  19. Arabic scripting section And let guess why you don't need to post on the arabic scripting section because you don't need the arabic people steal the script .
  20. iPrestege

    Pls help

    Try to create a custom 'SQL' Table .
  21. # -- Server Side local Marker = createMarker ( x, y , z, "cylinder", 1.5, 255, 255, 0, 170 ) addEventHandler ("onMarkerHit",Marker, function ( plr ) if ( getElementType ( plr ) == ( "player" ) ) then killPed ( plr ) end end,false )
×
×
  • Create New...