21.08.2015, 03:13
(
Последний раз редактировалось Jimmi; 21.08.2015 в 04:44.
)
Код:
if(strcmp(cmd, "/news", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9) { new newcar = GetPlayerVehicleID(playerid); if(PlayerInfo[playerid][pMuted] >= 1) { SendClientMessage(playerid, TEAM_CYAN_COLOR, "Nu poti vorbi, ai mute!"); return 1; } if(newcar >= Reporteri[0] && newcar <= Reporteri[12]) { GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[182]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; result[0] = toupper(result[0]); if(!strlen(result)) { SendClientMessage(playerid, COLOR_GRAD2, "{00FF00}Folosire:{FFFFFF} /news [newstext]"); return 1; } 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."); } } else { SendClientMessage(playerid, COLOR_GREY, "Nu esti in duba reporterilor sau in elicopter!"); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, "Nu esti un reporter!"); } }//not connected return 1; }