Jump to content

xScatta

Members
  • Posts

    181
  • Joined

  • Last visited

Everything posted by xScatta

  1. Hello. My question is how i can cut last part of number like if i have number like this 5436.646347 Then i want to it like this 5436 Fast help please. Greets, xScatta.
  2. xScatta

    Group Check

    BTW. Thisisdoge don't disturb me i just wanted to help...
  3. xScatta

    Group Check

    Try that. ((Not Tested)). function CAP () COP = createTeam ("COPS",0,0,255) CR = createTeam("CRIMINALS",255,0,0) end CAP() function JC (thePlayer) setPlayerTeam(thePlayer,CR) outputChatBox("Welcome to the criminals team",thePlayer) end addCommandHandler("Criminal",JC) function JP (thePlayer) setPlayerTeam(thePlayer,COP) outputChatBox("Welcome to the cops team",thePlayer) end addCommandHandler("Cop",JP) function checkCriminal (thePlayer) team = getTeamFromName("CRIMINALS") if getTeamName(team) then return true else return false end end
  4. Hey all. My question is. Do i can use executeCommandHandler with command /login and /register?
  5. Thanks it works! But can you delete code Im wanna to make it unique
  6. hey guys code here problem below: CODE REMOVED problem is here because i cant join to world by name like im creating world /createworld lol and i can use /joinworld lol to join into it help!
  7. Thanks for all. Just started the project. It will be named |OW| Own World I hope it will success : )
  8. Hey code here problem below: markerx = createMarker(361.82,173.61,1008.38,"cylinder") setElementInterior(markerx,3) state = 0; function payday(playerSource) if state==0 then if isElementWithinMarker(playerSource,markerx) then outputChatBox("Zaczeles rabunek poczekaj 2 min.",playerSource,255,255,255,true) setTimer ( function () givePlayerMoney(playerSource,25000) outputChatBox("Obrabowales bank a teraz uciekaj jezeli ktos cie zabije w przeciagu 5min to stracisz kase!",playerSource,0,0,0,true)addEventHandler("onPlayerWasted",playerSource,paydayx) end, 120000, 1 ) state = state + 1 paydayt() else outputChatBox("Musisz byc w markerze.",playerSource) end else outputChatBox("Juz ktos obrabowoje bank.",playerSource) end end function paydayx(ammo,killer) if state==1 then takePlayerMoney(source,25000) givePlayerMoney(killer,25000) outputChatBox("Zostales zabity przez: "..getPlayerName(killer).." straciles kase ktora obrabowales.",source,0,0,0,true) outputChatBox("Zabiles: "..getPlayerName(source).." ktory obrabowal bank przed chwila i zarobiles 25,000",killer,0,0,0,true) state = state - 1 removeEventHandler("onPlayerWasted",playerSource,payday) end end function paydayt() setTimer ( function () removeEventHandler("onPlayerWasted",playerSource,payday) end,300000,1) state = state - 1 end addCommandHandler("heist",payday) Problem exist's in here because when i type /heist and wait the 2Mins like in settimer then i get money but when someone kill me before state was changed to 0 then nothing happen's. i don't lose my money and player dont get his money.
  9. nothing happens with your code. TAPL.
  10. I know that i just want to work even if when the data will be reset at restart!
  11. @Solidsnake14 hey i was writing like that now. savestore = {} function ssavequit() savestore[getPlayerSerial(source)] = getAllElementData(source) end function ssavejoin() local serial = getPlayerSerial ( source ) if ( savestore[serial] ) then for index, variable in pairs ( savestore[serial] ) do setElementData ( source, index, variable ) end end end addEventHandler("onPlayerQuit",getRootElement(),ssavequit) addEventHandler("onPlayerJoin",getRootElement(),ssavejoin)
  12. Nope dont works. i dont have my element data.
  13. Please write me it because i dont know which one.
  14. Not working on join dont giving data.
  15. Hey guys code here problem below. savestore = {} function ssavequit() k = getPlayerSerial(source) savestore[k] = getAllElementData(source) end function ssavejoin() serial = getPlayerSerial(source) if serial==k then setAllElementData(source,savestore[k]) end end addEventHandler("onPlayerQuit",getRootElement(),ssavequit) addEventHandler("onPlayerJoin",getRootElement(),ssavejoin) function setAllElementData(element, data) for key, value in pairs(data) do setElementData(element, key, value) end end so i want to save player data to serial at quit and when player join with his serial he gets his data help fast please .
  16. Thanks. But i maked it without tables just using Locals.
  17. Code here problem are down: CODE REMOVED Have an problem because when are more than one player using the command then only first used "flara" dissappear and when vehicle appear then it appears in last call of command. Help Please!
  18. Hey code here problem below: names = {"James","John","Johnny","Cesar"} subnames = {"Rodriguez","Johnshon","Thomson","Black"} function nick() players = getElementsByType("player") setPlayerNametagText(players,math.random(names).."_"..math.random(subnames)) end addCommandHandler("rpnick",nick) i want to script random the names and subnames for every player but idk how to use ipairs
  19. I think Castillo, can do it but for not cheap price.
  20. Working for one player. Tommorow i will chcek if work with more players. Thanks
×
×
  • Create New...