17.09.2012, 11:57
(
Последний раз редактировалось Deal-or-die; 18.09.2012 в 08:37.
)
Okay... As mind f***ing as you might have found the title, I'll try explain a little better.
This is my command
/create
with the option of choosing
House, Business or faction.
When I type
/create house - it displays the house menu
/create business - it displays the house menu
/create faction - it displays the house menu
Eh... Not what I want... haha
I want
/create house - house menu
/create business - Business menu(Eventually, not at the moment)
/create faction - Faction menu(Eventually, not at the moment)
Code
This is my command
/create
with the option of choosing
House, Business or faction.
When I type
/create house - it displays the house menu
/create business - it displays the house menu
/create faction - it displays the house menu
Eh... Not what I want... haha
I want
/create house - house menu
/create business - Business menu(Eventually, not at the moment)
/create faction - Faction menu(Eventually, not at the moment)
Code
pawn Код:
command(create, playerid, params[])
{
if(Player[playerid][pAdmin] <= 4) SendClientMessage(playerid, COLOR_RED, "You're not authorised to use this command");
if(Player[playerid][pAdmin] >= 3 && Player[playerid][pAdminDuty] == 0) SendClientMessage(playerid,COLOR_GREY,"You cannot use this while not on admin duty.");
else
{
new option[20];
if(isnull(params)) // if they didn't type anything after /create
{
// tell em how to use it.
return SendClientMessage(playerid, -1, "USAGE: /create [house/business/faction]");
}
if(!strcmp(option, "house", true))
{
ShowPlayerDialog(playerid, 160, DIALOG_STYLE_LIST, "House Creation Menu", "Set Exterior Position\r\nSet Interior Position\r\nSet Lock\r\nSet Alarm\r\nSet Address\r\nSet Number of Rooms\r\nSet number of Vehicle slots\r\nSet House Price\r\nFinalise","Continue","Close");
Create[playerid][cType] = 1;
return 1;
}
if(!strcmp(option, "business", true))
{
// ShowPlayerDialog(playerid, 170, DIALOG_STYLE_LIST, "Business Creation Menu", "Business Name\r\nSet Business Type\r\nSet Exterior Position\r\nSet Interior Position\r\nSet Lock\r\nSet Alarm\r\nSet Address\r\nSet Business Price\r\nFinalise","Select","Cancel");
// Create[playerid][cType] = 2;
SendClientMessage(playerid,COLOR_WHITE,"Please {FF0000}Note{FFFFFF}: This Option is comming soon.");
return 1;
}
if(!strcmp(option, "faction", true))
{
// ShowPlayerDialog(playerid, 180, DIALOG_STYLE_LIST, "Faction Creation Menu", "Faction Name\r\nFaction Type\r\nGovernment Faction\r\nSub Ranks\r\nPrimary Faction\r\nFaction Leader","Select","Cancel")
Create[playerid][cType] = 3;
SendClientMessage(playerid,COLOR_WHITE,"Please {FF0000}Note{FFFFFF}: This entire faction system is due for a complete re-build, and should only be use primarily as an example.");
return 1;
}
}
return 1;
}