
golanu21
Members-
Posts
650 -
Joined
-
Last visited
Everything posted by golanu21
-
staff = createTeam ( Staff, 229, 229, 229 ) function Staff ( thePlayer ) local accName = getAccountName( getPlayerAccount(source) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admins" ) ) then setPlayerTeam ( thePlayer, staff ) setPedArmor ( thePlayer, 100 ) end end addEventHandler ( "onPlayerLogin", getRootElement(), Staff ) it is in server side
-
function guiStart () local node = xmlLoadFile("data\\carshops.xml") local vNum2 = 0 while ( xmlFindSubNode ( node, "carshop", vNum2 ) ~= false ) do local vNum3 = 0 local shop = xmlFindSubNode ( node, "carshop", vNum2 ) while ( xmlFindSubNode ( shop, "carshopcol", vNum3 ) ~= false ) do local shopCol = xmlFindSubNode ( shop, "carshopcol", vNum3 ) local shopName = xmlNodeGetAttribute ( shopCol, "name" ) 4: Bad Argument @ 'xmlFindSubNode'
-
oo thanx .. i am noob )
-
exports.scoreboard:scoreboardAddColumn( "WantedLv" ) function getwan() local players = getElementsByType ( "player" ) for theKey,source in ipairs(players) do local wanted = getPlayerWantedLevel(source) local zero = "" local one = "*" local two = "**" local three = "***" local four = "****" local five = "*****" local six = "******" if wanted == 0 then setElementData ( source, "Wanted", zero ) else if wanted == 1 then setElementData ( source, "Wanted", one ) else if wanted == 2 then setElementData ( source, "Wanted", two ) else if wanted == 3 then setElementData ( source, "Wanted", three ) else if wanted == 4 then setElementData ( source, "Wanted", four ) else if wanted == 5 then setElementData ( source, "Wanted", five ) else if wanted == 6 then setElementData ( source, "Wanted", six ) end end end end end end end end end setTimer(getwan,100,0) addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), getwan ) the column appear in the scoreboard, but when i have wanted level > 0 the stars (**) not appear
-
function starr () local star = createMarker ( 0, 0, 0, "arrow", 1, 255, 0, 0, 255 ) local level = getPlayerWantedLevel ( source ) if ( level > 0 ) then attachElements ( star, source, 0, 0, 10) end end addEventHandler ( "onClientResourceStart", getRootElement(), starr) don't work
-
with createObject what need to do ?
-
how i make this : When the player have "wanted level" 1 to see the star above your head? As : "SAUR, RPG"
-
function pizaveh ( player, command ) local player = getLocalPlayer () local x, y, z = getElementPosition ( player ) if(getPlayerTeam(player) == getTeamFromName("PizzaBoy")) then pizveh = createVehicle ( 448, x - 10, y, z ) else outputChatBox ( "Nu esti vanzator de pizza", player, 255, 0, 0 ) return end end addCommandHandler ( "pizveh", pizaveh ) 1. i can't enter in vehicle ( pizveh ) 2. i want to delete it , and create again, when the command is used again.
-
function blipcol ( thePlayer ) local playerBlip = getBlipAttachetTo ( thePlayer ) wantedlevel = getPlayerWantedLevel ( ) if wantedlevel == 1 then setBlipColor ( playerBlip , #FF9900 ) if wantedlevel == 0 then setBlipColor ( playerBlip , #FFFFFF ) end end end and i don't know what event ...
-
marker = createMarker ( 2532.8000488281, -1666.0999755859, 14.199999809265, "cylinder", 1, 255, 0, 0, 255 ) function takejob( thePlayer ) toggleAllControls ( thePlayer, false ) setTimer ( toggleAllControls, 10000, 1, thePlayer, true ) outputChatBox ("*State Forist ii da lui "..getPlayerName(thePlayer).." o ranga. ", root, 0, 0, 255 ) outputChatBox ("[state Forist] : Dute si fura din casele oamenilor, dar asteapta 10 secunde. ", root, 255, 0, 0 ) outputChatBox ( " ["..getPlayerName(thePlayer).."]: Stau", root, 255, 0, 0 ) h1 = createMarker ( 2459.5, -1691.4000244141, 12.5, "cylinder", 1, 255, 0, 0, 255 ) end addEventHandler ( "onMarkerHit", marker, takejob ) function delete ( thePlayer ) destroyElement ( marker ) outputChatBox ("[state Forist] : La revedere, si ai grija. ", root, 255, 0, 0 ) outputChatBox ( " ["..getPlayerName(thePlayer).."]: Mersi, pa...", root, 255, 0, 0 ) end addEventHandler ( "onMarkerLeave", marker, delete ) function ho1( thePlayer ) toggleAllControls ( thePlayer, false ) setTimer ( toggleAllControls, 10000, 1, thePlayer, true ) outputChatBox ( " *["..getPlayerName(thePlayer).."] intra in casa si incepe sa fure. 'Va termina in 10 secunde'", root, 0, 0, 255 ) fadeCamera ( source, false, 1.0, 255, 0, 0 ) outputChatBox ( "Ai furat 50.000$ din aceasta casa.", root, 0, 255, 0 ) givePlayerMoney ( 50000 ) setTimer ( fadeCamera, 10000, 1, source, true, 0.5 ) end addEventHandler ( "onMarkerHit", h1, ho1 ) function dh1( thePlayer ) destroyElement ( h1 ) outputChatBox ( " *"..getPlayerName(thePlayer).."a jefuit casa.", root, 0, 0, 255 ) end addEventHandler ( "onMarkerLeave", h1, dh1 ) and the error is 29, 35 : Bad argument addEventHandler ( element 2 )
-
function randomFunction ( thePlayer ) setPlayerWantedLevel ( thePlayer, 1 ) outputChatBox ( getPlayerName ( thePlayer ) "released Public Intoxication WL", root, 255, 0, 0 ) end addCommandHandler ( "fart", randomFunction ) attempt to call global 'setPlayerWantedLevel
-
i want to make an original..and i want learning lua script
-
i want to make a report system like this.. the player type ::: /rep whoIsReporter whoIsReported Text... and the messaje to go in Admin members chatBox
-
thanx TAPL, and Mr.Pres[T]ege
-
how do if the player did not let down, to kill?
-
i want to make a script like this : the player need to duck .. or the player was be killed
-
GUIGUIEditor = { button = {}, staticimage = {}, window = {}, gridlist = {}, label = {}, edit = {}, } --Setarii GuestEnable = true --Gui fereastra = guiCreateWindow ( 707, 271, 785, 545, "Inregistrare / Logare", false ) guiWindowSetSizable(fereastra, false) guiSetAlpha(fereastra, 0.68) guiSetProperty(fereastra, "CaptionColour", "FFE0FB03") imaginea = guiCreateStaticImage(10, 21, 407, 233, ":guieditor/images/examples/mtalogo.png", false, fereastra) label1 = guiCreateLabel(10, 298, 358, 60, "Nume de cont :", false, fereastra) guiSetFont(GUIEditor.label[1], "sa-header") guiLabelSetColor(GUIEditor.label[1], 4, 27, 249) label2 = guiCreateLabel(10, 384, 404, 62, "Parola contului :", false, fereastra) guiSetFont(GUIEditor.label[2], "sa-header") guiLabelSetColor(GUIEditor.label[2], 15, 3, 249) ed1 = guiCreateEdit(378, 304, 374, 54, "", false, fereastra) ed2 = guiCreateEdit(429, 394, 346, 55, "", false, fereastra) loginbtn = guiCreateButton(95, 486, 132, 50, "Login", false, fereastra) regbtn = guiCreateButton(450, 481, 147, 55, "Inregistrare", false, Gfereastra) gl = guiCreateGridList(432, 35, 344, 226, false, fereastra) label3 = guiCreateLabel(16, 14, 313, 197, " Reguli/Rules\n\n1.Fara reclame | Pedeapsa: Ban Permanent\n2.Fara injurii | Pedeapsa: Mute (3x=Ban)\n3.Fara AFK | Pedeapsa: Kick\n4.Fara Trolling | Pedeapsa: Kick (3x=Ban)\n5.Fara milogeala | Pedeapsa: Mute (3x=ban)\n\nBan - Banul se da in functie de ceea ce sa intamplat \nEx: Tu: B**s p**a in m**a (3xMute=ban 12 ore", false, GUIEditor.gridlist[1]) guiSetVisibile ( fereastra, false) --Necunoscut if GuestEnable == true then btnGuest = guiCreateButton(235, 481, 204, 55, "Joaca ca necunoscut", false, fereastra) guiSetFont(btnGuest,"default-small") guiSetVisible(btnGuest,true) else if isElement(btnGuest) then guiSetVisible(btnGuest,false) end btnGuest = nil end function windowHandler( ) local playername = getPlayerName(localPlayer) guiSetText(ed1, "") guiSetText(ed1, playername) guiSetVisible ( fereastra, true ) guiSetInputEnabled(true) showCursor ( true ) end function onClickBtn ( button, state ) if (source == loginbtn) then triggerServerEvent ( "onLogin", getRootElement(), localPlayer, guiGetText(ed1), guiGetText(ed2) ) end end function onClickBtn2 ( button, state ) if (source == regbtn) then triggerServerEvent ( "onRegister", getRootElement(), localPlayer, guiGetText(ed1), guiGetText(ed2)) end end addEvent( "hideLoginWindow", true ) addEventHandler( "hideLoginWindow", getRootElement(), hideLoginWindow ) addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), windowHandler ) addEventHandler ( "onClientGUIClick", loginbtn, onClickBtn, false ) addEventHandler ( "onClientGUIClick", regbtn, onClickBtn2, false ) loginreg:13: attemt to call global 'guiCreateWindow' (a nil value)
-
cum folosesc Lua Decomplier acela.. vreau sa transform... .luac in .lua