Create command in game
#1

Hello ,
I am here to get some help about how to do a command in my samp server.
I want to make /buyadmin in a Dialog Box ( Menu style )
The request from the command need to be this :
''If you want to buy admin you need first to contact one of our 3 owners name1_1 , name2_2 and name3_3
Also if you want to know the prices there are:
Admin lvl 1 - 1000 coins
Admin lvl 2 - 2000 coins
Admin lvl 3 - 3000 coins
Admin lvl 4 - 4000 coins
Admin lvl 5 - 5000 coins
Admin lvl 6 - 6000 coins
(Server Name) Staff "

I need help ... yea i am a begginer at scripting so i need a little help .... HELP!

Thanks.
Reply
#2

Allowing people to "buy" admin doesn't seem like a good idea considering your server will eventually be all admins making the game boring.
Reply
#3

I dont make it with coins,i agree what u said .....that buy admin shold look like admin lvl 1 = 3 euro ..
Reply
#4

Define the DIALOG by yourself BTW i did this in DIALOG_STYLE_MSGBOX

Код:
COMMAND:buyadmin (playerid, params[])
{
	new Msg[2000];

	format(Msg, 2000, "{FFFFFF}%s If you want to buy admin you need first to contact\n ", Msg);
        format(Msg, 2000, "{FFFFFF}%s one of our 3 owners name1_1 , name2_2 and name3_3n\n ", Msg);
	format(Msg, 2000, "{FFFFFF}%s Also if you want to know the prices there are:\n ", Msg);
	format(Msg, 2000, "{FFFFFF}%s Admin lvl 1 - 1000 coins\n ", Msg);
	format(Msg, 2000, "{FFFFFF}%s Admin lvl 2 - 2000 coins\n ", Msg);
	format(Msg, 2000, "{FFFFFF}%s Admin lvl 3 - 3000 coins\n ", Msg);
	format(Msg, 2000, "{FFFFFF}%s Admin lvl 4 - 4000 coins\n ", Msg);
	format(Msg, 2000, "{FFFFFF}%s Admin lvl 5 - 5000 coins\n ", Msg);
        format(Msg, 2000, "{FFFFFF}%s Admin lvl 6 - 6000 coins \n ", Msg);
        format(Msg, 2000, "{FFFFFF}%s (Server Name) Staff\n ", Msg);
	ShowPlayerDialog(playerid, THE_DIALOG, DIALOG_STYLE_MSGBOX, "{FFFFFF}Be an admin:", Msg, "Okay!","");

	return 1;
}
Reply
#5

I got some errors

warning 203: symbol is never used: "buyadmin"
error 013: no entry point (no public functions)

It doesn't working here is the full code:


COMMAND:buyadmin (playerid, params[])
{
new Msg[2000];

format(Msg, 2000, "{FFFFFF}%s If you want to buy admin you need first to contact\n ", Msg);
format(Msg, 2000, "{FFFFFF}%s one of our 3 owners exid1 , exid2 and exid3\n ", Msg);
format(Msg, 2000, "{FFFFFF}%s Also if you want to know the prices there are:\n ", Msg);
format(Msg, 2000, "{FFFFFF}%s Admin lvl 1 - x euro\n ", Msg);
format(Msg, 2000, "{FFFFFF}%s Admin lvl 2 - x euro\n ", Msg);
format(Msg, 2000, "{FFFFFF}%s Admin lvl 3 - x euro\n ", Msg);
format(Msg, 2000, "{FFFFFF}%s Admin lvl 4 - x euro\n ", Msg);
format(Msg, 2000, "{FFFFFF}%s Admin lvl 5 - x euro\n ", Msg);
format(Msg, 2000, "{FFFFFF}%s Admin lvl 6 - x euro\n ", Msg);
format(Msg, 2000, "{FFFFFF}%s (ServerName) Staff\n ", Msg);
ShowPlayerDialog(playerid, THE_DIALOG, DIALOG_STYLE_MSGBOX, "{FFFFFF}Be an admin:", Msg, "Okay!","");

return 1;
}
Reply
#6

strcat is the bomb!

pawn Код:
new mydialog[256];
strcat(mydialog,"1. If you wish to be admin contact bla _1 2 and 3 \n");
strcat(mydialog,"2. Prices to be an admin here are below: \n");
strcat(mydialog,"3. Admin level 1 - 1000 coins \n");
strcat(mydialog,"4. Admin level 2 - 2000 coins \n");
strcat(mydialog,"5. Admin level 3 - 3000 coins \n");
//rest of the code
..................
.....................
ShowPlayerDialog(playerid,your dialog id,DIALOG_STYLE_MSGBOX, "Administration", mydialog,"first
Reply
#7

like a good idea considering your server will eventually be all admins making the game boring.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)