This site has been archived and made available for preservation purposes. No edits can be made.
-
Junior Member
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?
-
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.
-
Junior Member
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?
-
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.
-
Junior Member
Ah, I see. But, what if I wanted to make the respawn time different, would I use SetRespawn?
-
-
Junior Member
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...
-
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
Originally Posted by
TommyGun
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.
-
Junior Member
Oh, I see, I thought 'OnActorDeath' was simply for NPCs.
-
Junior Member
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
-
Forum Rules