if (strcmp("/buygun deagle", cmdtext, true)==0){ SendClientMessage(playerid, COLOR_WHITE, "You have bought a Deagle for 1000 dollars!"); GivePlayerWeapon(playerid, 24, 40); GivePlayerMoney(playerid, -1000); return 1; }
if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid,COLOR_WHITE, "You do not have 1000 dollars!");
if( GetPlayerMoney( playerid ) >= 1000 )
{
// Can buy
}
else
{
// Does not have enough money.
}
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; }
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; } |
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; }
if (strcmp("/starter", cmdtext, true==0) { SendClientMessage(playerid, COLOR_YELLOW, "Here is your starter money!"); GivePlayerMoney(playerid, 10000); return 1; {
new StarterMoneyGiven[MAX_PLAYERS];