Whisper command +REP
#8

PHP код:
COMMAND:w(playeridparams[])
{
    new 
iPlayeriText128 ];
    if( 
sscanf params"us"iPlayeriText))  return SCP(playerid"[PlayerID/PartOfName] [message]");
    if(!
IsPlayerConnected(iPlayer)) return SendClientError(playeridPLAYER_NOT_FOUND);
    if(
PlayerTemp[iPlayer][wlock]==&& !PlayerInfo[playerid][power])
        return 
SendClientMessage(playerid,COLOR_RED,"The given player has locked their whispers.");
    new 
iDistance GetDistanceBetweenPlayers(playeridiPlayer);
    if(
iDistance || PlayerInfo[playerid][power] || PlayerInfo[playerid][helper])
    {
        if(
iDistance 6format(iStrsizeof(iStr), "(( [%s] %s: %s ))"AdminLevelName(playerid), AnonAdmin(playerid), iText);
        else 
format(iStrsizeof(iStr), "** %s[%d] whispers: %s"MaskedName(playerid), playeridiText);
        
SendClientMessage(iPlayerCOLOR_YELLOWiStr);
        if(
iDistance 6format(iStrsizeof(iStr), "(( PM sent to %s: %s ))"RPName(iPlayer), iText);
        else 
format(iStrsizeof(iStr), "** Whisper sent to %s[%d]: %s"MaskedName(iPlayer), iPlayeriText);
        
SendClientMessage(playeridCOLOR_YELLOWiStr);
        
format(iStr,sizeof(iStr),"%s whispers to %s:%s",PlayerName(playerid),PlayerName(iPlayer),iText);
        
PlayerLoop(i)
}
    }
    else 
SendClientError(playerid"Player is too far away!");
    return 
1;

Reply


Messages In This Thread
Whisper command +REP - by [SU]Spartan - 07.06.2016, 09:27
Re: Whisper command +REP - by saffierr - 07.06.2016, 09:32
Re: Whisper command +REP - by Infinity - 07.06.2016, 09:34
Re: Whisper command +REP - by [SU]Spartan - 07.06.2016, 09:34
Re: Whisper command +REP - by saffierr - 07.06.2016, 09:42
Re: Whisper command +REP - by Sjn - 07.06.2016, 09:55
Re: Whisper command +REP - by Stinged - 07.06.2016, 11:59
Re: Whisper command +REP - by justjamie - 07.06.2016, 13:15

Forum Jump:


Users browsing this thread: 1 Guest(s)