Question for server?
#1

Hello my question is if it is possible when someone join my server to see dialog "what you are" and bottom have 2 buttons Male and Female and when click Male and reg his account (by clicking MALE to start with random 3 male skins who i put) and everytime when this player join server to skip his Class selection and play with latest skin in server and spawn i n his latest position in server when his left... and when i give this player another skin everytime when the player join to the gmae start with new skin Sorry for my bad english if you dont understand something i try to correct it Thx in advance!
P.S. i search aleready in ****** but i dont find anything...
Reply
#2

Check this out: https://sampwiki.blast.hk/wiki/OnPlayerClickTextDraw

Shows you how, provides an example. Change the example text draw stuff (size, placement, background, etc) to your male/female one.
Reply
#3

To randomize skins :
Код:
new RandomSkinMale[][] =
{
	{0}, // skin 1
	{1}, // skin 2
	{2} // skin 3
};

new RandomSkinFemale[][] =
{
	{3}, // skin 1
	{4}, // skin 2
	{5} // skin 3
};
Function to randomize
Код:
random(sizeof(RandomSkinMale))
Код:
random(sizeof(RandomSkinFemale))
Reply
#4

Okay, here we go. Create a dialog using ShowPlayerDialog which contains the gender question and call certain action under OnDialogResponse callback. The next thing u have to do is creating an array with all skins players are supposed to get randomly, using random function of course. The next step u gotta make is mysql database or files or whatever you wanna use to keep player's info and stats. Later then, check those within player's connection and use SetPlayerSkin with an parameter kept in your database or files.
Reply
#5

Quote:
Originally Posted by cdoubleoper
Посмотреть сообщение
Okay, here we go. Create a dialog using ShowPlayerDialog which contains the gender question and call certain action under OnDialogResponse callback. The next thing u have to do is creating an array with all skins players are supposed to get randomly, using random function of course. The next step u gotta make is mysql database or files or whatever you wanna use to keep player's info and stats. Later then, check those within player's connection and use SetPlayerSkin with an parameter kept in your database or files.
lol... sounds really HARD..... maybe this is not for beginners like me....
Reply
#6

Hmm.. You want to create an RP server? RP server is the hardest to create. There are so, so, so, many things to do.
If you are a beginner, try to create a server where you test your own command. It's a good way to learn to script.
Reply
#7

Hey Bulgaria, I don't know if you remember me or not.. anyway
It's not really hard, if you want it in simple understanding:
> If the player isn't registered, show him a dialog(ShowPlayerDialog) asking which gender he wants to set.
> When he clicks male/female, set his skin and save his stats on OnDialogResponse (tutorials available!)
That's all!

NOTE: if the player isn't registered save his stats, then simply load it ignoring the following steps
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)