Help with money limits
#5

Quote:
Originally Posted by Jacob_T_Harden
Посмотреть сообщение
James like this?

Код:
       if (strcmp("/buygun deagle", cmdtext, true)==0){
             if( GetPlayerMoney( playerid ) >= 1000 )
	{
             SendClientMessage(playerid, COLOR_WHITE, "You have bought a Deagle for 1000 dollars!");
	GivePlayerWeapon(playerid, 24, 40);
	GivePlayerMoney(playerid, -1000);
	}
	else
	{
	SendClientMessage(playerid, COLOR_YELLOW, "You dont have enough money!");
	}
	return 1;
	}
Yes, like that, also, indent your code, more readable. ^^

Код:
    if (strcmp("/buygun deagle", cmdtext, true)==0)
    {
        if( GetPlayerMoney( playerid ) >= 1000 )
	{
             SendClientMessage(playerid, COLOR_WHITE, "You have bought a Deagle for 1000 dollars!");
	     GivePlayerWeapon(playerid, 24, 40);
	     GivePlayerMoney(playerid, -1000);
	}
	else
	{
	    SendClientMessage(playerid, COLOR_YELLOW, "You dont have enough money!");
	}
	return 1;
    }
Reply


Messages In This Thread
Help with money limits - by Jacob_T_Harden - 13.01.2011, 01:32
Re: Help with money limits - by cessil - 13.01.2011, 01:38
Re: Help with money limits - by JamesC - 13.01.2011, 01:39
Re: Help with money limits - by Jacob_T_Harden - 13.01.2011, 01:52
Re: Help with money limits - by California - 13.01.2011, 02:19
Re: Help with money limits - by California - 13.01.2011, 02:21
Re: Help with money limits - by Jacob_T_Harden - 13.01.2011, 02:32
Re: Help with money limits - by coole210 - 13.01.2011, 03:38

Forum Jump:


Users browsing this thread: 1 Guest(s)