Jump to content

waqaarali

Members
  • Posts

    181
  • Joined

  • Last visited

Everything posted by waqaarali

  1. local mysql = exports.mysql local scriptVer = exports.global:getScriptVersion() local salt = "vgrpkeyscotland" -- Gay beta code local hasBeta = { } function UserAccountLoggedOut() exports['anticheat-system']:changeProtectedElementDataEx(client, "gameaccountloggedin", 0, true) end addEvent("account:loggedout", true) addEventHandler("account:loggedout", getRootElement(), UserAccountLoggedOut) function UserLoggedOut() exports['anticheat-system']:changeProtectedElementDataEx(source, "loggedin", 0, true) end addEvent("player:loggedout", true) addEventHandler("player:loggedout", getRootElement(), UserLoggedOut) function UserLoggedOutAll() exports['anticheat-system']:changeProtectedElementDataEx(client, "loggedin", 0, true) exports['anticheat-system']:changeProtectedElementDataEx(client, "gameaccountloggedin", 0, true) end addEvent("accountplayer:loggedout", true) addEventHandler("accountplayer:loggedout", getRootElement(), UserLoggedOutAll) function informServerHasBeta() hasBeta[client] = false end addEvent("hasBeta", true) addEventHandler("hasBeta", getRootElement(), informServerHasBeta) function beta(thePlayer) if ( exports.global:isPlayerAdmin(thePlayer)) then local count = 0 for k,v in pairs(hasBeta) do count = count + 1 end exports.global:sendMessageToAdmins("> " .. count .. " people are running Sapphire Beta.") end end addCommandHandler("beta", beta) function playerQuit() hasBeta[source] = nil end addEventHandler("onPlayerQuit", getRootElement(), playerQuit) function acceptBeta() redirectPlayer(client, "temp.chuevo.com", getServerPort(), getServerPassword()) end addEvent("acceptBeta", true) addEventHandler("acceptBeta", getRootElement(), acceptBeta) -- end gay beta code function sendSalt() triggerClientEvent(client, "sendSalt", source, salt, getPlayerIP(source), getElementData(getRootElement(), "account:motd")) end addEvent("getSalt", true) addEventHandler("getSalt", getRootElement(), sendSalt) function encrypt(str) local hash = 0 for i = 1, string.len(str) do hash = hash + tonumber(string.byte(str, i, i)) end if (hash==0) then return 0 end hash = hash + 100000000 return hash end function encryptSerial(str) local hash = md5(str) local rhash = "VGRP" .. string.sub(hash, 17, 20) .. string.sub(hash, 1, 2) .. string.sub(hash, 25, 26) .. string.sub(hash, 21, 2) return rhash end function resourceStart(resource) setGameType("Roleplay") setMapName("Cylus RP: Los Santos") setRuleValue("Script Version", tostring(scriptVer)) setRuleValue("Author", "Cylus Scripting Team") local motdresult = mysql:query_fetch_assoc("SELECT value FROM settings WHERE name='motd' LIMIT 1") exports['anticheat-system']:changeProtectedElementDataEx(getRootElement(), "account:motd", motdresult["value" ], false ) local amotdresult = mysql:query_fetch_assoc("SELECT value FROM settings WHERE name='amotd' LIMIT 1") exports['anticheat-system']:changeProtectedElementDataEx(getRootElement(), "account:amotd", amotdresult["value" ], false ) for key, value in ipairs(exports.pool:getPoolElementsByType("player")) do triggerEvent("playerJoinResourceStart", value, resource) end end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), resourceStart) function onJoin() -- Set the user as not logged in, so they can't see chat or use commands exports['anticheat-system']:changeProtectedElementDataEx(source, "loggedin", 0) exports['anticheat-system']:changeProtectedElementDataEx(source, "gameaccountloggedin", 0, false) exports['anticheat-system']:changeProtectedElementDataEx(source, "gameaccountusername", "") exports['anticheat-system']:changeProtectedElementDataEx(source, "gameaccountid", "") exports['anticheat-system']:changeProtectedElementDataEx(source, "dbid", false) exports['anticheat-system']:changeProtectedElementDataEx(source, "adminlevel", 0) exports['anticheat-system']:changeProtectedElementDataEx(source, "hiddenadmin", 0) exports['anticheat-system']:changeProtectedElementDataEx(source, "globalooc", 1, false) exports['anticheat-system']:changeProtectedElementDataEx(source, "muted", 0) exports['anticheat-system']:changeProtectedElementDataEx(source, "loginattempts", 0, false) exports['anticheat-system']:changeProtectedElementDataEx(source, "timeinserver", 0, false) setElementDimension(source, 9999) setElementInterior(source, 0) clearChatBox(source) exports.global:updateNametagColor(source) end addEventHandler("onPlayerJoin", getRootElement(), onJoin) addEvent("playerJoinResourceStart", false) addEventHandler("playerJoinResourceStart", getRootElement(), onJoin) addEvent("restoreJob", false) function spawnCharacter(charname, version) exports.global:takeAllWeapons(client) exports.global:takeAllWeapons(source) takeAllWeapons(source) takeAllWeapons(client) source = client local id = getElementData(client, "gameaccountid") charname = string.gsub(tostring(charname), " ", "_") local safecharname = mysql:escape_string(charname) local data = mysql:query_fetch_assoc("SELECT * FROM characters WHERE charactername='" .. safecharname .. "' AND account='" .. mysql:escape_string(id) .. "' AND cked = 0") if (data) then local id = tonumber(data["id"]) local currentid = getElementData(source, "dbid") if hasBeta[source] then if id == currentid then return elseif currentid then triggerEvent("savePlayer", source, "Change Character", source) end end for key, value in ipairs(getElementsByType("player")) do if ( getElementData(value, "loggedin") == 1 and value ~= source and hasBeta[value] ) then triggerClientEvent(value, "onPlayerCharacterChange", source, charname) end end local x = tonumber(data["x"]) local y = tonumber(data["y"]) local z = tonumber(data["z"]) local rot = tonumber(data["rotation"]) local interior = tonumber(data["interior_id"]) local dimension = tonumber(data["dimension_id"]) local health = tonumber(data["health"]) local armor = tonumber(data["armor"]) local skin = tonumber(data["skin"]) setPedSkin(source, skin) local money = tonumber(data["money"]) local factionID = tonumber(data["faction_id"]) local cuffed = tonumber(data["cuffed"]) local radiochannel = tonumber(data["radiochannel"]) local masked = tonumber(data["masked"]) local duty = tonumber(data["duty"]) local cellnumber = tonumber(data["cellnumber"]) local fightstyle = tonumber(data["fightstyle"]) local pdjail = tonumber(data["pdjail"]) local pdjail_time = tonumber(data["pdjail_time"]) local pdjail_station = tonumber(data["pdjail_station"]) local job = tonumber(data["job"]) local casualskin = tonumber(data["casualskin"]) local weapons = tostring(data["weapons"]) local ammo = tostring(data["ammo"]) local carlicense = tonumber(data["car_license"]) local gunlicense = tonumber(data["gun_license"]) local bankmoney = tonumber(data["bankmoney"]) local fingerprint = tostring(data["fingerprint"]) local tag = tonumber(data["tag"]) local hoursplayed = tonumber(data["hoursplayed"]) local timeinserver = tonumber(data["timeinserver"]) local restrainedobj = tonumber(data["restrainedobj"]) local restrainedby = tonumber(data["restrainedby"]) local factionrank = tonumber(data["faction_rank"]) local dutyskin = tonumber(data["dutyskin"]) local phoneoff = tonumber(data["phoneoff"]) local blindfold = tonumber(data["blindfold"]) local gender = tonumber(data["gender"]) local cellphonesecret = tonumber(data["cellphonesecret"]) local photos = tonumber(data["photos"]) local age = data["age"] local race = tonumber(data["skincolor"]) local weight = data["weight"] local height = data["height"] local desc = data["description"] local maxvehicles = tonumber(data["maxvehicles"]) local factionleader = tonumber(data["faction_leader"]) local d_addiction = tostring(data["d_addiction"]) exports['anticheat-system']:changeProtectedElementDataEx(source, "chardescription", desc) exports['anticheat-system']:changeProtectedElementDataEx(source, "age", age) exports['anticheat-system']:changeProtectedElementDataEx(source, "weight", weight) exports['anticheat-system']:changeProtectedElementDataEx(source, "height", height) exports['anticheat-system']:changeProtectedElementDataEx(source, "race", race) exports['anticheat-system']:changeProtectedElementDataEx(source, "maxvehicles", maxvehicles) -- LANGUAGES local lang1 = tonumber(data["lang1"]) local lang1skill = tonumber(data["lang1skill"]) local lang2 = tonumber(data["lang2"]) local lang2skill = tonumber(data["lang2skill"]) local lang3 = tonumber(data["lang3"]) local lang3skill = tonumber(data["lang3skill"]) local currentLanguage = tonumber(data["currlang"]) exports['anticheat-system']:changeProtectedElementDataEx(source, "languages.current", currentLanguage, false) if lang1 == 0 then lang1skill = 0 end if lang2 == 0 then lang2skill = 0 end if lang3 == 0 then lang3skill = 0 end exports['anticheat-system']:changeProtectedElementDataEx(source, "languages.lang1", lang1, false) exports['anticheat-system']:changeProtectedElementDataEx(source, "languages.lang1skill", lang1skill, false) exports['anticheat-system']:changeProtectedElementDataEx(source, "languages.lang2", lang2, false) exports['anticheat-system']:changeProtectedElementDataEx(source, "languages.lang2skill", lang2skill, false) exports['anticheat-system']:changeProtectedElementDataEx(source, "languages.lang3", lang3, false) exports['anticheat-system']:changeProtectedElementDataEx(source, "languages.lang3skill", lang3skill, false) -- END OF LANGUAGES exports['anticheat-system']:changeProtectedElementDataEx(source, "timeinserver", timeinserver, false) exports['anticheat-system']:changeProtectedElementDataEx(source, "dbid", tonumber(id)) exports['item-system']:loadItems( source, true ) exports['anticheat-system']:changeProtectedElementDataEx(source, "loggedin", 1) -- Check his name isn't in use by a squatter local playerWithNick = getPlayerFromName(tostring(charname))
  2. So I have this RolePlay/ Real Life RP login panel and they want me to make it like do a 360 when a player has logged in and slowly it vanishes out of screen please someone help!
  3. I need a host except byserv and nitrado that accepts paysafecard I would like your opinions and it needs to be a cheap price thanks!
  4. I need some free scripters for my rpg server and they will get paid soon but i have no money at the moment maximum i will pay is 5$ no more i need atleast 2 scripters! Please Help me!
  5. Can u script with me on my rpg server?
  6. waqaarali

    HELP BUG!

    There is a bug in mabako-services! When i turn it on it says ERROR: Client triggered serverside event requestServicesColShapes, but event is not added serverside When i do /debugscript 3 in game !! Please Help!
  7. Ok so i am making an RPG Server with my friends! I have made one complete job which is police/cop and i want to make a script only police officers can enter police vehicles anyone help me out ;(
  8. Please give me a correct working one ;(
  9. Please give me a correct working one ;(
  10. can you do it for me ? i am really confused!
  11. I want to make a damage proof script for vehicles, so when someone type /dp in game it will be activated? when they type it again it will be deactivated! Anyone help me out!
  12. waqaarali

    HELP ME ;(

    Is CMG like SAES btw you need any scripters?
  13. waqaarali

    HELP ME ;(

    Which server is better ?? PLEASE CIT2 OR SAES I NEED TO COLLECT VOTES PLEASE SAY "CIT2" FOR THIS SERVER "SAES" FOR THIS SERVER
  14. a host or from a pc?
  15. So i was thinking for a while looking at my blank boring screen of my pc! I decided to make this topic because i want to help a hosting company e.g with there servers, ftp etc. etc. I want to help a company who host mta servers and want to be part of it! I have good skills!
  16. but where do i add it? GUIEditor = { button = {}, window = {}, } GUIEditor.window[1] = guiCreateWindow(205, 151, 406, 323, "Spawner By Gangsta", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.button[1] = guiCreateButton(25, 55, 145, 58, "Spawn In Los Santos", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(236, 55, 161, 60, "Spawn In San Fransisco", false, GUIEditor.window[1]) GUIEditor.button[3] = guiCreateButton(138, 179, 149, 103, "Spawn in LV", false, GUIEditor.window[1]) GUIEditor.button[4] = guiCreateButton(15, 178, 50, 25, "Quit", false, GUIEditor.window[1]) addEventHandler("onClientGUIClick",root, function () if ( source == GUIEditor.button[1] ) then triggerServerEvent("Spawn[1]",localPlayer) elseif ( source == GUIEditor.button[2] ) then triggerServerEvent("Spawn[2]",localPlayer) elseif ( source == GUIEditor.button[3] ) then triggerServerEvent("Spawn[3]",localPlayer) end end ) showCursor ( true ) Do i put it at the end of showCursor..... guiSetVisible showCursor
  17. Also i made a button GUIEditor.button[4] = guiCreateButton(15, 178, 50, 25, "Quit", false, GUIEditor.window[1]) When the player presses the button the gui Closes how can i do this?
  18. I tried to do it but it didn't work SERVER SIDE function spawnPlayer () spawnPlayer ( playerValue, 1487, -1744, 14, 90.0, 0 ) end addEvent ( "spawnPlayer", true ) addEventHandler (spawnPlayer, GUIEditor.button[1], onClientGUIClick) Client Side addEventHandler( "onClientResourceStart", getRootElement( ), GUIEditor = { button = {}, window = {}, } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(205, 151, 406, 323, "Spawner By Gangsta", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.button[1] = guiCreateButton(25, 55, 145, 58, "Spawn In Los Santos", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(236, 55, 161, 60, "Spawn In San Fransisco", false, GUIEditor.window[1]) GUIEditor.button[3] = guiCreateButton(138, 179, 149, 103, "Spawn in LV", false, GUIEditor.window[1]) end ) function() triggerServerEvent ( "spawnPlayer", getLocalPlayer() ) end
  19. do i add it to the same script?
  20. Ok so i am making a simple rpg gamemode and so i started with a spawner ! I made a simple one! Ok so i made some of the script and i just want to make like when the player pressess the button e.g Spawn Los Santos he spawns at the front of cityhall !! Ok so here is the script.... GUIEditor = { button = {}, window = {}, } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(205, 151, 406, 323, "Spawner By Gangsta", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.button[1] = guiCreateButton(25, 55, 145, 58, "Spawn In Los Santos", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(236, 55, 161, 60, "Spawn In San Fransisco", false, GUIEditor.window[1]) GUIEditor.button[3] = guiCreateButton(138, 179, 149, 103, "Spawn in LV", false, GUIEditor.window[1]) end )
×
×
  • Create New...