-
Posts
191 -
Joined
-
Last visited
Everything posted by LaCosTa
-
, this video will teach you how to be admin in your mta server , then simply you can press "F8" and type start resourcename or restart or stop , you can type help to check all the commands .
-
Good work , also you can check mine if you want take a look at it . Click Me
-
i downloaded gta v theme because Trevor on it , nice work dude
-
personally i started with this http://www.lua.org/pil/contents.html#P1 it so important .
-
nice script , keep this work up
-
7low yesser , ataw nod5el na3mel tala
-
يجب أن تستعمل هذي الفنكشن setAccountData getAccountData event : onPlayerLogin إختر التي تساعدك
-
want free scripts feel free to join https://community.multitheftauto.com/ and download whatever you want otherwise you need to pay to get your custom script . or simply try to learn the lua language .
-
جرب هذا addEvent("A",true) addEventHandler("A",root, function(player) local money = getPlayerMoney(player) if ( money >= 250 ) then takePlayerMoney(player , 250) outputChatBox("*****************") else outputChatBox("*****************") end end)
-
change this outputChatBox ( "Welcome, "..getPlayertName(pla).."!", pla, 0, 150, 0 ) to this outputChatBox ( "Welcome, "..getPlayerName(pla).."!", pla, 0, 150, 0 )
-
it works , like that addEventHandler("evenName" , attachedTo , function () -- your code here -- then close the function and the eventHandler end )
-
You have to identify the hitElement , see this example below Marker = createMarker(x,y,z,"cylinder",1.5,255,255,255) gate = createObject(id,x,y,z,nil,nil,nil) function moveGate (hitElement) if (getElementType(hitElement) == "player") then moveObject(gate,time,x,y,z,) end end addEventHandler("onMarkerHit",Marker,moveGate)
-
Thanks it's working now , my main purpose is just to know how to add money on command , to use it , if i faced another script like it , anyways thanks WASSim and solidsnake for your help
-
it says on debugscript , attempt to compare number with nil -- line 8
-
function getYourGift (reciever ) if (getElementType(reciever) == "player" ) and ( not isPedInVehicle(reciever) ) then local money = getPlayerMoney(reciever) local giftM = getElementData(gifts[creator],"gift") setPlayerMoney(reciever,money+giftM) outputChatBox("Congratulations You Got : "..giftM.." , ! " ,reciever,255,255,255) destroyElement(gifts[creator]) end end addEventHandler("onPickupHit", gifts[creator] , getYourGift)
-
Well i just want to make a script , that the admin can use the command /createGift "money" , to create a pickup , when a player hit that pickup he"ll recieve the money that the admin putted it through the command gifts = {} function addGift ( creator , ... ) if (getElementType(creator) == "player" ) then local accountname = getAccountName (getPlayerAccount(creator)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Console" ) ) then local x,y,z = getElementPosition(creator) gifts[creator] = createPickup(x+5,y,z,3,1274) moneyGf = {...} if ( tonumber(moneyGf > 0 )) and ( tonumber(moneyGf < 7000 )) then setElementData(gifts[creator],"gift",moneyGf) else outputChatBox("SYNTAX USAGE : /createGift money",creator,255,255,255) end end end end addCommandHandler("createGift",addGift)
-
نعم أعلم، اضفت "else" للتحقق مما إذا رمز يسير على ما يرام، يمكن إزالته
-
أكيد عمل خطأ في فانكشن guiGridListSetItemText
-
guiGridListSetItemText ( gridlist, row, column,string.gsub(getPlayerName ( v ),"#%x%x%x%x%x%x",""),false, false )
-
local Marker = createMarker( 2480.8,-1722,12.5,'cylinder',2, 255,255, 255, 150) function WL (hitPlayer, matchingDimension) if matchingDimension and hitPlayer and isElement(hitPlayer) and getElementType(hitPlayer) == "player" and isPedInVehicle(hitPlayer) then local vehicle = getPedOccupiedVehicle(hitPlayer) if ( getElementModel(vehicle) == 510 ) then outputChatBox ( "Welcome", hitPlayer, 255, 255, 255, false ) else outputChatBox("You don't have the required model ", hitPlayer,255,255,255,false) end end end addEventHandler( "onMarkerHit", Marker, WL ) إذا تريد عندما يدخل فالماركر بدون السيكل ، لا يريه النص إستخدم هذه local Marker = createMarker( 2480.8,-1722,12.5,'cylinder',2, 255,255, 255, 150) function WL (hitPlayer, matchingDimension) if matchingDimension and hitPlayer and isElement(hitPlayer) and getElementType(hitPlayer) == "player" and isPedInVehicle(hitPlayer) then local vehicle = getPedOccupiedVehicle(hitPlayer) if ( getElementModel(vehicle) == 510 ) then outputChatBox ( "Welcome", hitPlayer, 255, 255, 255, false ) else return false end end end addEventHandler( "onMarkerHit", Marker, WL )
-
wdwLogin_Pannel = {} tabPannel_Main = {} tab_Login = {} tab_Register = {} function open_log_reg_pannel() if not(isElement(wdwLogin_Pannel)) then showChat(false) x,y = guiGetScreenSize() local sWidth,sHeight = guiGetScreenSize() local Width,Height = 350,350 local X = (sWidth/2) - (Width/2) local Y = (sHeight/2) - (Height/2) local x,y = guiGetScreenSize() onStart = function() local image = guiCreateStaticImage( 0 , 0 , 1920 , 1200, 'login_bg.jpeg', false ) setTimer(guiSetVisible,5000 , 1,login_bg,false) end addEventHandler('onClientResourceStart',resourceRoot,onStart) local login_bg = guiCreateStaticImage ( 0 , 0 , 1920 , 1200 , "login_bg.jpeg" , true ) setTimer ( guiStaticImageLoadImage , 5000 , 1 , login_bg, "soso.jpeg" , false ) Login_img = guiCreateStaticImage( X + -100, Y + -112, 540, 569, "login_window.png", false ) guiSetVisible(Login_img, false) end end
-
https://wiki.multitheftauto.com/wiki/Gu ... eLoadImage
-
إستعمل setTimer guiCreateStaticImage
-
addEventHandler("onClientGUIClick",ButtonName, function () if source == Buy then local sel = guiGridListGetSelectedItem(grid) if sel ~= -1 then local ProGamer = tonumber(guiGridListGetItemData(grid,sel,1)) triggerServerEvent("Food",localPlayer,ProGamer, sel) end end end ) addEvent("Food",true) addEventHandler("Food",root, function ( ) health = getElementHealth(source) setElementHealth(source,health + 20) if (health == 100) then return end end )