HunT Posted November 11, 2012 Share Posted November 11, 2012 (edited) Tools For Race Gamemode Pickups Race Manager (enable/disable Repair and nitro) In race_server.lua replace this function : addEvent('onPlayerPickUpRacePickup') addEvent('onPlayerPickUpRacePickupInternal', true) addEventHandler('onPlayerPickUpRacePickupInternal', g_Root, function(pickupID, respawntime) if checkClient( false, source, 'onPlayerPickUpRacePickupInternal' ) then return end local pickup = g_Pickups[table.find(g_Pickups, 'id', pickupID)] local vehicle = g_Vehicles[source] if not pickup or not vehicle then return end if respawntime and tonumber(respawntime) >= 50 then table.insert(unloadedPickups, pickupID) clientCall(g_Root, 'unloadPickup', pickupID) TimerManager.createTimerFor("map"):setTimer(ServerLoadPickup, tonumber(respawntime), 1, pickupID) end if pickup.type == 'repair' then fixVehicle(vehicle) elseif pickup.type == 'nitro' then addVehicleUpgrade(vehicle, 1010) elseif pickup.type == 'vehiclechange' then if getElementModel(vehicle) ~= tonumber(pickup.vehicle) then clientCall(source, 'alignVehicleWithUp') setVehicleID(vehicle, pickup.vehicle) setVehiclePaintjobAndUpgrades(vehicle, pickup.paintjob, pickup.upgrades) clientCall(source, 'vehicleChanging', g_MapOptions.classicchangez, tonumber(pickup.vehicle)) end end triggerEvent('onPlayerPickUpRacePickup', source, pickupID, pickup.type, pickup.vehicle) end ) With This : pick = 0 function checkPickup (thePlayer) if ( hasObjectPermissionTo ( thePlayer, "command.kick", true ) ) then if pick == 0 then outputChatBox( getPlayerName(thePlayer).. " : Disable The Pickups Nitro And Repair ", getRootElement(), 255, 200, 0, true) pick=1 elseif pick == 1 then pick = 0 outputChatBox( getPlayerName(thePlayer).. " : Enable The Pickups Nitro And Repair ", getRootElement(), 255, 200, 0, true) end end end pick = 0 addCommandHandler ( "ps", checkPickup ) addEvent('onPlayerPickUpRacePickup') addEvent('onPlayerPickUpRacePickupInternal', true) addEventHandler('onPlayerPickUpRacePickupInternal', g_Root, function(pickupID, respawntime) if checkClient( false, source, 'onPlayerPickUpRacePickupInternal' ) then return end local pickup = g_Pickups[table.find(g_Pickups, 'id', pickupID)] local vehicle = g_Vehicles[source] if not pickup or not vehicle then return end if respawntime and tonumber(respawntime) >= 50 then table.insert(unloadedPickups, pickupID) clientCall(g_Root, 'unloadPickup', pickupID) TimerManager.createTimerFor("map"):setTimer(ServerLoadPickup, tonumber(respawntime), 1, pickupID) end if pickup.type == 'repair' and pick == 0 then fixVehicle(vehicle) elseif pickup.type == 'nitro' and pick == 0 then addVehicleUpgrade(vehicle, 1010) elseif pickup.type == 'vehiclechange' then if getElementModel(vehicle) ~= tonumber(pickup.vehicle) then clientCall(source, 'alignVehicleWithUp') setVehicleID(vehicle, pickup.vehicle) setVehiclePaintjobAndUpgrades(vehicle, pickup.paintjob, pickup.upgrades) clientCall(source, 'vehicleChanging', g_MapOptions.classicchangez, tonumber(pickup.vehicle)) end end triggerEvent('onPlayerPickUpRacePickup', source, pickupID, pickup.type, pickup.vehicle) end ) addEvent("onMapStarting",true) addEventHandler("onMapStarting",getRootElement(), function () pick = 0 end ) Can u Edit The Command/Permission/outputChatBox ---------------------------------------------------------------------------------------- Map Rating Easy 1. Can u rate the maps with the key 1 2 3 4 5 6 7 8 9 0 ( The 0 is 10 ) 2. outputChatBox Info (onMapStarting) 3. Can u Edit The Color Etc.. 4. Need ACL admin for executeCommandHandler Server-Side addEvent("onMapStarting",true) addEventHandler("onMapStarting",getRootElement(), function (mapInfo) local name = mapInfo.name or "Unknown" local author = mapInfo.author or "none" local playedCount = tostring(mapInfo.playedCount or "none") local map = exports.mapmanager:getRunningGamemodeMap() local mapname = getResourceName(map) rate = exports.mapratings:getMapRating(mapname) outputChatBox("Map Name #FFFFFF: "..name,getRootElement(),255,200,0,true) outputChatBox("Name Autor #FFFFFF: "..author,getRootElement(),255,200,0,true) if rate then currentRating = rate.average or 0 countRating = rate.count or 0 setTimer(outputChatBox,50,1,"#FFC800Map Rating : This Map is Rating "..tostring(currentRating).."#FFC800/#FFFFFF10#FFC800 (by "..tostring(countRating).." Drivers)",getRootElement(),255,200,0,true) end end ) function onResStart () for index, playerSource in ipairs ( getElementsByType ( "player" ) ) do bindKey ( playerSource, "1", "down",function(playerSource,commandName) value1 = 1 executeCommandHandler("rate",playerSource,value1) end ) bindKey ( playerSource, "2", "down",function(playerSource,commandName) value2 = 2 executeCommandHandler("rate",playerSource,value2) end ) bindKey ( playerSource, "3", "down",function(playerSource,commandName) value3 = 3 executeCommandHandler("rate",playerSource,value3) end ) bindKey ( playerSource, "4", "down",function(playerSource,commandName) value4 = 4 executeCommandHandler("rate",playerSource,value4) end ) bindKey ( playerSource, "5", "down",function(playerSource,commandName) value5 = 5 executeCommandHandler("rate",playerSource,value5) end ) bindKey ( playerSource, "6", "down",function(playerSource,commandName) value6 = 6 executeCommandHandler("rate",playerSource,value6) end ) bindKey ( playerSource, "7", "down",function(playerSource,commandName) value7 = 7 executeCommandHandler("rate",playerSource,value7) end ) bindKey ( playerSource, "8", "down",function(playerSource,commandName) value8 = 8 executeCommandHandler("rate",playerSource,value8) end ) bindKey ( playerSource, "9", "down",function(playerSource,commandName) value9 = 9 executeCommandHandler("rate",playerSource,value9) end ) bindKey ( playerSource, "0", "down",function(playerSource,commandName) valueTen = 10 executeCommandHandler("rate",playerSource,valueTen) end ) end end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource() ), onResStart) ---------------------------------------------------------------------------------------- Vehicle Flag Plates Easy Script Replace The Original Plate With Flag Bad Quality Flags Because Call the png's From The Admin Panel. Give ACL admin Download Here : https://community.multitheftauto.com/ind ... ls&id=6094 ---------------------------------------------------------------------------------------- Edited December 3, 2012 by Guest Link to comment
TwiX! Posted November 11, 2012 Share Posted November 11, 2012 Why not with true or false? work = true And where player hit pickup.. if not work then return end Link to comment
HunT Posted November 11, 2012 Author Share Posted November 11, 2012 Like The Numbers + Map Rating Easy Link to comment
HunT Posted December 3, 2012 Author Share Posted December 3, 2012 Vehicle Flag Plates Easy Script Replace The Original Plate With Flag Bad Quality Flags Because Call the png's From The Admin Panel. Give ACL admin Download Here : https://community.multitheftauto.com/ind ... ls&id=6094 Link to comment
TwiX! Posted December 3, 2012 Share Posted December 3, 2012 it would be better if there is no do ... end why? p.s server good work! Link to comment
Snes Posted December 4, 2012 Share Posted December 4, 2012 This beautiful and very good work^^ Link to comment
HunT Posted December 5, 2012 Author Share Posted December 5, 2012 Tnx Guys Sorry for Compiling Vehicle Flag Plates [Example] [server-Side] 1- exports.admin:getPlayerCountry(source) 2- setElementData 3- Event onPlayerJoin [Client-Side] 1- Event onClientResourceStart + namefunction () 2- Event onClientVehicleEnter + namefunction () 3- function namefunction () 4- getVehicleController 5- getElementData 6- dxCreateTexture 7- dxCreateShader 8- dxSetShaderValue 9- engineApplyShaderToWorldTexture Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now