10.08.2010, 20:28
if (GetPlayerMoney(playerid) < 100000) return SendClientMessage(playerid,COLOR_RED, "You don't have enough money");
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext, "/buffalo", true)==0) {
if (GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid,COLOR_RED, "You don't have enough money");
new Float:X, Float:Y, Float:Z, buffalo;
GetPlayerPos(playerid, X, Y, Z);
buffalo = CreateVehicle(402, X, Y, Z, 0.0, -1, -1, -1);
PutPlayerInVehicle(playerid, buffalo, 0);
GivePlayerMoney(playerid, -10000);
SendClientMessage(playerid, 0x33AA33AA, "You bought a Chevy Camaro (Buffalo)");
return 1;
}