08.09.2009, 16:25
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp(cmdtext, "/buylevel", true) == 0) { gPlayerMoney[playerid] = GetPlayerMoney(playerid); if (Level[playerid] == 0) { Level[playerid] += 1; SetPlayerMoney(playerid, gPlayerMoney[playerid] - 500); SetPlayerScore(playerid, Level[playerid]); SendClientMessage(playerid,COLOR_GREEN,"# Tu nopirki 1. speletaja limeni!"); } else if (Level[playerid] == 1) { Level[playerid] += 1; SetPlayerMoney(playerid, gPlayerMoney[playerid] - 600); SetPlayerScore(playerid, Level[playerid]); SendClientMessage(playerid,COLOR_GREEN,"# Tu nopirki 2. speletaja limeni!"); } else if (Level[playerid] == 2) { Level[playerid] += 1; SetPlayerMoney(playerid, gPlayerMoney[playerid] - 700); SetPlayerScore(playerid, Level[playerid]); SendClientMessage(playerid,COLOR_GREEN,"# Tu nopirki 3. speletaja limeni!"); } else if (Level[playerid] == 3) { Level[playerid] += 1; SetPlayerMoney(playerid, gPlayerMoney[playerid] - 800); SetPlayerScore(playerid, Level[playerid]); SendClientMessage(playerid,COLOR_GREEN,"# Tu nopirki 4. speletaja limeni!"); } else if (Level[playerid] == 4) { Level[playerid] += 1; SetPlayerMoney(playerid, gPlayerMoney[playerid] - 900); SetPlayerScore(playerid, Level[playerid]); SendClientMessage(playerid,COLOR_GREEN,"# Tu nopirki 5. speletaja limeni!"); } return 1; }