10.02.2017, 02:22
PHP код:
CMD:druglab(playerid, params[])
{
new option[13], option2[13];
sscanf(params, "s[13]", option);
if(isnull(option))
{
SCM(playerid, COLOR_GREY, "INFO: /druglab <optiune>");
if(PlayerInfo[playerid][pAdmin] >= 3)
{
SCM(playerid, COLOR_WHITE, "DRUGLAB ADMIN: "COL_GREY"create | move");
}
SCM(playerid, COLOR_GREY, "OPTIUNI: grantacces | hire | fire | lock | info");
}
else if(!strcmp(option, "info"))
{
sscanf(params, "s[13]", option2);
if(isnull(option2))
{
SCM(playerid, COLOR_GREY, "/druglab info <cmds/inv>");
}
else if(!strcmp(option, "cmds"))
{
if(PlayerInfo[playerid][pAdmin] >= 3)
{
SCM(playerid, COLOR_YELLOW, ">> /druglab create");
SCM(playerid, COLOR_WHITE, "Aceasta comanda creaza un druglab la pozitia playerului.");
SCM(playerid, COLOR_YELLOW, " ");
SCM(playerid, COLOR_YELLOW, ">> /druglab move");
SCM(playerid, COLOR_WHITE, "Aceasta comanda muta locatia unui druglab.");
}
SCM(playerid, COLOR_YELLOW, ">> /druglab grantacces");
SCM(playerid, COLOR_WHITE, "Cu aceasta comanda poti da o cheie de la druglab altui jucator.");
SCM(playerid, COLOR_YELLOW, " ");
SCM(playerid, COLOR_YELLOW, ">> /druglab hire");
SCM(playerid, COLOR_WHITE, "Aceasta comanda creaza un NPC la pozitia la care te afli.");
SCM(playerid, COLOR_YELLOW, " ");
SCM(playerid, COLOR_YELLOW, ">> /druglab fire");
SCM(playerid, COLOR_WHITE, "Aceasta comanda sterge NPCul din druglab.");
SCM(playerid, COLOR_YELLOW, " ");
SCM(playerid, COLOR_YELLOW, ">> /druglab lock");
SCM(playerid, COLOR_WHITE, "Aceasta comanda incuie druglab-ul.");
}
}
return 1;
}
But I want that every option will also have a option.. above is what I tried, but it didn't work.
Example
/druglab info <cmds/inv>