21.08.2015, 09:53
Код:
CMD:news(playerid, params[]) { static string[128], result[80], sendername[24]; if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9) return SendClientMessage(playerid, COLOR_GREY, "Nu esti un reporter!"); if(!IsPlayerInVehicle(playerid, Reporteri[0] && !IsPlayerInVehicle(playerid, Reporteri[12]) return SendClientMessage(playerid, COLOR_GREY, "Nu esti in duba reporterilor sau in elicopter!"); if(sscanf(params, "s[80]", result)) return SendClientMessage(playerid, COLOR_GRAD2, "{00FF00}Folosire:{FFFFFF} /news [newstext]"); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "{FFBF00}Reporter %s : %s {00FFFF}", sendername, result); OOCNews(COLOR_NEWS,string); PlayerInfo[playerid][pNewsSkill] ++; Update(playerid, pNewsSkillx); if(PlayerInfo[playerid][pNewsSkill] == 50) { SendClientMessage(playerid, COLOR_YELLOW, "* Your news reporter skill is now level 2."); } else if(PlayerInfo[playerid][pNewsSkill] == 100) { SendClientMessage(playerid, COLOR_YELLOW, "* Your news reporter skill is now level 3."); } else if(PlayerInfo[playerid][pNewsSkill] == 200) { SendClientMessage(playerid, COLOR_YELLOW, "* Your news reporter skill is now level 4."); } else if(PlayerInfo[playerid][pNewsSkill] == 400) { SendClientMessage(playerid, COLOR_YELLOW, "* Your news reporter skill is now level 5."); } return 1; }