Jump to content

Extremo

Members
  • Content Count

    37
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Extremo

  • Rank
    Rat
  • Birthday 02/01/1993

Details

  • Location
    Bremen, Germany
  • Occupation
    Student and sometimes programmer in some companys.
  • Interests
    Programming and everything else of course
  1. Hm, I tested your idea about triggering a server event as well, but it didn't work either. So I am having a guess here that somewhere inside the code there is an error that makes it impossible for the client to load the script at all. I'll have a look at it now and see if I can find any error - if not I'll probably get back to this thread and post some more code. The code is quite big and I don't wanna end up asking you to make it for me. EDIT: You're actually right - the problem lies in the simple fact that the client script is not yet loaded when the server is requesting the particular eve
  2. Hey guys, I am literally ripping my hair out here. I've been working on this since the morning and it just keeps on giving me the same error no matter what I try. It's funny because I actually don't see anything wrong at all - so I guess another pair of eyes might be nice. The problem is that I call a client-event from my server but I keep getting the issue back that apparently this "client-event" has not been added by the client. Here's a couple lines: Server: function ShowAccountMenu() setElementFrozen(source, true) if getAccount(getPlayerName(source)) then trigge
  3. Hey, The problem is that onResourceStart does not actually have a player-parameter. It has a source parameter which however in your case would be: function showTextDisplay ( player ) -- player == getResourceRootElement(getThisResource()) Which for obvious reasons is not the player. You can figure the rest from there I am sure. Regards.
  4. Extremo

    Hide map

    Weird, for me it still displays it. Are you sure you made it all clientside? function DisableMap() toggleControl("radar", false) end addEventHandler("onClientResourceStart", getRootElement(), DisableMap) Works flawless on clientside. @ Shadow Your script enables it for everybody or disables it for everybody doesn't it? I want to disable it for everybody and renable it for specific players - not everybody. Regards.
  5. Thanks I found the problem. I left out the third arguement on SetTimer assuming that it would automatically be zero, but instead it actually didn't create the timer at all. Silly me. This is now solved. Thanks for all the help =)
  6. You only made some code to make the ped walk forwards and I've already made that - my concern lies within the function to update the rotation for every player which I posted here: Click me EDIT: Nevermind I just saw yours lol. Must of skipped that one somehow. EDIT2: Yeah I already changed the if like you have, so the problem is probably not in there. You also have the SetTimer thing execute the UpdatePeds only 5 times and I've already removed that as well. The "if" looks like this: if not (ped[p]==nil) then So the problem isn't in there. It's rather that for some weird reason,
  7. Thanks for figuring out that one but it didn't fix the whole thing either way. It still doesn't work so I added a debug to see if it even finds any "ped[p]" that isn't nil and it doesn't. Which leads me to the question that maybe the "ped" array is wrong? EDIT: I forgot to mention tho that I use the "ped" array already before-hand to make the ped walk forwards and that works fine. However inside the loop the ped array doesn't seem to work properly. Can you see any reason why?
  8. Because one gets the position of the player, the other however gets the position of the ped?
  9. Oh, I thought that was the time the function may have to execute. Ah I just read the wiki again and I clearly misread it. I thought it said: "TimeToExecuteFunction" Thanks again! EDIT: It doesn't seem to work even after changing the SetTimer thing.
  10. Right, I sort of fixed the issue. Apparently the issue was using "table.insert" which I used after I saw it being used by one of the above posters. Though now that it does work, another code that was connected to it still doesn't. Could someone have a look at this? I am sorry I don't mean to ask you all to code for me but I am not so familiar with this all. The solution to my first problem was just adding forward btw. The problem however why it didn't work even though I added forward was because the lua script crashed at "table.insert". After I reverted that change for obvious reasons it work
  11. Already did. It does and I also checked if any of them is nil - they aren't. In fact thePlayer is correct. Not sure if thePed arguement is passed on correctly though.
  12. I am afraid but that didn't fix the issue.
  13. Extremo

    Hide map

    I don't think you understood my question precisely. I am trying to toggle the F11 map for everybody though if I give them a map script-wise I want to re-enable the map for them, but only for those who DO have a map.
  14. I think you must use setPedAnimation. Well that would just play the animation but not move the ped.
  15. Hey, Apart from the table.insert I don't see much difference. Also, it actually doesn't save the ped's related to the player but only stores the peds related to peds which is not what I want. I want the ped to store in that array relative to the player's index. I hope you get my point. However since yours isnt really that different how'd yours make a difference? The ped is being created fine however it doesn't start moving.
×
×
  • Create New...