How to make this into a command?
#1

I want the command to be "/i"

Код:
	if(TalkingLive[playerid] != INVALID_PLAYER_ID) {
		if(PlayerInfo[playerid][pFaction] == 9 || PlayerInfo[playerid][pLeader] == 9) {
			format(string, sizeof(string), "Live News Reporter %s: %s", GetPlayerNameEx(playerid), text);
			ICNews(COLOR_LIGHTGREEN,string);
		} else {
			format(string, sizeof(string), "Live Interview Guest %s: %s", GetPlayerNameEx(playerid), text);
			ICNews(COLOR_LIGHTGREEN,string);
		}
		return 0;
	}
Reply
#2

Just making this a command?
pawn Код:
// With ZCMD: (( #include <zcmd> ))
CMD:i(playerid, params[])
{
    if(TalkingLive[playerid] != INVALID_PLAYER_ID)
    {
        if(PlayerInfo[playerid][pFaction] == 9 || PlayerInfo[playerid][pLeader] == 9)
        {
            format(string, sizeof(string), "Live News Reporter %s: %s", GetPlayerNameEx(playerid), text);
            ICNews(COLOR_LIGHTGREEN,string);
           
        }
        else
        {
            format(string, sizeof(string), "Live Interview Guest %s: %s", GetPlayerNameEx(playerid), text);
            ICNews(COLOR_LIGHTGREEN,string);
        }
        return 0;
    }
    return 1;
}
Reply
#3

Quote:
Originally Posted by JimmyCh
Посмотреть сообщение
Just making this a command?
pawn Код:
// With ZCMD: (( #include <zcmd> ))
CMD:i(playerid, params[])
{
    if(TalkingLive[playerid] != INVALID_PLAYER_ID)
    {
        if(PlayerInfo[playerid][pFaction] == 9 || PlayerInfo[playerid][pLeader] == 9)
        {
            format(string, sizeof(string), "Live News Reporter %s: %s", GetPlayerNameEx(playerid), text);
            ICNews(COLOR_LIGHTGREEN,string);
           
        }
        else
        {
            format(string, sizeof(string), "Live Interview Guest %s: %s", GetPlayerNameEx(playerid), text);
            ICNews(COLOR_LIGHTGREEN,string);
        }
        return 0;
    }
    return 1;
}
Thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)