-
Posts
378 -
Joined
-
Last visited
Everything posted by Sparrow
-
thank you xeno, it's working.
-
error: Bad argument @ 'setElementFrozen'
-
setElementFrozen should be as this? function killMe (thePlayer) if (thePlayer) then setElementFrozen (thePlayer) setTimer (killPed, 10000, 1, thePlayer) outputChatBox("You will be killed in 10 seconds.", thePlayer, 255, 0, 0) end end addCommandHandler ("kill", killMe)
-
this didn't work also it didn't froze the player. error : bad argument @ 'killPed' line 4
-
thank you for this fast help. to set the player who type this command frozen, I need to add this? setTimer (setPedFrozen, 10000, 1, thePlayer)
-
today I di "/kill" command script and I want it kill the player in 10secs when he type /kill I do this function killMe (thePlayer) if (thePlayer) then setTimer (killMe, 10000, 1) outputChatBox("You will be killed in 10 seconds.", thePlayer, 255, 0, 0) killPed (thePlayer) end end addCommandHandler ("kill", killMe) and it didn't kill him after 10secs, it kill him when he type /kill any help on this?
-
How can i debug srcipt? I know i can compile with f5 but how debug script? Sorry for my bad english ;D type /debugscript 3 you'll found the errors in screen.
-
try this: -- client addEventHandler("onClientResourceStart",resourceRoot, function() login_window = guiCreateWindow(237,96,334,338,"KraZ'World Some RP: Login Screen",false) guiSetVisible(login_window, true) showCursor(true) guiSetInputEnabled (true) guiWindowSetMovable(login_window,false) guiWindowSetSizable(login_window,false) krazworld_image = guiCreateStaticImage(17,16,296,124,"images/KraZWorld.png",false,login_window) login_button = guiCreateButton(37,267,124,53,"Login",false,login_window) guiSetFont(login_button,"clear-normal") username_label = guiCreateLabel(16,171,101,20,"Username:",false,login_window) guiLabelSetColor(username_label,255,255,255) guiLabelSetVerticalAlign(username_label,"top") guiLabelSetHorizontalAlign(username_label,"left",false) password_label = guiCreateLabel(17,220,76,24,"Password:",false,login_window) guiLabelSetColor(password_label,255,255,255) guiLabelSetVerticalAlign(password_label,"top") guiLabelSetHorizontalAlign(password_label,"left",false) username_edit = guiCreateEdit(78,170,244,23,"",false,login_window) password_Edit = guiCreateEdit(78,217,244,23,"",false,login_window) register_button = guiCreateButton(173,267,124,53,"Register",false,login_window) guiSetFont(register_button,"clear-normal") register_window = guiCreateWindow(216,145,374,251,"Registration",false) guiWindowSetMovable(register_window,false) guiWindowSetSizable(register_window,false) dusername_label = guiCreateLabel(12,45,105,18,"Desired Username:",false,register_window) guiLabelSetColor(dusername_label,255,255,255) guiLabelSetVerticalAlign(dusername_label,"top") guiLabelSetHorizontalAlign(dusername_label,"left",false) dusername_edit = guiCreateEdit(119,44,244,23,"",false,register_window) dpassword_label = guiCreateLabel(11,104,113,18,"Desired Password:",false,register_window) guiLabelSetColor(dpassword_label,255,255,255) guiLabelSetVerticalAlign(dpassword_label,"top") guiLabelSetHorizontalAlign(dpassword_label,"left",false) dpassword_edit = guiCreateEdit(121,101,243,23,"",false,register_window) regististration_button = guiCreateButton(41,172,131,60,"Register!",false,register_window) cancel_button = guiCreateButton(199,171,131,60,"Cancel!",false,register_window) guiSkinShop = guiCreateWindow(0.37*sx,0.80*sy,0.3*sx,0.15*sy,"Choose a skin!",false) done = guiCreateButton(0.25,0.60,0.50,0.30,"Done",true,guiSkinShop) left = guiCreateButton(0.07,0.60,0.15,0.30,"<-",true,guiSkinShop) right = guiCreateButton(0.78,0.60,0.15,0.30,"->",true,guiSkinShop) guiWindowSetSizable(guiSkinShop,false) guiSetVisible(guiSkinShop, false) skinLabel = guiCreateLabel(0.05,0.30,0.90,0.17,"Skins can be bought once ingame",true,guiSkinShop) guiSetAlpha(skinLabel,1) guiLabelSetColor(skinLabel,255,255,255) guiCreateStaticImage( 0.0001, 0.49, 0.99, 0.02, "red.png", true, guiSkinShop ) guiCreateStaticImage( 0.0001, 0.25, 0.99, 0.02, "red.png", true, guiSkinShop ) guiLabelSetHorizontalAlign(skinLabel,"center",false) guiSetFont(skinLabel,"default-bold-small") end ) addEventHandler("onClientGUIClick",getRootElement(), function login() if source == login_button then local getUsernameField = guiGetText(Username_edit) local getPasswordField = guiGetText(Password_edit) if getUsernameField and getPasswordField then triggerServerEvent("loginFromClient", getLocalPlayer(), getUsernameField, getPasswordField) end end if source == registration_button then local getUsernameField1 = guiGetText(dusername_edit) local getPasswordField1 = guiGetText(dpassword_edit) if getUsernameField1 and getPasswordField1 then triggerServerEvent("registerFromClient", getLocalPlayer(), getUsernameField1, getPasswordField1) triggerServerEvent("loginFromClient", getLocalPlayer(), getUsernameField1, getPasswordField1) end end end function (buttons) if source == login_button then if guiGetVisible(login_window) == true then guiSetVisible(login_Window, false) showCursor(false) end end elseif source == register_button then if guiGetVisible(login_window) == true then guiSetVisible(login_window) == false else guiGetVisible(register_window) == false guiSetVisible(register_window) == true showCursor(true) end end if source == cancel_button then if guiGetVisible(register_window) == true then guiSetVisible(register_window) == false else guiGetVisible(login_window) == false guiSetVisible(login_window) == true showCursor(true) end end end function goRight(player) local newSkin = getElementModel (localPlayer) + 1 while not setElementModel (localPlayer,newSkin) do newSkin = newSkin + 1 end end function goLeft(player) local newSkin = getElementModel (localPlayer) - 1 while not setElementModel (localPlayer,newSkin) do newSkin = newSkin - 1 end end function doneButton(thePlayer) guiSetVisible(guiSkinShop,false) showCursor(false) triggerServerEvent("setCameraRegister", localPlayer) if source == registration_button then if guiGetVisible(register_window) == true guiSetVisible(register_window) == false else guiGetVisible(guiSkinShop) == false guiSetVisible(guiSkinShop) == true end end end end addEvent("onClientLoginHide",true) addEventHandler("onClientLoginHide",getRootElement(), function() showCursor(false) guiSetVisible(register_window, false) guiSetVisible(login_window, false) guiSetVisible(guiSkinShop) guiSetInputEnabled(false) end ) addEventHandler ( "onClientGUIClick",right,goRight, false ) addEventHandler ( "onClientGUIClick",done,doneButton, false ) addEventHandler ( "onClientGUIClick",left,goLeft, false )
-
what are the errors so we can help you.
-
it didnt' work, no errors in /debugscript 3 and in mtaserver.exe EDIT: nvm on what I say, I copy mauriz script and add "takePlayerMoney" and it work well.
-
bad argument @ setPlayerWantedLevel (line 4)
-
thank you, it's working, but it didn't take money from the player
-
now I do script that remove 1 star when I type /rstar but it didn't remove this star, this what I do: function removeMyStar(thePlayer) local wanted = getPlayerWantedLevel (thePlayer) if (wanted = 1) then local getMoney = getPlayerMoney (thePlayer) if (getMoney == 250) then setPlayerWantedLevel (thePlayer, 0) outputChatBox ("You have removed your star for $250.", thePlayer, 0, 255, 0) else outputChatBox ("You need $250 to remove your star.", thePlayer, 255, 0, 0) end end end addCommandHandler ("rstar", removeMyStar)
-
you need to add this: warpPedIntoVehicle --warp player into the vehicle when he spawn it.
-
لا شكر على واجب نحن عرب مسلمون نساعد بعضنا
-
C:/Programe files/MTA San Andreas 1.2/Server/Mods/DeathMatch/Recources/Gameplay
-
with yours only admins can do it? Edit: it's working only for "Army" team, and I solve the problem of bugged inside it by changing: barrier[thePlayer] = createObject (3578, x + 6, y , z, 0, 0, 0) but if I create 2+ barriers I only remove 1 barrier, how to set it only create 1 barrier?
-
I do a simple script that is allow army to block road with barriers, but when I'm testing this in my local server I found that all can use it, also I stuck inside the barrier, how to solve this? here is the script: local barrier = {} function createBarrier (thePlayer) local getTeam = getTeamFromName ("Army") if (getTeam) then local x, y, z = getElementPosition (thePlayer) barrier[thePlayer] = createObject (3578, x, y, z, 0, 0, 0) end end addCommandHandler ("barrier", createBarrier) function removeBarrier (thePlayer) if (isElement(barrier[thePlayer])) then destroyElement(barrier[thePlayer]) barrier[thePlayer] = nil end end addCommandHandler ("rbarrier", removeBarrier)
-
ابي اتعلم (العلم نور والجهل ظلام) شباب تكفون ادخلو
Sparrow replied to faisl2002's topic in Arabic / العربية
أنا عملت مود, إذا تكتب في شات /alert يطلع كلام يشوفه كل السيرفر. هذا المود: https://community.multitheftauto.com/index.php?p= ... ls&id=3507 **************************** يمكنك التعلم من الويكي و إستفسار هنا. مع الشكر Sparrow -
thank you, it's working. (both working)
-
I test this, players also can see what I write
-
this is it: function adminChat(thePlayer,_,...) local text = table.concat({...}, "") local name = getPlayerName(thePlayer) local accName = getAccountName (getPlayerAccount (thePlayer)) if (isObjectInACLGroup ("user." .. accName, aclGetGroup("Admin")) or isObjectInACLGroup ("user." .. accName, aclGetGroup ("SuperModerator")) or isObjectInACLGroup ("user." .. accName, aclGetGroup ("Moderator")) ) then outputChatBox ("#FF0000(Admin Chat) "..name..": #FFFFFF"..text, getRootElement(), 255, 255, 255, true) end end addCommandHandler("ac", adminChat)