Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function mtSetElementData(player, string, key)
- if not(elementArray[player]) then
- elementArray[player] = {}
- end
- elementArray[player][string] = key
- setElementData(player, string, key) -- ADMIN FUNKTION NUR MIT mtGetElementData !!!
- if(allowedData[string]) then
- if(checkInjections(string) ~= true) then
- if(string == "handgeld") then
- setPlayerMoney(player, key)
- elseif(string == "wanteds") then
- setPlayerWantedLevel(player, key)
- outputInfobox(player, "You have now "..key.." Wanteds.", 200, 0, 0)
- if(key > 2) and (mtGetElementData(player, "fraktion") ~= "criminal") then
- outputInfobox(player, "You are now a criminal.", 255, 0, 0)
- mtSetElementData(player, "fraktion", "criminal")
- mtSetElementData(player, "class", "-")
- end
- elseif(string == "skinid") then
- setElementModel(player, key)
- elseif(string == "fraktion") then
- if(key == "-") then
- mtSetElementData(player, string, "lscivilian")
- error("Faction : - set for player "..getPlayerName(player)..", returning to lscivilian.")
- return
- end
- end
- local query = dbQuery(dbhandler, "UPDATE "..dataTables[allowedData[string]].." SET "..allowedData[string].." = '"..key.."' WHERE ID = "..getPlayerID(player)..";")
- local result = dbPoll(query, dbpTime)
- if(result) then
- else
- error("Bad Argument at saving MySQL Data!")
- end
- else
- kickPlayer(player, "Console", "Injection Projetction")
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement