0% found this document useful (0 votes)
95 views5 pages

RP Gun Script for SAMP by Zre

monetloader

Uploaded by

Fauzan Fadillah
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
95 views5 pages

RP Gun Script for SAMP by Zre

monetloader

Uploaded by

Fauzan Fadillah
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

script_name("RP Gun by Zre")

script_author("Zre")
script_version("π")

function main()

if not isSampLoaded() or not isSampfuncsLoaded() then return end


while not isSampAvailable() do wait(0) end

sampAddChatMessage('{ff0000}[INFO] {ffffff}The script "RP Gun" has been


uploaded and is ready to work! Author: Zre | Version: ' .. thisScript().version,-1)

lua_thread.create(rp_weapons)

end

local sex = 1

local weapons = {
FIST = 0,
BRASSKNUCKLES = 1,
GOLFCLUB = 2,
NIGHTSTICK = 3,
KNIFE = 4,
BASEBALLBAT = 5,
SHOVEL = 6,
POOLCUE = 7,
KATANA = 8,
CHAINSAW = 9,
PURPLEDILDO = 10,
WHITEDILDO = 11,
WHITEVIBRATOR = 12,
SILVERVIBRATOR = 13,
FLOWERS = 14,
CANE = 15,
GRENADE = 16,
TEARGAS = 17,
MOLOTOV = 18,
COLT45 = 22,
SILENCED = 23,
DESERTEAGLE = 24,
SHOTGUN = 25,
SAWNOFFSHOTGUN = 26,
COMBATSHOTGUN = 27,
UZI = 28,
MP5 = 29,
AK47 = 30,
M4 = 31,
TEC9 = 32,
RIFLE = 33,
SNIPERRIFLE = 34,
ROCKETLAUNCHER = 35,
HEATSEEKER = 36,
FLAMETHROWER = 37,
MINIGUN = 38,
SATCHELCHARGE = 39,
DETONATOR = 40,
SPRAYCAN = 41,
FIREEXTINGUISHER = 42,
CAMERA = 43,
NIGHTVISION = 44,
THERMALVISION = 45,
PARACHUTE = 46
}
local id = weapons
[Link] = {
[[Link]] = 'fists',
[[Link]] = 'brass knuckles',
[[Link]] = 'golf club',
[[Link]] = 'nightstick',
[[Link]] = 'sharp knife',
[[Link]] = 'baseball bat',
[[Link]] = 'shovel',
[[Link]] = 'pool cue',
[[Link]] = 'katana',
[[Link]] = 'chainsaw',
[[Link]] = 'purple dildo',
[[Link]] = 'white dildo',
[[Link]] = 'white vibrator',
[[Link]] = 'large vibrator',
[[Link]] = 'bouquet of flowers',
[[Link]] = 'cane',
[[Link]] = 'grenade',
[[Link]] = 'tear gas',
[[Link]] = 'molotov cocktail',
[id.COLT45] = 'Colt 1911',
[[Link]] = "'Colt Supresor'",
[[Link]] = 'Glock 17, 9mm',
[[Link]] = 'Benelli M-4',
[[Link]] = 'Double Barrel',
[[Link]] = 'Automatic Shotgun',
[[Link]] = 'Mac-10',
[id.MP5] = 'Heckler',
[id.AK47] = 'AK-47',
[id.M4] = 'AR-15, 5.56mm',
[id.TEC9] = 'Scorpion',
[[Link]] = 'Kar98K',
[[Link]] = 'Barrett M82A1',
[[Link]] = 'rocket launcher',
[[Link]] = 'rocket launcher device',
[[Link]] = 'flamethrower',
[[Link]] = 'minigun',
[[Link]] = 'dynamite',
[[Link]] = 'detonator',
[[Link]] = 'pepper spray',
[[Link]] = 'fire extinguisher',
[[Link]] = 'Camera',
[[Link]] = 'night vision',
[[Link]] = 'thermal vision',
[[Link]] = 'parachute'
}
function taser()
lua_thread.create(function()
sampSendChat("/taser")
wait(900)
if isCurrentCharWeapon(PLAYER_PED, 23) and not weap then
if sex == 1 then
sampSendChat('/me pulled out "Colt Supresor" from holster')
elseif sex == 0 then
sampSendChat('/me pulled out "Colt Supresor" from holster')
end
weap = true
elseif not isCurrentCharWeapon(PLAYER_PED, 23) and weap then
if sex == 1 then
sampSendChat('/me put away "Colt Supresor" into holster')
elseif sex == 0 then
sampSendChat('/me put away "Colt Supresor" into holster')
end
weap = false
end
end)
end
function rp_weapons()
local gunOn = {}
local gunOff = {}
local gunPartOn = {}
local gunPartOff = {}
local oldGun = nil
local nowGun = getCurrentCharWeapon(PLAYER_PED)
local rpTakeNames = {{"from backspine", "to backspine"}, {"from pocket", "to
pocket"}, {"from Utility Belt", "to Utility Belt"}, {"from inside pocket", "to
inside pocket"}}
local rpTake = {
[2] = 1, [5] = 1, [6] = 1, [7] = 1, [8] = 1, [9] = 1, [14] = 1, [15] = 1,
[25] = 1, [26] = 1, [27] = 1, [28] = 1, [29] = 1, [30] = 1, [31] = 1, [32] = 1,
[33] = 1, [34] = 1, [35] = 1, [36] = 1, [37] = 1, [38] = 1, [42] = 1, -- backspine
[1] = 2, [10] = 2, [11] = 2, [12] = 2, [13] = 2, [43] = 2, [44] = 2, [45] =
2, [46] = 2, -- pocket
[3] = 3, [16] = 3, [17] = 3, [18] = 3, [39] = 3, [40] = 3, [41] = 3, --
Utility Belt
[4] = 4, [22] = 4, [23] = 4, [24] = 4 -- inside pocket
}

for id, weapon in pairs([Link]) do


if (id == 3 or (id > 15 and id < 19)) then
if sex == 1 then
gunOn[id] = 'do something'
elseif sex == 0 then
gunOn[id] = 'do something'
end
else
if sex == 1 then
gunOn[id] = 'do something'
elseif sex == 0 then
gunOn[id] = 'do something'
end
end

if (id == 3 or (id > 15 and id < 19) or (id > 38 and id < 41)) then
if sex == 1 then
gunOff[id] = 'save weapon'
elseif sex == 0 then
gunOff[id] = 'save weapon'
end
else
if sex == 1 then
gunOff[id] = 'save weapon'
elseif sex == 0 then
gunOff[id] = 'save weapon'
end
end

if id > 0 then
gunPartOn[id] = rpTakeNames[rpTake[id]][1]
gunPartOff[id] = rpTakeNames[rpTake[id]][2]
end
end

while true do
wait(0)
if nowGun ~= getCurrentCharWeapon(PLAYER_PED) then
oldGun = nowGun
nowGun = getCurrentCharWeapon(PLAYER_PED)
if oldGun == 0 then
if nowGun == 23 then
if sex == 1 then
sampSendChat('/me pulled out "Taser-X19" from holster')
elseif sex == 0 then
sampSendChat('/me pulled out "Taser-X19" from holster')
end
else
if nowGun == 24 then
if sex == 1 then
sampSendChat("/me Taking out Glock 17.9mm from Holster
and ready to shoot anytime")
sampSendChat("/ame Pulled out Glock 17.9mm [SAFETY:
OFF]")
elseif sex == 0 then
sampSendChat("/me Taking out Glock 17.9mm from Holster
and ready to shoot anytime")
sampSendChat("/ame Pulled out Glock 17.9mm [SAFETY:
OFF]")
end
else
sampSendChat("/me " .. gunOn[nowGun] .. " " ..
weapons.get_name(nowGun) .. " " .. gunPartOn[nowGun])
end
end
else
if nowGun == 0 then
if oldGun == 24 then
if sex == 1 then
sampSendChat("/me Saving Glock 17.9mm into Holster")
sampSendChat("/ame Saved Glock 17.9mm to the Holster
[SAFETY: ON]")
elseif sex == 0 then
sampSendChat("/me Saving Glock 17.9mm into Holster")
sampSendChat("/ame Saved Glock 17.9mm to the Holster
[SAFETY: ON]")
end
else
if oldGun == 23 then
if sex == 1 then
sampSendChat('/me put away "Taser-X19" into
holster')
elseif sex == 0 then
sampSendChat('/me put away "Taser-X19" into
holster')
end
else
sampSendChat("/me " .. gunOff[oldGun] .. " " ..
weapons.get_name(oldGun) .. " " .. gunPartOff[oldGun])
end
end
else
if nowGun == 23 then
if sex == 1 then
sampSendChat("/me " .. gunOff[oldGun] .. " " ..
weapons.get_name(oldGun) .. " " .. gunPartOff[oldGun] .. ', then pulled out "Taser-
X19" from holster')
elseif sex == 0 then
sampSendChat("/me " .. gunOff[oldGun] .. " " ..
weapons.get_name(oldGun) .. " " .. gunPartOff[oldGun] .. ', then pulled out "Taser-
X19" from holster')
end
else
if nowGun == 3 then
if sex == 1 then
sampSendChat("/me " .. gunOff[oldGun] .. " " ..
weapons.get_name(oldGun) .. " " .. gunPartOff[oldGun] .. ", then took nightstick
from belt holder")
elseif sex == 0 then
sampSendChat("/me " .. gunOff[oldGun] .. " " ..
weapons.get_name(oldGun) .. " " .. gunPartOff[oldGun] .. ", then took nightstick
from belt holder")
end
else
sampSendChat("/me " .. gunOff[oldGun] .. " " ..
weapons.get_name(oldGun) .. " " .. gunPartOff[oldGun] .. ", then " .. gunOn[nowGun]
.. " " .. weapons.get_name(nowGun) .. " " .. gunPartOn[nowGun])
end
end
end
end
end
end
end
function weapons.get_name(id)
return [Link][id]
end

You might also like