Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. function player_Spawn ( posX, posY, posZ, spawnRotation, theTeam, theSkin, theInterior, theDimension ) if(not firstspawn[source]) then firstspawn[source] = true; givePlayerMoney ( source, 10000 ) blip = createBlipAttachedTo (source, 56) setElementVisibleTo ( blip, source, false ) end end addEventHandler ( "onPlayerSpawn", getRootElement(), player_Spawn ) You don't need sourceP here, since source is already the player element who just spawned.
  2. Somehow it auto enables, lol.
  3. I don't think MTA has this included, i think the Stamina won't affect anything, i would use Karlis idea. stamina = 100 addEventHandler ( "onClientPlayerSpawn", getLocalPlayer(), function () stamina = 100 setTimer(checkKey,700,0) setTimer(updateStamina,1000,0) end) function checkKey() if ( getControlState ( "sprint" ) ) and stamina ~= 0 then stamina = stamina -1 end if ( stamina == 0 ) then setControlState( "sprint", false ) end end function updateStamina() if stamina ~= 100 and getControlState ( "sprint" ) == false then stamina = stamina +1 end end Works (tested).
  4. I think he's a newbie? because if that's the full script, he's forgeting some things. addCommandHandler("blip", function (sourceP) local blip = createBlipAttachedTo (sourceP, 56) setElementVisibleTo ( blip, sourceP, false ) end) I think that should work.
  5. function onClick() guiSetVisible(myWindow,true) end addEventHandler("onClientGUIClick",yourButtonElement,onClick,false) Do you mean that?
  6. https://community.multitheftauto.com/index.php?p= ... ls&id=2166 Some kind of advertisement script, nothing else.
  7. Do you mean like Stamina? if so, i don't think there's a way to disable that, maybe make an script?
  8. Castillo

    plz vote

    Voted & Confirmed e-mail.
  9. Castillo

    Anti_Hack Help

    Oh, i suposed the Spam of warning was intended, lol. Anyway if you fixed it, great, and no problem .
  10. blip = createBlipAttachedTo (source, 56) setElementVisibleTo ( blip, source, false ) players = getElementsByType ( "player" ) for k, v in ipairs(players) do if(v ~= source) then setElementVisibleTo ( blip, v, true ) end end
  11. Omg, you did triple post for no reason! use the f*** "EDIT" button!
  12. It is working, i personally tested it, show me what are you doing.
  13. addCommandHandler("kill", function (player) setTimer(killPed,30000,1,player) outputChatBox("You will die in 30 seconds!",player,255,0,0) end) addEventHandler("onClientPlayerWasted",getLocalPlayer(), function () guiSetVisible(myGUI,true) end)
  14. Well, that's pretty simple, when you login show the rules GUI and then the Spawn menu.
  15. Castillo

    Anti_Hack Help

    Ok, this code should do what you want. hackers = {} function hacker(player, commandName, name) local hacker = getPlayerFromName(name) if not isHackerInList(hacker) then table.insert(hackers,{hacker, name}) outputChatBox("* Added "..tostring(name).." to hacker's list!",player,255,0,0) else outputChatBox("* "..tostring(getPlayerName(hacker)).." is already in hacker's list!",player,255,0,0) end end addCommandHandler("hack",hacker) function isHackerInList(name) for i,v in pairs(hackers) do if v[1] == name then return true end end return false end function disableHacker() for i,v in pairs(hackers) do if isElement(v[1]) then local theVehicle = getPedOccupiedVehicle (v[1]) if theVehicle then destroyElement(theVehicle) end setElementPosition(v[1], 0, 0, 3) outputChatBox("TURN OFF OR REMOVE THE HACK!",v[1],255,0,0) end end end setTimer(disableHacker,200,0) addCommandHandler("doesnthack",function(player,_,name) for i,v in pairs(hackers) do if v[2] == name then table.remove(hackers,i) outputChatBox("* Removed "..tostring(name).." from hacker's list!",player,0,255,0) end end end)
  16. Castillo

    f

    I know how to do it, but i'm not going to help you, wait for someone else.
  17. I don't get you, what do you mean?
  18. I'm afraid i don't get your script, what do you want to do? create a gang and add the gang data to his/her account? because here you are adding an account with the gang name o,o.
  19. Seriously, i'm confused... .. what do you mean? i didn't posted in this topic to help anyone, i wanted to give my opinion about the topic.
  20. Castillo

    f

    Even worst, stealing client-side scripts it's f** annoying & stupid.
  21. Bios, if you don't know the forum rules is not my problem, i just know you can't speak any other language than English, that's why the languages section is there. Also, i wasn't helping anyone, i was giving my opinion, think twice before post
  22. Yes it does, but i'm lazy to check download it again.
  23. Castillo

    Anti_Hack Help

    There's no such function: destroyTimer o,o, i think you mean killTimer? addCommandHandler("doesnthack",function(_,_,name) killTimer(timers[getPlayerFromName(name)]) end)
×
×
  • Create New...