Originally Posted by Assyria
Hello!
![]() I have a command like "/drink" set up with some menus. By default the "/drink" works everywhere by just typing it. So what Im asking is how to make the "/drink" work only in some interriors and NOT everywhere? Do I have to make like those red circles when where standing, it allows /drink? If so, please tell me how to do that too! ![]() Regards, Assyria |
Originally Posted by Assyria
Under what I put that?
![]() |
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/drinks", cmdtext, true, 10) == 0) { ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "What would you like to drink?", "Sprunk ($1)\nBeer ($2)\nWine ($3)", "Purchase", "Cancel"); return 1; } return 0; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) (here is the menu..) {
Originally Posted by Assyria
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/drinks", cmdtext, true, 10) == 0) { ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "What would you like to drink?", "Sprunk ($1)\nBeer ($2)\nWine ($3)", "Purchase", "Cancel"); return 1; } return 0; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) (here is the menu..) { |
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/drinks", cmdtext, true, 10) == 0)
{
if (GetPlayerInterior(playerid)==interiorid) // Replace Interior ID With The Interior ID you want from the link i gave you
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "What would you like to drink?", "Sprunk ($1)\nBeer ($2)\nWine ($3)", "Purchase", "Cancel");
}
else return SendClientMessage(playerid,0xAA0000AA,"Youre Not In The Right Place!");
return 1;
}
return 0;
}
|| interiorid2
if (GetPlayerInterior(playerid)==interiorid || interiorid) // You Can Add as many as you want .
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/drinks", cmdtext, true, 10) == 0) { if(GetPlayerInterior(playerid)== 3 && IsPlayerInRangeOfPoint(playerid,15,-103.559165,-24.225606,1000.718750)) { ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "What would you like to drink?", "Sprunk ($1)\nBeer ($2)\nWine ($3)", "Purchase", "Cancel"); } else return SendClientMessage(playerid,0xAA0000AA,"You have to be in a bar!"); return 1; } return 0;