Advertisement
Guest User

code

a guest
Oct 25th, 2018
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.07 KB | None | 0 0
  1. RegisterCommand("astworzgrupe", function(source, args, rawCommand)
  2.     local nazwa = args[1]
  3.     local _source = source
  4.     local identifier = GetPlayerIdentifiers(_source)[1]
  5.     local kasa = 0
  6.  
  7.     TriggerClientEvent("SaveCommand", source)
  8.     if nazwa == nil then
  9.         --Wiadomość że nie podał nazwy
  10.     else   
  11.         MySQL.Async.execute("INSERT INTO looky_przestepcze ( gNazwa, gBoss, gKasa, gPosX, gPosY, gPosZ) VALUES (@nazwa, @identifier, @gKasa, @gPosX, @gPosY, @gPosZ)",
  12.         {
  13.              ['@gNazwa'] = nazwa,
  14.              ['@identifier'] = identifier,
  15.              ['@gKasa'] = kasa,
  16.              ['@gPosX'] = pos[1],
  17.              ['@gPosY'] = pos[2],
  18.              ['@gPosZ'] = pos[3]
  19.         })
  20.  
  21.         -- Infomacja o stworzeniu danej gruoy
  22.     end
  23.    
  24. end)
  25.  
  26. --F8 agrupalider [idgrupy] [steamhex]
  27. RegisterCommand("agrupalider", function(source, args, rawCommand)
  28.     local idgrupy = args[1]
  29.     local steamhex = args[2]
  30.  
  31.     if  idgrupy == nil and steamhex == nil then
  32.         -- Infomacja
  33.     else
  34.         MySQL.Async.execute("UPDATE looky_przestepcze SET gBoss=@steamhex WHERE gUID=@idgrupy",
  35.         {
  36.             ['@gBoss'] = steamhex,
  37.             ['@gUID'] = idgrupy
  38.         })
  39.     end
  40. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement