Someone know how to make an ooc chat?
#4

PHP код:
//----------------------------------[ooc]-----------------------------------------------
    
if(strcmp(cmd"/ooc"true) == || strcmp(cmd"/o"true) == 0// 
    
{
        if(
IsPlayerConnected(playerid))
        {
            if(
gPlayerLogged[playerid] == 0)
            {
                
SendClientMessage(playeridCOLOR_GREY"** You havent logged in yet !");
                return 
1;
            }
            if ((
noooc) && PlayerInfo[playerid][pAdmin] < 1)
            {
                
SendClientMessage(playeridCOLOR_GRAD2"** The OOC channel has been disabled by an Admin !");
                return 
1;
            }
            if(
PlayerInfo[playerid][pMuted] == 1)
            {
                
SendClientMessage(playeridTEAM_CYAN_COLOR"You cannot speak, you have been silenced");
                return 
1;
            }
            new 
length strlen(cmdtext);
            while ((
idx length) && (cmdtext[idx] <= ' '))
            {
                
idx++;
            }
            new 
offset idx;
            new 
result[128];
            while ((
idx length) && ((idx offset) < (sizeof(result) - 1)))
            {
                
result[idx offset] = cmdtext[idx];
                
idx++;
            }
            
result[idx offset] = EOS;
            if(!
strlen(result))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USAGE: (/o)oc [OOC chat]");
                return 
1;
            }
            if(
PlayerInfo[playerid][pAdmin] == 0)
            {
                
format(stringsizeof(string), "(( %s ))", (result));
            }
            else
            {
                
format(stringsizeof(string), "[[ %s ]]", (result));
            }
               
SendPlayerMessageToAll(playeridstring);
            new 
year,month,day;
            
getdate(yearmonthday);
            new 
hourminutesecond;
            
gettime(hour,minute,second);
            
format(stringsizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (OOC): (%s)",day,month,year,hour,minute,secondsendernameresult);
            
PublicLog(string);
        }
        return 
1;
    } 
Reply


Messages In This Thread
Someone know how to make an ooc chat? - by Knocc_Out - 10.04.2011, 15:28
Re: Someone know how to make an ooc chat? - by P!x3L - 10.04.2011, 15:36
Re: Someone know how to make an ooc chat? - by Pz - 10.04.2011, 15:39
Re: Someone know how to make an ooc chat? - by Petru_Me - 10.04.2011, 15:56
Re: Someone know how to make an ooc chat? - by Kwarde - 10.04.2011, 16:00
Re: Someone know how to make an ooc chat? - by Mean - 10.04.2011, 20:52
Re : Re: Someone know how to make an ooc chat? - by rive-sud - 22.08.2011, 03:39
Re: Re : Re: Someone know how to make an ooc chat? - by =WoR=G4M3Ov3r - 22.08.2011, 03:41
Re: Re : Re: Someone know how to make an ooc chat? - by [MWR]Blood - 22.08.2011, 06:45

Forum Jump:


Users browsing this thread: 1 Guest(s)