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?
Printable View
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.
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.
Ah, I see. But, what if I wanted to make the respawn time different, would I use SetRespawn?
Yes...just read that documentation...
https://www.vaultmp.com/showwiki.php?title=SetRespawn
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.I inserted 'SetRespawn(120000);' into the bottom of my main() code and it didn't compile...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"); }
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
Then you are doing something wrong, because it does work.
Oh, I see, I thought 'OnActorDeath' was simply for NPCs.
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.