-
Posts
277 -
Joined
-
Last visited
Everything posted by DiGiTal
-
ids={} function joiner(plr) for i=1,getMaxPlayers() do if not ids[i] then ids[i] = source setElementData(source,"id",i) break end end end addEventHandler("onPlayerJoin",root,joiner) function id() for k, v in ipairs(getElementsByType("player")) do local MyID = getElementData(v,"id") if true then setPlayerName(v,"[..MyID..]..getPlayerName(v)) end end end end
-
function verify() local players = getElementsByType ( "player" ) for k,v in ipairs(players) do local accountname = "" if (isGuestAccount(getPlayerAccount(v)) == false) then accountname = getAccountName (getPlayerAccount(v)) if isObjectInACLGroup("user." .. accountname, aclGetGroup ( "Admin" )) then return true else return false end end end end function teleport(plr,cmd,r) if getPlayerFromName(r) then local receiver=getPlayerName(r) local x,y,z=getElementPosition(r) local adminName=getPlayerName(plr) if (verify()==true) then spawnPlayer(plr,x,y,z) outputChatBox('You Have Been Teleported To '..receiver,plr) outputChatBox('Admin '.. adminName..'Have Been Teleported To You ',r) else outputChatBox('YOU ARE NOT ALLOWED TO USE THIS COMMAND',plr) end end addCommandHandler('teleport',teleport)
-
You didn't changed .LMAO
- 4 replies
-
- random messages
- chat
-
(and 5 more)
Tagged with:
-
Use' /n' for new line
-
Did there is solution, to create window ;just for getting the xyz width height without joining in game mtasa Thanks
-
function createLoginGui () wdwLogin = guiCreateWindow(529, 206, 488, "Login Panel", false) guiWindowSetMovable (wdwLogin, false) guiWindowSetSizable (wdwLogin, false) guiSetAlpha (wdwLogin, 1.00) guiSetProperty (wdwLogin, "CaptionColour", "FFFEFEFE") lblMainLogin = guiCreateLabel (7, 14, 293, 48, "Testing server", true, wdwLogin) guiSetFont (lblMainLogin, "clear-normal") guiLabelSetColor(lblMainLogin, "center", true) guiLabelSetHorizontalAlign (lblMainLogin, "center", true) guiLabelSetVerticalAlign (lblMainLogin, "center", true) guiLabelSetVerticalAlign (lblMainLogin, "center") lblUsernameLogin = guiCreateLabel (11, 77, 124, 24, "Username", true, wdwLogin) edtUsernameLogin = guiCreateEdit (11, 106, 279, 34, "", true, wdwLogin) lblPasswordLogin = guiCreateLabel (16, 147, 128, 24, "Password", true, wdwLogin) edtPasswordLogin = guiCreateEdit (11, 171, 279, 34, "", true, wdwLogin) btnLogin = guiCreateButton (10, 308, 114, 34, "Register", true, wdwLogin) guiSetVisible (wdwLogin, true) end function start() createLoginGui() if wdwLogin then outputChatBox("Welcome to the testing server") showCursor (true) guiSetInputEnabled (true) else outputChatBox("Failed to create login panel") showCursor (false) end end addEventHandler ("onClientResourceStart", getRootElement(),start) You should revise wiki functions: outputChatBox not outputChatbox !!!!!! guiCreateEdit not guicreateEdit !!!!!! you should use the syntax https://forum.multitheftauto.com/topic/38240-tut-notepad-auto-complete-amp-syntax-highlighting/
-
---- local GroupName = 'KILLERS' ---- function turnedON() active=true outputChatBox("Spawn enabled") end addCommandHandler("active", turnedON) function turnedOFF() active=false outputChatBox("Spawn disabled") end addCommandHandler("desactive", turnedOFF) function onWasted () if active == true then if getElementData(source,'Group') == 'KILLERS' then setTimer( function (source) setElementDimension( source, 0 ) setElementPosition( source, 2478.705078125+math.random(1,1), -1685.421875+math.random(1,1), 13.5078125 ) setElementInterior( source, 0 ) setPedArmor ( source, 100) setPedFightingStyle ( source, 5) end, 1000, 1, source) end end end addEventHandler ( "onPlayerSpawn", getRootElement(), onWasted ) @side there were some errors
-
yea, for example: create small icon , when player click on it dispear the precedent content and show the new one !
-
of course i forgot to add a handler function onPlayerCommand(thePlayer, command, vehicleModel) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if not isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then if (tonumber(vehicleModel) == 520) then return outputChatBox ( "● You must be VIP to spawn this vehicle", thePlayer, 255, 0, 0 ) end local x,y,z = getElementPosition(thePlayer) x = x + 5 local createdVehicle = createVehicle(tonumber(vehicleModel),x,y,z) outputChatBox("●"..getVehicleName(createdVehicle).."Has been spawned",thePlayer, 255, 0, 0 ) end addCommandHandler("cv", onPlayerCommand) add Command , it's an handler by a command, means when player do command (ex:/greet) it handle a function ( here it's onPlayerCommand)
-
function onPlayerCommand(thePlayer, command, vehicleModel) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if not isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then if (tonumber(vehicleModel) == 520) then return outputChatBox ( "● You must be VIP to spawn this vehicle", thePlayer, 255, 0, 0 ) end local x,y,z = getElementPosition(thePlayer) x = x + 5 local createdVehicle = createVehicle(tonumber(vehicleModel),x,y,z) outputChatBox("●"..getVehicleName(createdVehicle).."Has been spawned",thePlayer, 255, 0, 0 ) end addCommandHandler("cv", onPlayerCommand) @Scarfas
-
join our discord we will desicuss there
-
no probleme. if you are new in scripting and wanna learn more Check TPF
-
https://wiki.multitheftauto.com/wiki/Resource:Votemanager
-
How ' cops still alive ' the robers change the map and cops stay in precedent map . explaine please mORE!
-
Hello,let me introduce my self.My name is Damazigh, I'm 17 years old. My hobbies is to play foot ball and scripting. I'm a designer(logos,banners,posters,web design) experienced 4years. I'm WEB DEVELOPER that means i can create STATIC (without using the server side) and DYNAMIC(using the server for data base ...etc). I'm MTA:SA SCRIPTER which i have a good level . Contact me By: -Discord: DiGiTal#2028 -PM ME
-
For me this company is the Best.you should try their services
- 52 replies
-
- 1
-
-
- free game servers
- mtasa
-
(and 1 more)
Tagged with:
-
chase mode is following ?? and what about following mode ?
-
I think he mean skin mod how to install it
-
Me too i dont get the diffetence between chasing and hunting
-
Why its limited to use the outputdebugstring ? Or i didnt understood
-
Use the create vehicule on server side and call it
-
delete and download again mtasa . i think you done /unbindall or just go to settings and go to binds tab then reset defaults @Salem
-
كيفاش نساعدك. عين الكلينت ولا السرفر وين عندك.الشك