zcmd+sscanf /news
#3

Код:
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;
}
Reply


Messages In This Thread
zcmd+sscanf /news - by Jimmi - 21.08.2015, 03:13
Re: zcmd+sscanf /news - by Jimmi - 21.08.2015, 04:41
Re: zcmd+sscanf /news - by Sabur - 21.08.2015, 09:53
Re: zcmd+sscanf /news - by dominik523 - 21.08.2015, 10:09
Re: zcmd+sscanf /news - by Jimmi - 21.08.2015, 19:30
Re: zcmd+sscanf /news - by Jimmi - 21.08.2015, 20:14
Re: zcmd+sscanf /news - by Jimmi - 21.08.2015, 22:49
Re: zcmd+sscanf /news - by jamal1992 - 21.08.2015, 22:59
Re: zcmd+sscanf /news - by Jimmi - 21.08.2015, 23:04

Forum Jump:


Users browsing this thread: 1 Guest(s)