7
« Last post by LaCosTa on June 12, 2014, 08:33:09 am »
Your Name: LaCosTa ( real name is Achref Bouzidi)
Your Account Name: LaCosTa
Your LUA Skills: 6/10
Some Scripts Made By You (DownLoad Link):
Tazer For Police
local Police = createTeam("Police" ,6 ,67 ,96)
function Police(player , command)
setPlayerTeam(player, getTeamFromName("Police"))
setElementModel(player, 285 )
setElementData(player , "0ccupation" , "Police")
setPlayerNametagColor(player ,6,67,96)
outputChatBox("You Are A COP Now ",player, 255 , 255 , 0)
end
addCommandHandler("police" ,Police)
function tazer(thePlayer)
Team = getPlayerTeam(thePlayer)
Police = getTeamFromName("Police")
if Team == Police then
giveWeapon( thePlayer, 23, 100)
outputChatBox("You Have Turned On Your Tazer Get taze the suspect",thePlayer, 255,255,0)
else
outputChatBox("You Don't have acess to this Command you aren't a cop",thePlayer,255,255,0) end
end
addCommandHandler("tazer" , tazer)
function tazeplayer (attacker , weapon, bodypart, loss)
local players = getElementsByType("player")
for theKey,thePlayer in ipairs(players) do
local level = getPlayerWantedLevel(thePlayer)
if (level > 0) then
weapon = 23
setPedAnimation(thePlayer , "CRACK", "crckidle3", false , false , false)
setTimer(setPedAnimation, 30000,1,source, false)
outputChatBox("You Got Tazer Shot You need to wait few secondes to walk again",player, 255, 255, 0)
else
outputChatBox("The player hasn't wanted level",player,255,255,0)
return end
end
end
addEventHandler("onPlayerDamage", getRootElement(), tazeplayer)
DD Event
Server
local ddmarker = createMarker( 2719, -1828, 11, "cylinder", 2, 255, 255, 0, 170, false )
createBlipAttachedTo(ddmarker, 11)
addEventHandler('onMarkerHit', root,
function (hitElement)
if (getElementType(hitElement) == 'player' ) then
triggerClientEvent(hitElement, "ShowGUI", hitElement)
end
end
)
addEvent('TakeMoney' , true)
addEventHandler('TakeMoney', root,
function ()
takePlayerMoney(source, 5000)
end
)
Client
participateWindow = guiCreateWindow(436, 368, 448, 220, "CSF DD Event", false)
guiWindowSetSizable(participateWindow, false)
participateButton = guiCreateButton(76, 150, 128, 43, "Participate", false, participateWindow)
guiSetFont(participateButton, "default-bold-small")
participateLabel = guiCreateLabel(10, 21, 432, 127, "Hello "..getPlayerName(localPlayer)..", you are about to participate in dd event, \n where you can kill people by car, with shooting them rockets from car. Click \n button Participate, but it costs 5,000$. \n If you don't want to participate, or lose 5,000$ click Cansel Button. \n But also you must know that, if you win this event you will get \n 50,000$.", false, participateWindow)
guiSetFont(participateLabel, "clear-normal")
cancelButton = guiCreateButton(233, 150, 128, 43, "Cancel", false, participateWindow)
guiSetFont(cancelButton, "default-bold-small")
local participate = false
addEventHandler('onClientGUIClick', root,
function ()
if ( source == participateButton ) then
guiSetVisible(participateWindow, false)
showCursor(false)
local count = (getElementData(localPlayer,"Your_Data")) or 0
setElementData(localPlayer,"Your_Data", count + 1)
triggerServerEvent('TakeMoney', localPlayer)
participate = true
setTimer(toggleButton, 250, 1)
exports.CSUtexts:output("You have been participated in event, wait for other players, to participate \n and when you reach 10 players, event will be started automaticaly.", 255, 255, 0)
elseif ( source == cancelButton ) then
guiSetVisible(participateWindow, false)
showCursor(false)
local count = 1
if ( getElementData(localPlayer, "Your_Data") ) == count then
setElementData(localPlayer, "Your_Data", participateButton, count + 1)
exports.CSUtexts:output("You Already Signed In Be Patient Till Event Starts",255,255,0)
end
end
end
)
function toggleButton()
if (participate == true) then
guiSetProperty( participateButton, "Disabled", "True" )
end
end
function hitTime ()
if ( source == participateButton ) then
setElementData (source , "onClientGUIClick" , getTickCount)
end
end
addEventHandler("onClientGUIClick" , getRootElement(), hitTime)
function hit ()
local timeHit = (getTickCount() - getElementData ( thePlayer, "hitTime")) / 1000
exports.CSUtexts:output("Event Doesnt Started Yet"..getPlayerName(localPlayer).."Already Signed In /n Be Patient Till event starts" ,255,255,0)
end
addEventHandler('onClientResourceStart', resourceRoot,
function ()
guiSetVisible(participateWindow, false)
showCursor(false)
end
)
function onQuitGame( )
local count = getElementData(localPlayer,"Your_Data")
setElementData(localPlayer,"Your_Data",count -1)
exports.CSUtexts:output(""..getPlayerName(localPlayer).." left the event, Paricipated players in event "..count.."", 255, 255, 0)
end
addEventHandler( "onClientPlayerQuit", getRootElement(), onQuitGame )
addCommandHandler("leavedd", onQuitGame)
function checkPlayers()
local playersInDD = getElementData(localPlayer,"Your_Data")
exports.CSUtexts:output("There are "..playersInDD.."/10 players signed in event", 255, 255, 0)
end
addCommandHandler("ddevent", checkPlayers)
function warpPlayers()
if ( getElementData ( localPlayer,"Your_Data" ) ) == 10 then
exports.CSUtexts:output("10/10 players have signed in event, wait 10 seconds, to be warped.", 255, 255, 0)
setTimer(1000, 1)
setElementDimension(5)
end
end
addEvent("ShowGUI", true)
addEventHandler("ShowGUI", root,
function()
guiSetVisible(participateWindow, true)
showCursor(true)
end
)
Move Gate
gate = createObject(985 , 12635662929, 1561891.198 , 19819.9298, 0 ,0 ,0)
gate_s = "to"
addCommandHandler("gate", function ( )
if gate_s == "to" then
moveObject(gate, 2000, 12635662929 , 1561891.198 , 19813)
gate_s = "on"
else
moveObject(gate, 2000, 12635662929 , 1561891.198 , 19819.9298)
gate_s = "to"
end
end)
Criminal
-----------------------------
--------By LaCoSta---------
-----------------------------
local Criminal = createTeam("Criminal", 255,0,0)
function joinCriminal(player, command)
setPlayerTeam (player, Criminal)
setPedArmor(player,50)
setElementModel(player,30)
setElementData(player, "Occupation", "killer")
setPlayerNametagColor(player,255,0,0)
outputChatBox ( "#00FF00You are #FF0000Criminal", player, 255, 255, 255, true )
end
addCommandHandler("criminal",joinCriminal)
Will you follow Rules? yes i will
[/b]
[/i][/glow][/color]