Advertisement
Guest User

Untitled

a guest
Dec 2nd, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1.  
  2. local connection = dbConnect( "mysql", "dbname=adatbázisnév;host=ipt ide", "felhasznalonev", "jelszo", "share=1" )
  3. addCommandHandler("setanick",
  4.  
  5. function(playerSource,commandName,who,adminnick)
  6. if (getElementData( playerSource, "adminlevel" ) >= 8) then
  7. if not (who) then
  8. outputChatBox("#30a2a2[Használat]: #ffffff/setadminnick [ID / NévRészlet] [Admin név]", playerSource,141,177,61,true)
  9. else
  10. local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(playerSource, who)
  11. if (targetPlayer) then
  12. outputChatBox("#ff2850[Információ]: #ffffffBeállítottad #30a2a2" .. targetPlayerName .. "#ffffff admin nevét.",playerSource,255,255,255,true)
  13. setElementData(targetPlayer, "anick", adminnick)
  14. dbExec(connection, "UPDATE `characters` SET `adminnick`=? WHERE `id`="..getElementData( targetPlayer, "dbid" ), adminnick)
  15. end
  16. end
  17. end
  18. end
  19. )
  20.  
  21.  
  22.  
  23.  
  24. `adminnick` varchar(32) NOT NULL DEFAULT 'Nincs_ADMINNEVED', ki exportálod az egész sqled majd a CREATE TABLE `characters` után berakod azt a sort
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement