Again
#6

PHP код:
#define scm SendClientMessage
gName(pid){
    new 
s[24];
    
GetPlayerName(pid,s,24);
    return 
s;
}
AdminMsg(color,s[]){
    for (new 
iiMAX_PLAYERSi++){
        if(
PlayerInfo[i][Level]>=ServerInfo[MaxAdminLevel])SendClientMessage(i,color,s);
    }
    return 
1;
}
CMD:pm(pid,p[]) {
    if(
PlayerInfo[pid][Muted])return scm(pid,-1,"You are muted!");
    new 
id,s[128];
    if(
sscanf(p,"us[128]",id,p))return scm(pid,-1,"USAGE: /pm <ID> <Message>");
    if(!
IsPlayerConnected(id))    return scm(pid,-1,"Player isn't connected!");
    if(
pid==id)                    return scm(pid,-1,"You can't pm youself!");
    if(
ServerInfo[ReadPMs] && PlayerInfo[pid][Level] != ServerInfo[MaxAdminLevel]){
        
format(s,sizeof(s),"***[PM]: %s To %s: %s",gName(pid),gName(id),p);
        
IRC_GroupSay(groupID,IRC_ADMINCHANNEL,s);
        
AdminMsg(grey,s);
    }
    
format(s,sizeof(s),">> %s(%d): %s",gName(id),id,p);
    
scm(pid,PM_OUTGOING_COLOR,s);
    
format(s,sizeof(s),"** %s(%d): %s",gName(pid),pid,p);
    
scm(id,PM_INCOMING_COLOR,s);
    
PlayerPlaySound(id,1085,0.0,0.0,0.0);
    return 
1;

Reply


Messages In This Thread
Again - by NitroZeth - 30.04.2018, 05:26
Re: Again - by jasperschellekens - 30.04.2018, 09:22
Re: Again - by NitroZeth - 30.04.2018, 13:55
Re: Again - by jasperschellekens - 30.04.2018, 14:01
Re: Again - by CyNiC - 01.05.2018, 03:33
Re: Again - by CodeStyle175 - 01.05.2018, 10:02

Forum Jump:


Users browsing this thread: 1 Guest(s)