SA-MP Forums Archive
[Tutorial] How to make a role play script [BASICS] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Tutorials (https://sampforum.blast.hk/forumdisplay.php?fid=70)
+---- Thread: [Tutorial] How to make a role play script [BASICS] (/showthread.php?tid=550510)



How to make a role play script [BASICS] - Sparke - 13.12.2014

- Introduction -

This is a small/short tutorial to show the basics of creating a roleplay game mode; Keep in mind this is my way.

- Part I -

First off I'd like to get all of the includes you'll need for the GM. First off you'll need a CMD processor (ZCMD, YCMD, ETC.) and you'll need a saving/loading system (DINI, YINI, MySQL, etc.) after picking one saving & loading system, and CMD proccessor you should then make your gamemode more "roleplay" so by this we'll make sure the name's are white, and the nametags are disabled, and create a IC chat. These are pretty easy;

Add this on OnGameModeInit;
pawn Код:
ShowNameTags(0); // This makes name tags disabled - Enabling them by setting the 0 to a 1
UsePlayerPedAnims(); // This gives you the second running style which is more RP IMO
EnableStuntBonusForAll(0); // This disables the stunt bonuses when a player does a jump
DisableInteriorEnterExits(); // This is optional rather because I'm just assuming you'll make your own business/house system so we're gonna disable it.
LimitGlobalChatRadius(10.0); // This limits the chat radius for players you can change the 10.0 to what ever you'd like. (Only players within a 10 radius will be able to see that players text)
Add this on OnPlayerConnect;
pawn Код:
SetPlayerColor(playerid, -1); // This will change the players color to White when they connect to your server
- Part II -

Next you'll need to put your saving/loading system to use and make a register/login system to save your players stats and such. I'm not going to go to into depth with this but you can check out someone else tutorial for this; https://sampforum.blast.hk/showthread.php?tid=352703 All you'll need for that is whirlpool to hash the passwords, and make a enum and some dialogs w/ functions! (Pretty easy)

- Part III -

More coming soon...



Re: How to make a role play script [BASICS] - PedexM - 13.12.2014

Thank's.


Re: How to make a role play script [BASICS] - zT KiNgKoNg - 13.12.2014

To be fair, its pretty basic stuff and people can learn from 'Some' of it.


Re: How to make a role play script [BASICS] - Onepind - 13.12.2014

thank you!


Re: How to make a role play script [BASICS] - Sparke - 14.12.2014

Thanks for all the feedback!