This site has been archived and made available for preservation purposes. No edits can be made.

Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 23

Thread: Tutorials and Packages

  1. #11
    I understand now, but there are a lot of things I am still confused about as the tutorials show only C and C++ which I don't even know anything about. Such as DEFAULT_PLAYER_RESPAWN and SetRespawn. Where do I place these in my Pawn script?

  2. #12
    Administrator
    Join Date
    Jun 2011
    Location
    Germany
    Posts
    1,057
    Blog Entries
    5
    Where is the "tutorial" that only shows C/C++? It's just documentation of functions. You place calls inside callbacks or functions you wrote yourself. Sorry, but I really see no difficult thing about it. It's no different than i.e. SA-MP except for a different set of functions and callbacks.

    DEFAULT_PLAYER_RESPAWN is a constant. SetRespawn is a function. Place and use them whereever you think it's appropriate in your script. There is no such thing as "where to place in a script". This is programming. Check the example standard.pwn script or code snippets like https://www.vaultmp.com/showwiki.php?...ript+Fallout+3 - I can't help more than that.
    Last edited by foxtacles; 10-03-2012 at 05:19 PM.

  3. #13
    Yes but when I want to define the DEFAULT_PLAYER_RESPAWN where do I insert this inside my Pawn script... such as main() or what?

  4. #14
    Administrator
    Join Date
    Jun 2011
    Location
    Germany
    Posts
    1,057
    Blog Entries
    5
    It is defined: https://github.com/Foxtacles/vaultmp...de/vaultmp.inc

    I don't think you have a basic understanding of the language (and using it), else it should be the most native thing on earth for you to recognize.

  5. #15
    Ah, I see. But, what if I wanted to make the respawn time different, would I use SetRespawn?

  6. #16

  7. #17
    Mate, I understand how to script SA:MP servers, it's just you have no callback for OnPlayerDeath or anything like that, so I don't fully understand where I put SetRespawn? Does this go inside the main(), and if so the syntax seems to be incorrect.
    Code :
    #include <vaultmp>
     
    main()
    {
    	printf("The Wasteland Roleplay \n Owners: TommyGun and Monster");
    	SetServerName("The Wasteland Roleplay");
    	SetServerRule("website", "www.forums.empire-bay.com");
    	SetServerRule("game", "Fallout 3");
    	SetServerRule("mode", "Roleplay/TDM");
    	SetServerMap("The Capital Wasteland");	
    }
    I inserted 'SetRespawn(120000);' into the bottom of my main() code and it didn't compile...

  8. #18
    Administrator
    Join Date
    Jun 2011
    Location
    Germany
    Posts
    1,057
    Blog Entries
    5
    A Player is an Actor, therefore all actor callbacks are getting called for players as well. OnActorDeath.

    https://www.vaultmp.com/showwiki.php?...ting+callbacks

    Quote Originally Posted by TommyGun View Post
    I inserted 'SetRespawn(120000);' into the bottom of my main() code and it didn't compile...
    Then you are doing something wrong, because it does work.

  9. #19
    Oh, I see, I thought 'OnActorDeath' was simply for NPCs.

  10. #20
    Another stupid fucking question:
    How do you create commands?

    This seems to be my hotspot within SA:MP scripting, so I'd like to know.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •