Jump to content

Sparrow

Members
  • Posts

    378
  • Joined

  • Last visited

Everything posted by Sparrow

  1. function createFaislTeam() faislTeam = createTeam ("Faisl", 255, 0, 0) end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), createFaislTeam) function joinFaislTeam(player) local getTeam = getTeamFromName ("Faisl") if (getTeam) then setPlayerTeam (player, faislTeam) setElementModel (player, 100) end end addCommandHandler("join_faisl_team", joinFaislTeam)
  2. testWindow = guiCreateWindow(505,148,194,119,"Test Window",false) -- we create a window close_Button = guiCreateButton(48,42,89,35,"Close",false,testWindow) -- we create a button function onResourceStart () guiSetVisible(testWindow, false) -- didn't show the gui when resource start end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onResourceStart) function showTheWindow() getVisible = guiGetVisible(testWindow) player = getPlayerName(localPlayer) if (getVisible == false) then guiSetVisible(testWindow, true) showCursor(true) end end addCommandHandler("show_window", showTheWindow) function closeTheWindow() guiSetVisible(testWindow, false) -- remove the window from the screen showCursor(false) -- remove the mouse from the screen end addEventHandler("onClientGUIClick", close_Button, closeTheWindow, false) -- add an event to close close the gui
  3. -- function guiCreateWindow guiCreateButton -- event 'onClientGUIClick'
  4. elmota, you mean when player wasted show a gui where he can respawn?
  5. نحن عرب مسلمون, يجب أن نكون الأفضل و نساعد بعضنا server side: function createFaislTeam() team = createTeam ("Faisl", 255, 0, 0) -- create team named faisl with red color (إنشاء فريق اسمه فيصل و لونه أحمر) end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), createFaislTeam) function joinFaislTeam(player) local team = getTeamFromName ("Faisl") -- Search for team named faisl (البحث عن فريق اسمه فيصل) if (team) then -- if we found it (إذا وجدناه) setPlayerTeam (player, team) -- set player on faisl team (وضع لاعب في فريق فيصل) setElementModel (player, 100) -- set player skin to ID: 100 (وضع شخصية الاعب 100) end end addCommandHandler("join_faisl_team", joinFaislTeam) change '100' to any other skin: http://wiki.sa-mp.com/wiki/Skins:All
  6. Sparrow

    Col Shape

    thanks castillo, it works.
  7. paruyr, you can use 'edit' button and stop double posting.
  8. Sparrow

    Col Shape

    still not working
  9. Sparrow

    Col Shape

    it didn't work, no erros on debug, also I try it client side (onClientColShapeHit/onClientColShapeLeave)
  10. Sparrow

    Col Shape

    didn't work, no erros on debug
  11. Sparrow

    Col Shape

    well, this is my first time I use col shape and the radar stuffs. I've created a radar and a rectangle, this what I did, it didn't work. local radar = createRadarArea(-466.317, -468.559, -150, -90, 255, 255, 0, 175) local colRectangle = createColRectangle(-466.317, -468.559, -150, -90) function onEnter(thePlayer) if (getElementType(player) == "player") then outputChatBox("You entered the zone, welcome.", thePlayer, 0, 255, 0) end end addEventHandler("onColShapeHit", colRectangle, onEnter) function onExit(thePlayer) if (getElementType(player) == "player") then outputChatBox("You left the zone, good bye.", thePlayer, 0, 255, 0) end end addEventHandler("onColShapeLeave", colRectangle, onExit)
  12. السلام عليكم أنا أقوم به لوحة الادارة و onClientPlayerQuit لا تعمل function onPlayerQuit() guiGridListClear(playersList) for id, players in ipairs">ipairs (getElementsByType("player")) do guiGridListRemoveRow(playersList, id) guiGridListSetItemText(playersList, row, -1, getPlayerName(players), false, false) end end addEventHandler("onClientPlayerQuit", getRootElement(), onPlayerQuit)
  13. you use: hitElement and matchingDimension and you use source, thePlayer, elementType after that to set player team, skin and on outputChatBox also, it's "cylinder" or 'cylinder' not cylinder another thing, all players will get the 2 messages.
  14. Sparrow

    help [Gui]

    this may work function blabla() screenWidth,screenHeight = guiGetScreenSize() mainWidth = 320 mainHeight = 300 windowChangepw = guiCreateWindow(screenWidth/2-mainWidth/2,screenHeight/2-mainHeight/2,mainWidth,mainHeight,"Change Password",true) TextLabeOld = guiCreateLabel(9,40,84,18,"Old Password :",false,windowChangepw) TextLabelNewPW = guiCreateLabel(9,71,90,19,"New Password :",false,windowChangepw) editOldpw = guiCreateEdit(95,37,196,24,"",false,windowChangepw) editNewpw = guiCreateEdit(99,68,196,24,"",false,windowChangepw) ButtonChange = guiCreateButton(27,130,113,25,"Change it!",false,windowChangepw) ButtonCancel = guiCreateButton(252,130,113,25,"Cancel",false,windowChangepw) guiSetVisible(windowChangepw, true) guiWindowSetMovable(windowChangepw, false) guiWindowSetSizable(windowChangepw, false) guiLabelSetColor(TextLabeOld,150,100,0) addEventHandler( "onClientGUIClick", ButtonCancel, hidewindow ) end function changeMyPw() if (windowChangepw) then if (guiGetVisible(windowChangepw) == true) then showCursor(false) guiSetVisible (windowChangepw, false) elseif (guiGetVisible(windowChangepw) == false) then showCursor(true) guiSetVisible (windowChangepw, true) end end end addCommandHandler("changepw", changeMyPw)
  15. Sparrow

    help [Gui]

    try this: screenWidth,screenHeight = guiGetScreenSize() mainWidth = 320 mainHeight = 300 windowChangepw = guiCreateWindow(screenWidth/2-mainWidth/2,screenHeight/2-mainHeight/2,mainWidth,mainHeight,"Change Password",true) TextLabeOld = guiCreateLabel(9,40,84,18,"Old Password :",false,windowChangepw) TextLabelNewPW = guiCreateLabel(9,71,90,19,"New Password :",false,windowChangepw) editOldpw = guiCreateEdit(95,37,196,24,"",false,windowChangepw) editNewpw = guiCreateEdit(99,68,196,24,"",false,windowChangepw) ButtonChange = guiCreateButton(27,130,113,25,"Change it!",false,windowChangepw) ButtonCancel = guiCreateButton(252,130,113,25,"Cancel",false,windowChangepw) guiSetVisible(windowChangepw, false) guiWindowSetMovable(windowChangepw,false) guiWindowSetSizable(windowChangepw,false) guiLabelSetColor(TextLabeOld,150,100,0) function changePw() if (windowChangepw) then if (guiGetVisible(windowChangepw) == true) then showCursor(false) guiSetVisible (windowChangepw, false) else showCursor(true) guiSetVisible (windowChangepw, true) end end end addCommandHandler("changepw", changePw)
  16. Sparrow

    help [Gui]

    function loldd() if source == ButtonCancel then guiSetInputEnabled(true) guiSetVisible(windowChangepw, false) showCursor(false) end end addEventHandler( "onClientGUIClick", getRootElement(), loldd ) function changePw() guiSetInputEnabled(false) guiSetVisible(windowChangepw, true) showCursor(true) end addCommandHandler("changepw", changePw) screenWidth,screenHeight = guiGetScreenSize() mainWidth = 320 mainHeight = 300 windowChangepw = guiCreateWindow(screenWidth/2-mainWidth/2,screenHeight/2-mainHeight/2,mainWidth,mainHeight,"Change Password",true) TextLabeOld = guiCreateLabel(9,40,84,18,"Old Password :",false,windowChangepw) TextLabelNewPW = guiCreateLabel(9,71,90,19,"New Password :",false,windowChangepw) editOldpw = guiCreateEdit(95,37,196,24,"",false,windowChangepw) editNewpw = guiCreateEdit(99,68,196,24,"",false,windowChangepw) ButtonChange = guiCreateButton(27,130,113,25,"Change it!",false,windowChangepw) ButtonCancel = guiCreateButton(252,130,113,25,"Cancel",false,windowChangepw) guiSetVisible(windowChangepw, false) guiWindowSetMovable(windowChangepw,false) guiWindowSetSizable(windowChangepw,false) guiLabelSetColor(TextLabeOld,150,100,0) you forget an 'end' to close if on line 2 ganjarulez
  17. that server side is mine, maybe he change it to another resource and he deleted the server side of that resource, for that it didn't work.
  18. that SS show the server side, and that server side is working, maybe you change it to another resource or so
  19. Sparrow

    help PLZ

    try this: function removePin(thePlayer,playername) local player = getPlayerFromName(playername) if (player) then for i, v in pairs">pairs(player) do if getElementType(v) == "blip" then destroyElement(v) end end else outputChatBox("Player not found",thePlayer,255,0,0) end end addEvent("unmark", true) addEventHandler("unmark", getRootElement(), removePin)
  20. أنا أعمل على الأدمينية (admin panel) كيف أضع الأديت تبحث عن الاعبين
  21. كيف أقوم بسكريبت التي تبحث عن الاعب في الأدمينية
×
×
  • Create New...