server unknown command
#8

ok full FS
Код:
#include <a_samp>
#define filerscript
#if defined FILTERSCRIPT

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/drink", cmdtext, true, 10) == 0)
{
    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "What is it that you want?", "Sprunk ($1)\nBeer ($2)\nWine ($3)", "Purchase", "Cancel");
    return 1;
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
    {
    switch(1)
        {
		case 1:
    	    {
           	switch(listitem)
        	{
        	    case 0:
        	    {
        	        if(GetPlayerMoney(playerid) < 1) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
        	        GivePlayerMoney(playerid, -1);
        	        SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
        	    }
        	    case 1: 
        	    {
        	        if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
        	        GivePlayerMoney(playerid, -2);
        	        SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
        	    }
        	    case 2:
        	    {
        	        if(GetPlayerMoney(playerid) < 3) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
        	        GivePlayerMoney(playerid, -3);
        	        SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  
 return 1;
}
#endif
Reply


Messages In This Thread
server unknown command - by Anak - 29.09.2012, 07:36
Re: server unknown command - by CaRa - 29.09.2012, 07:38
Re: server unknown command - by .v - 29.09.2012, 07:42
Re: server unknown command - by CaRa - 29.09.2012, 07:45
Re: server unknown command - by Anak - 29.09.2012, 07:49
Re: server unknown command - by CaRa - 29.09.2012, 07:51
Re: server unknown command - by Anak - 29.09.2012, 07:57
Re: server unknown command - by Anak - 29.09.2012, 07:59
Re: server unknown command - by RedJohn - 29.09.2012, 09:01
Re: server unknown command - by Gangster-rocks - 29.09.2012, 09:05

Forum Jump:


Users browsing this thread: 3 Guest(s)