04.06.2009, 21:19
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmd, "/buylevel", true) == 0)
{
gPlayerMoney[playerid] = GetPlayerMoney(playerid);
if (GetPlayerMoney(playerid) >= 250000)
{
gPlayerLevel[playerid] += 1;
SetPlayerMoney(playerid, gPlayerMoney[playerid] - 250000);
}
return 1;
}
if (strcmp(cmdtext"/flip", true) == 0)
{
if (gPlayerLevel[playerid] > 1)
{
SendClientMessage(playerid, 0xFFFFFFFF, "I just... flipped?");
return 1;
}
else
return SendClientMessage(playerid, 0xFFFFFFFF, "You are not high enough level to use this!");
}
}