Help me!
#1

I have commands!
For commands /bar i need the message you not in bar
For command /drugs you not in drug house

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/kill", cmdtext, true, 10) == 0)
	{
	SetPlayerHealth(playerid, 0);
	return 1;
	}
 	if(!strcmp("/bar", cmdtext, true) && PlayerToPoint(1.5,playerid,497.4167,-75.4108,998.7578))
 	{
	ShowPlayerDialog(playerid, 50, DIALOG_STYLE_LIST, "Что желаем?", "Напиток ($1)\nПиво ($2)\nВино ($3)\nСигара ($5)", "Купить", "Уйти");
	return 1;
 	}
 	if(!strcmp("/bar", cmdtext, true) && PlayerToPoint(1.5,playerid,498.9911,-20.6630,1000.6797))
 	{
	ShowPlayerDialog(playerid, 50, DIALOG_STYLE_LIST, "Что желаем?", "Напиток ($1)\nПиво ($2)\nВино ($3)\nСигара ($5)", "Купить", "Уйти");
	return 1;
 	}
 	if(!strcmp("/drugs", cmdtext, true) && PlayerToPoint(1.5,playerid,323.7905,1120.0074,1083.8828))
 	{
	ShowPlayerDialog(playerid, 51, DIALOG_STYLE_LIST, "Что будем принимать?", "Травка ($50)\nКокс ($200)", "Купить", "Уйти");
	return 1;
 	}
 	if(strcmp(cmdtext, "/tabletka", true) == 0)
  {
  SetPlayerWeather(playerid, 10);
  SetPlayerDrunkLevel(playerid, 2000);
  SendClientMessage(playerid, 0x00C0C0AA, "Тебе помогла таблетка...");
  return 1;
	}
  if(!strcmp("/heal", cmdtext, true) && PlayerToPoint(1.5,playerid,2033.8627,-1404.4601,17.2588))
  {
  SetPlayerHealth(playerid, 100);
  SendClientMessage(playerid, 0x00C0C0AA, "Тебя вылечили.");
	return 1;
  }
	return 0;
}
Reply
#2

What is wrong with the code as it is?
Reply
#3

If your just wanting it to say "Your not in a bar" and "Your not in the drug warehouse, I think you should do this

Код:
 	if(!strcmp("/bar", cmdtext, true) && PlayerToPoint(1.5,playerid,498.9911,-20.6630,1000.6797))
 	{
	ShowPlayerDialog(playerid, 50, DIALOG_STYLE_LIST, "Что желаем?", "Напиток ($1)\nПиво ($2)\nВино ($3)\nСигара ($5)", "Купить", "Уйти");
	SendClientMessage(playerid, "Your not in a bar.");
	return 1;
 	}
 	if(!strcmp("/drugs", cmdtext, true) && PlayerToPoint(1.5,playerid,323.7905,1120.0074,1083.8828))
 	{
	ShowPlayerDialog(playerid, 51, DIALOG_STYLE_LIST, "Что будем принимать?", "Травка ($50)\nКокс ($200)", "Купить", "Уйти");
	SendClientMessage(playerid, "Your not in the drug warehouse.");
	return 1;
 	}
If it doesn't work let me know.
Reply
#4

Quote:
Originally Posted by JakesRolePlay
If your just wanting it to say "Your not in a bar" and "Your not in the drug warehouse, I think you should do this

Код:
 	if(!strcmp("/bar", cmdtext, true) && PlayerToPoint(1.5,playerid,498.9911,-20.6630,1000.6797))
 	{
	ShowPlayerDialog(playerid, 50, DIALOG_STYLE_LIST, "Что желаем?", "Напиток ($1)\nПиво ($2)\nВино ($3)\nСигара ($5)", "Купить", "Уйти");
	SendClientMessage(playerid, "Your not in a bar.");
	return 1;
 	}
 	if(!strcmp("/drugs", cmdtext, true) && PlayerToPoint(1.5,playerid,323.7905,1120.0074,1083.8828))
 	{
	ShowPlayerDialog(playerid, 51, DIALOG_STYLE_LIST, "Что будем принимать?", "Травка ($50)\nКокс ($200)", "Купить", "Уйти");
	SendClientMessage(playerid, "Your not in the drug warehouse.");
	return 1;
 	}
If it doesn't work let me know.


The word are on russian, because they dispayed bad!




Commands

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp("/bar", cmdtext, true) && PlayerToPoint(1.5,playerid,498.9911,-20.6630,1000.6797))
 	{
	ShowPlayerDialog(playerid, 50, DIALOG_STYLE_LIST, "Что желаем?", "Напиток ($1)\nПиво ($2)\nВино ($3)\nСигара ($5)", "Купить", "Уйти");
	return 1;
 	}
 	if(!strcmp("/drugs", cmdtext, true) && PlayerToPoint(1.5,playerid,323.7905,1120.0074,1083.8828))
 	{
	ShowPlayerDialog(playerid, 51, DIALOG_STYLE_LIST, "Что будем принимать?", "Травка ($50)\nКокс ($200)", "Купить", "Уйти");
	return 1;
 	}
Callbacks

Код:
	
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 50 && response)
  {
    switch(listitem)
    {
      case 0:
      {
        if(GetPlayerMoney(playerid) < 1) return SendClientMessage(playerid, 0xFFFFFF, "Проваливай, у тебя нет денег.");
        GivePlayerMoney(playerid, -1);
        SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
        SendClientMessage(playerid, 0x8BD708, "Держи свой сок.");
      }
      case 1:
      {
        if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, 0xFFFFFF, "Проваливай, у тебя нет денег.");
        GivePlayerMoney(playerid, -2);
        SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
        SendClientMessage(playerid, 0x8BD708, "Держи бутылочку пивка.");
      }
      case 2:
      {
        if(GetPlayerMoney(playerid) < 3) return SendClientMessage(playerid, 0xFFFFFF, "Проваливай, у тебя нет денег.");
        GivePlayerMoney(playerid, -3);
        SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
        SendClientMessage(playerid, 0x8BD708, "Держи бутылочку винца.");
      }
      case 3:
      {
        if(GetPlayerMoney(playerid) < 5) return SendClientMessage(playerid, 0xFFFFFF, "Проваливай, у тебя нет денег.");
        GivePlayerMoney(playerid, -5);
        SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
        SendClientMessage(playerid, 0x8BD708, "Держи сигару.");
      }

    }
  }
  else if(dialogid == 51 && response)
 			{
 			  switch(listitem)
 			  {
 			    case 0:
			 		{
			 		  if(GetPlayerMoney(playerid) < 50) return SendClientMessage(playerid, 0xFFFFFF, "Проваливай, у тебя нет денег.");
        		GivePlayerMoney(playerid, -50);
        		SetPlayerDrunkLevel (playerid, 10000);
        		SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
  					SendClientMessage(playerid, 0x00C0C0AA, "Ты под травкой!");
  					SendClientMessage(playerid, 0x00C0C0AA, "Чтобы избавиться от этой дряни пиши /tabletka");
					}
	 				case 1:
					{
	 					if(GetPlayerMoney(playerid) < 200) return SendClientMessage(playerid, 0xFFFFFF, "Проваливай, у тебя нет денег.");
        		GivePlayerMoney(playerid, -200);
        		SetPlayerWeather(playerid, -66);
        		SetPlayerDrunkLevel (playerid, 20000);
  					SendClientMessage(playerid, 0x00C0C0AA, "Ты под коксом!Ух ща весело будет");
  					SendClientMessage(playerid, 0x00C0C0AA, "Чтобы избавиться от этой дряни пиши /tabletka");
					}
				}
			}
return 1;
}
I need the message You not in bar or you not in drughouse when player not in position what needed for command
Reply
#5

Quote:
Originally Posted by Nexotronix
Quote:
Originally Posted by JakesRolePlay
If your just wanting it to say "Your not in a bar" and "Your not in the drug warehouse, I think you should do this

Код:
 	if(!strcmp("/bar", cmdtext, true) && PlayerToPoint(1.5,playerid,498.9911,-20.6630,1000.6797))
 	{
	ShowPlayerDialog(playerid, 50, DIALOG_STYLE_LIST, "Что желаем?", "Напиток ($1)\nПиво ($2)\nВино ($3)\nСигара ($5)", "Купить", "Уйти");
	SendClientMessage(playerid, "Your not in a bar.");
	return 1;
 	}
 	if(!strcmp("/drugs", cmdtext, true) && PlayerToPoint(1.5,playerid,323.7905,1120.0074,1083.8828))
 	{
	ShowPlayerDialog(playerid, 51, DIALOG_STYLE_LIST, "Что будем принимать?", "Травка ($50)\nКокс ($200)", "Купить", "Уйти");
	SendClientMessage(playerid, "Your not in the drug warehouse.");
	return 1;
 	}
If it doesn't work let me know.


The word are on russian, because they dispayed bad!




Commands

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp("/bar", cmdtext, true) && PlayerToPoint(1.5,playerid,498.9911,-20.6630,1000.6797))
 	{
	ShowPlayerDialog(playerid, 50, DIALOG_STYLE_LIST, "Что желаем?", "Напиток ($1)\nПиво ($2)\nВино ($3)\nСигара ($5)", "Купить", "Уйти");
	return 1;
 	}
 	if(!strcmp("/drugs", cmdtext, true) && PlayerToPoint(1.5,playerid,323.7905,1120.0074,1083.8828))
 	{
	ShowPlayerDialog(playerid, 51, DIALOG_STYLE_LIST, "Что будем принимать?", "Травка ($50)\nКокс ($200)", "Купить", "Уйти");
	return 1;
 	}
Callbacks

Код:
	
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 50 && response)
  {
    switch(listitem)
    {
      case 0:
      {
        if(GetPlayerMoney(playerid) < 1) return SendClientMessage(playerid, 0xFFFFFF, "Проваливай, у тебя нет денег.");
        GivePlayerMoney(playerid, -1);
        SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
        SendClientMessage(playerid, 0x8BD708, "Держи свой сок.");
      }
      case 1:
      {
        if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, 0xFFFFFF, "Проваливай, у тебя нет денег.");
        GivePlayerMoney(playerid, -2);
        SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
        SendClientMessage(playerid, 0x8BD708, "Держи бутылочку пивка.");
      }
      case 2:
      {
        if(GetPlayerMoney(playerid) < 3) return SendClientMessage(playerid, 0xFFFFFF, "Проваливай, у тебя нет денег.");
        GivePlayerMoney(playerid, -3);
        SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
        SendClientMessage(playerid, 0x8BD708, "Держи бутылочку винца.");
      }
      case 3:
      {
        if(GetPlayerMoney(playerid) < 5) return SendClientMessage(playerid, 0xFFFFFF, "Проваливай, у тебя нет денег.");
        GivePlayerMoney(playerid, -5);
        SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
        SendClientMessage(playerid, 0x8BD708, "Держи сигару.");
      }

    }
  }
  else if(dialogid == 51 && response)
 			{
 			  switch(listitem)
 			  {
 			    case 0:
			 		{
			 		  if(GetPlayerMoney(playerid) < 50) return SendClientMessage(playerid, 0xFFFFFF, "Проваливай, у тебя нет денег.");
        		GivePlayerMoney(playerid, -50);
        		SetPlayerDrunkLevel (playerid, 10000);
        		SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
  					SendClientMessage(playerid, 0x00C0C0AA, "Ты под травкой!");
  					SendClientMessage(playerid, 0x00C0C0AA, "Чтобы избавиться от этой дряни пиши /tabletka");
					}
	 				case 1:
					{
	 					if(GetPlayerMoney(playerid) < 200) return SendClientMessage(playerid, 0xFFFFFF, "Проваливай, у тебя нет денег.");
        		GivePlayerMoney(playerid, -200);
        		SetPlayerWeather(playerid, -66);
        		SetPlayerDrunkLevel (playerid, 20000);
  					SendClientMessage(playerid, 0x00C0C0AA, "Ты под коксом!Ух ща весело будет");
  					SendClientMessage(playerid, 0x00C0C0AA, "Чтобы избавиться от этой дряни пиши /tabletka");
					}
				}
			}
return 1;
}
I need the message You not in bar or you not in drughouse when player not in position what needed for command
If your wanting the russian to translate to english then use ****** translator or whatever, but for right now I kinda lost what your asking :\
Reply
#6

Quote:
Originally Posted by JakesRolePlay
Quote:
Originally Posted by Nexotronix
Quote:
Originally Posted by JakesRolePlay
If your just wanting it to say "Your not in a bar" and "Your not in the drug warehouse, I think you should do this

Код:
 	if(!strcmp("/bar", cmdtext, true) && PlayerToPoint(1.5,playerid,498.9911,-20.6630,1000.6797))
 	{
	ShowPlayerDialog(playerid, 50, DIALOG_STYLE_LIST, "Что желаем?", "Напиток ($1)\nПиво ($2)\nВино ($3)\nСигара ($5)", "Купить", "Уйти");
	SendClientMessage(playerid, "Your not in a bar.");
	return 1;
 	}
 	if(!strcmp("/drugs", cmdtext, true) && PlayerToPoint(1.5,playerid,323.7905,1120.0074,1083.8828))
 	{
	ShowPlayerDialog(playerid, 51, DIALOG_STYLE_LIST, "Что будем принимать?", "Травка ($50)\nКокс ($200)", "Купить", "Уйти");
	SendClientMessage(playerid, "Your not in the drug warehouse.");
	return 1;
 	}
If it doesn't work let me know.


The word are on russian, because they dispayed bad!




Commands

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp("/bar", cmdtext, true) && PlayerToPoint(1.5,playerid,498.9911,-20.6630,1000.6797))
 	{
	ShowPlayerDialog(playerid, 50, DIALOG_STYLE_LIST, "Что желаем?", "Напиток ($1)\nПиво ($2)\nВино ($3)\nСигара ($5)", "Купить", "Уйти");
	return 1;
 	}
 	if(!strcmp("/drugs", cmdtext, true) && PlayerToPoint(1.5,playerid,323.7905,1120.0074,1083.8828))
 	{
	ShowPlayerDialog(playerid, 51, DIALOG_STYLE_LIST, "Что будем принимать?", "Травка ($50)\nКокс ($200)", "Купить", "Уйти");
	return 1;
 	}
Callbacks

Код:
	
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 50 && response)
  {
    switch(listitem)
    {
      case 0:
      {
        if(GetPlayerMoney(playerid) < 1) return SendClientMessage(playerid, 0xFFFFFF, "Проваливай, у тебя нет денег.");
        GivePlayerMoney(playerid, -1);
        SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
        SendClientMessage(playerid, 0x8BD708, "Держи свой сок.");
      }
      case 1:
      {
        if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, 0xFFFFFF, "Проваливай, у тебя нет денег.");
        GivePlayerMoney(playerid, -2);
        SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
        SendClientMessage(playerid, 0x8BD708, "Держи бутылочку пивка.");
      }
      case 2:
      {
        if(GetPlayerMoney(playerid) < 3) return SendClientMessage(playerid, 0xFFFFFF, "Проваливай, у тебя нет денег.");
        GivePlayerMoney(playerid, -3);
        SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
        SendClientMessage(playerid, 0x8BD708, "Держи бутылочку винца.");
      }
      case 3:
      {
        if(GetPlayerMoney(playerid) < 5) return SendClientMessage(playerid, 0xFFFFFF, "Проваливай, у тебя нет денег.");
        GivePlayerMoney(playerid, -5);
        SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
        SendClientMessage(playerid, 0x8BD708, "Держи сигару.");
      }

    }
  }
  else if(dialogid == 51 && response)
 			{
 			  switch(listitem)
 			  {
 			    case 0:
			 		{
			 		  if(GetPlayerMoney(playerid) < 50) return SendClientMessage(playerid, 0xFFFFFF, "Проваливай, у тебя нет денег.");
        		GivePlayerMoney(playerid, -50);
        		SetPlayerDrunkLevel (playerid, 10000);
        		SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
  					SendClientMessage(playerid, 0x00C0C0AA, "Ты под травкой!");
  					SendClientMessage(playerid, 0x00C0C0AA, "Чтобы избавиться от этой дряни пиши /tabletka");
					}
	 				case 1:
					{
	 					if(GetPlayerMoney(playerid) < 200) return SendClientMessage(playerid, 0xFFFFFF, "Проваливай, у тебя нет денег.");
        		GivePlayerMoney(playerid, -200);
        		SetPlayerWeather(playerid, -66);
        		SetPlayerDrunkLevel (playerid, 20000);
  					SendClientMessage(playerid, 0x00C0C0AA, "Ты под коксом!Ух ща весело будет");
  					SendClientMessage(playerid, 0x00C0C0AA, "Чтобы избавиться от этой дряни пиши /tabletka");
					}
				}
			}
return 1;
}
I need the message You not in bar or you not in drughouse when player not in position what needed for command
If your wanting the russian to translate to english then use ****** translator or whatever, but for right now I kinda lost what your asking :\
When I enter one of these komnd not at a given position, Server will display a message server SERVER: Unknown command. And I need to for the team / bar displays the message you're not in the bar for command / drugs similar to!
Reply
#7

Quote:
Originally Posted by Nexotronix
Quote:
Originally Posted by JakesRolePlay
Quote:
Originally Posted by Nexotronix
Quote:
Originally Posted by JakesRolePlay
If your just wanting it to say "Your not in a bar" and "Your not in the drug warehouse, I think you should do this

Код:
 	if(!strcmp("/bar", cmdtext, true) && PlayerToPoint(1.5,playerid,498.9911,-20.6630,1000.6797))
 	{
	ShowPlayerDialog(playerid, 50, DIALOG_STYLE_LIST, "Что желаем?", "Напиток ($1)\nПиво ($2)\nВино ($3)\nСигара ($5)", "Купить", "Уйти");
	SendClientMessage(playerid, "Your not in a bar.");
	return 1;
 	}
 	if(!strcmp("/drugs", cmdtext, true) && PlayerToPoint(1.5,playerid,323.7905,1120.0074,1083.8828))
 	{
	ShowPlayerDialog(playerid, 51, DIALOG_STYLE_LIST, "Что будем принимать?", "Травка ($50)\nКокс ($200)", "Купить", "Уйти");
	SendClientMessage(playerid, "Your not in the drug warehouse.");
	return 1;
 	}
If it doesn't work let me know.


The word are on russian, because they dispayed bad!




Commands

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp("/bar", cmdtext, true) && PlayerToPoint(1.5,playerid,498.9911,-20.6630,1000.6797))
 	{
	ShowPlayerDialog(playerid, 50, DIALOG_STYLE_LIST, "Что желаем?", "Напиток ($1)\nПиво ($2)\nВино ($3)\nСигара ($5)", "Купить", "Уйти");
	return 1;
 	}
 	if(!strcmp("/drugs", cmdtext, true) && PlayerToPoint(1.5,playerid,323.7905,1120.0074,1083.8828))
 	{
	ShowPlayerDialog(playerid, 51, DIALOG_STYLE_LIST, "Что будем принимать?", "Травка ($50)\nКокс ($200)", "Купить", "Уйти");
	return 1;
 	}
Callbacks

Код:
	
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 50 && response)
  {
    switch(listitem)
    {
      case 0:
      {
        if(GetPlayerMoney(playerid) < 1) return SendClientMessage(playerid, 0xFFFFFF, "Проваливай, у тебя нет денег.");
        GivePlayerMoney(playerid, -1);
        SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
        SendClientMessage(playerid, 0x8BD708, "Держи свой сок.");
      }
      case 1:
      {
        if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, 0xFFFFFF, "Проваливай, у тебя нет денег.");
        GivePlayerMoney(playerid, -2);
        SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
        SendClientMessage(playerid, 0x8BD708, "Держи бутылочку пивка.");
      }
      case 2:
      {
        if(GetPlayerMoney(playerid) < 3) return SendClientMessage(playerid, 0xFFFFFF, "Проваливай, у тебя нет денег.");
        GivePlayerMoney(playerid, -3);
        SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
        SendClientMessage(playerid, 0x8BD708, "Держи бутылочку винца.");
      }
      case 3:
      {
        if(GetPlayerMoney(playerid) < 5) return SendClientMessage(playerid, 0xFFFFFF, "Проваливай, у тебя нет денег.");
        GivePlayerMoney(playerid, -5);
        SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
        SendClientMessage(playerid, 0x8BD708, "Держи сигару.");
      }

    }
  }
  else if(dialogid == 51 && response)
 			{
 			  switch(listitem)
 			  {
 			    case 0:
			 		{
			 		  if(GetPlayerMoney(playerid) < 50) return SendClientMessage(playerid, 0xFFFFFF, "Проваливай, у тебя нет денег.");
        		GivePlayerMoney(playerid, -50);
        		SetPlayerDrunkLevel (playerid, 10000);
        		SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
  					SendClientMessage(playerid, 0x00C0C0AA, "Ты под травкой!");
  					SendClientMessage(playerid, 0x00C0C0AA, "Чтобы избавиться от этой дряни пиши /tabletka");
					}
	 				case 1:
					{
	 					if(GetPlayerMoney(playerid) < 200) return SendClientMessage(playerid, 0xFFFFFF, "Проваливай, у тебя нет денег.");
        		GivePlayerMoney(playerid, -200);
        		SetPlayerWeather(playerid, -66);
        		SetPlayerDrunkLevel (playerid, 20000);
  					SendClientMessage(playerid, 0x00C0C0AA, "Ты под коксом!Ух ща весело будет");
  					SendClientMessage(playerid, 0x00C0C0AA, "Чтобы избавиться от этой дряни пиши /tabletka");
					}
				}
			}
return 1;
}
I need the message You not in bar or you not in drughouse when player not in position what needed for command
If your wanting the russian to translate to english then use ****** translator or whatever, but for right now I kinda lost what your asking :\
When I enter one of these komnd not at a given position, Server will display a message server SERVER: Unknown command. And I need to for the team / bar displays the message you're not in the bar for command / drugs similar to!
Do you have it fully scripted to enter?
Reply
#8

Here:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/kill", true))
    {
        SetPlayerHealth(playerid, 0);
        return 1;
    }
    if(!strcmp(cmdtext, "/bar", true))
    {
      if(IsPlayerInRangeOfPoint(playerid, 1.5, 497.4167,-75.4108,998.7578))
      {
            ShowPlayerDialog(playerid, 50, DIALOG_STYLE_LIST, "Чo`о ?a*лa`a*i`?", "Нa`i"e`o`оe^ ($1)\nI"e`во ($2)\nВe`но ($3)\nN~e`a~a`?a` ($5)", "E^уi"e`o`ь", "Уйo`e`");
        }
        else
        {
          //your if-not code here ( SendClientMessage(playerid, color, "
..."); )
        }
        return 1;
     }
    if(!strcmp(cmdtext, "
/bar", true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 1.5, 498.9911,-20.6630,1000.6797))
        {
            ShowPlayerDialog(playerid, 50, DIALOG_STYLE_LIST, "
Чo`о ?a*лa`a*i`?", "Нa`i"e`o`оe^ ($1)\nI"e`во ($2)\nВe`но ($3)\nN~e`a~a`?a` ($5)", "E^уi"e`o`ь", "Уйo`e`");
        }
        else
        {
          //your if-not code here ( SendClientMessage(playerid, color, "..."); )
        }
        return 1;
     }
    if(!strcmp(cmdtext, "/drugs", true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 1.5, 323.7905,1120.0074,1083.8828))
        {
            ShowPlayerDialog(playerid, 51, DIALOG_STYLE_LIST, "Чo`о будa*i` i"?e`нe`i`a`o`ь?", "O`?a`вe^a` ($50)\nE^оe^n~ ($200)", "E^уi"e`o`ь", "Уйo`e`");
        }
        else
        {
          //your if-not code here ( SendClientMessage(playerid, color, "..."); )
        }
        return 1;
    }
    if(!strcmp(cmdtext, "/tabletka", true))
  {
      SetPlayerWeather(playerid, 10);
      SetPlayerDrunkLevel(playerid, 2000);
      SendClientMessage(playerid, 0x00C0C0AA, "O`a*бa* i"оi`оa~лa` o`a`блa*o`e^a`...");
      return 1;
    }
  if(!strcmp(cmdtext, "
/heal", true))
  {
    if(IsPlayerInRangeOfPoint(playerid, 1.5, 2033.8627,-1404.4601,17.2588))
    {
          SetPlayerHealth(playerid, 100);
          SendClientMessage(playerid, 0x00C0C0AA, "
O`a*бy" вu^лa*чe`лe`.");
        }
        else
        {
          //your if-not code here ( SendClientMessage(playerid, color, "..."); )
        }
        return 1;
  }
    return 0;
}
Reply
#9

Quote:
Originally Posted by Virtual1ty
Here:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/kill", true))
    {
        SetPlayerHealth(playerid, 0);
        return 1;
    }
    if(!strcmp(cmdtext, "/bar", true))
    {
      if(IsPlayerInRangeOfPoint(playerid, 1.5, 497.4167,-75.4108,998.7578))
      {
            ShowPlayerDialog(playerid, 50, DIALOG_STYLE_LIST, "Чo`о ?a*лa`a*i`?", "Нa`i"e`o`оe^ ($1)\nI"e`во ($2)\nВe`но ($3)\nN~e`a~a`?a` ($5)", "E^уi"e`o`ь", "Уйo`e`");
        }
        else
        {
          //your if-not code here ( SendClientMessage(playerid, color, "
..."); )
        }
        return 1;
     }
    if(!strcmp(cmdtext, "
/bar", true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 1.5, 498.9911,-20.6630,1000.6797))
        {
            ShowPlayerDialog(playerid, 50, DIALOG_STYLE_LIST, "
Чo`о ?a*лa`a*i`?", "Нa`i"e`o`оe^ ($1)\nI"e`во ($2)\nВe`но ($3)\nN~e`a~a`?a` ($5)", "E^уi"e`o`ь", "Уйo`e`");
        }
        else
        {
          //your if-not code here ( SendClientMessage(playerid, color, "..."); )
        }
        return 1;
     }
    if(!strcmp(cmdtext, "/drugs", true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 1.5, 323.7905,1120.0074,1083.8828))
        {
            ShowPlayerDialog(playerid, 51, DIALOG_STYLE_LIST, "Чo`о будa*i` i"?e`нe`i`a`o`ь?", "O`?a`вe^a` ($50)\nE^оe^n~ ($200)", "E^уi"e`o`ь", "Уйo`e`");
        }
        else
        {
          //your if-not code here ( SendClientMessage(playerid, color, "..."); )
        }
        return 1;
    }
    if(!strcmp(cmdtext, "/tabletka", true))
  {
      SetPlayerWeather(playerid, 10);
      SetPlayerDrunkLevel(playerid, 2000);
      SendClientMessage(playerid, 0x00C0C0AA, "O`a*бa* i"оi`оa~лa` o`a`блa*o`e^a`...");
      return 1;
    }
  if(!strcmp(cmdtext, "
/heal", true))
  {
    if(IsPlayerInRangeOfPoint(playerid, 1.5, 2033.8627,-1404.4601,17.2588))
    {
          SetPlayerHealth(playerid, 100);
          SendClientMessage(playerid, 0x00C0C0AA, "
O`a*бy" вu^лa*чe`лe`.");
        }
        else
        {
          //your if-not code here ( SendClientMessage(playerid, color, "..."); )
        }
        return 1;
  }
    return 0;
}
Thnx i will try it!
Reply
#10

if-not code

i need to write the first line of my command? or how?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)