Show report only for admin
#1

How can I make it so this report will show only for me, the admin.


Код:
public OnPlayerCheat(playerid, cheatid, source[])
{
    new elc_str[120],elc_reason[60],elc_name[MAX_PLAYER_NAME];
	GetPlayerName(playerid, elc_name, sizeof(elc_name));
    format(elc_str,sizeof(elc_str),"( ! ) %s has been cheated for: ",elc_name);
    switch(cheatid)
    {
        <a href="http://cityadspix.com/tsclick-BQBE4NTK-MKIGQJBF?url=http%3A%2F%2Fwww.ulmart.ru%2Fgoods%2F486788&sa=mh&sa1=&sa2=&sa3=&sa4=&sa5=&bt=20&pt=9&lt=2&tl=3&im=MzY1NS0wLTE0MTg0OTkwNDQtMTE5NTc3NDI%3D&fid=NDQ1NzU2Nzc1&prdct=0d3c093e0f3a0f3501&kw=case%201" target="_blank" alt="Targus Classic+ Toploading Case 13-14.1" title="Targus Classic+ Toploading Case 13-14.1" style="">case 1</a>: format(elc_reason,sizeof(elc_reason),"Money Cheat ( %s $ )",source);
        case 2: format(elc_reason,sizeof(elc_reason),"Weapon Cheat ( %s )",source);
        case 3: format(elc_reason,sizeof(elc_reason),"Ammo Cheat ( %s Bullets )",source);
        case 4: format(elc_reason,sizeof(elc_reason),"Ammo Block Cheat");
        case 5: format(elc_reason,sizeof(elc_reason),"Speed Cheat");
        <a href="http://cityadspix.com/tsclick-MIQCWPUV-GECAQBFF?url=http%3A%2F%2Fwww.sotmarket.ru%2Fproduct%2Fsumka-targus-tbt241eu-50-dlja-noutbuka-15-6.html&sa=mh&sa1=&sa2=&sa3=&sa4=&sa5=&bt=20&pt=9&lt=2&tl=3&im=ODI1LTAtMTQxODQ5OTA0NC0xMjQzMTAwMA%3D%3D&fid=NDQ1NzU2Nzc1&prdct=04350c3b0f35013c04&kw=case%206" target="_blank" alt="Targus Lomax Topload Case 15.6" title="Targus Lomax Topload Case 15.6" style="">case 6</a>: format(elc_reason,sizeof(elc_reason),"Airbreak/Teleport Cheat");
        case 7: format(elc_reason,sizeof(elc_reason),"Health Cheat");
        case 8: format(elc_reason,sizeof(elc_reason),"Armour Cheat");
        case 9: format(elc_reason,sizeof(elc_reason),"Vehicle Spawn Cheat");
        <a href="http://cityadspix.com/tsclick-MIQCWPUV-GECAQBFF?url=http%3A%2F%2Fwww.sotmarket.ru%2Fproduct%2Fbag_notebook_10_sumdex_pon-340.html&sa=mh&sa1=&sa2=&sa3=&sa4=&sa5=&bt=20&pt=9&lt=2&tl=3&im=ODI1LTAtMTQxODQ5OTA0NC0xMDg0NzkwNA%3D%3D&fid=NDQ1NzU2Nzc1&prdct=013007360f35033e06&kw=case%2010" target="_blank" alt="Sumdex Impulse Notebook <a href="http://cityadspix.com/tsclick-BQBE4NTK-MKIGQJBF?url=http%3A%2F%2Fwww.ulmart.ru%2Fgoods%2F486788&sa=mh&sa1=&sa2=&sa3=&sa4=&sa5=&bt=20&pt=9&lt=2&tl=3&sa=mh&sa1=&sa2=&sa3=&sa4=&sa5=&im=MzY1NS0wLTE0MTg0OTkwNDQtMTM3MTk5ODM%3D&fid=NDQ1NzU2Nzc1&prdct=0d3c093e0f3a0f3501&kw=Case%2010" target="_blank" alt="Targus Classic+ Toploading Case 13-14.1" title="Targus Classic+ Toploading Case 13-14.1" style="">Case 10</a>" title="Sumdex Impulse Notebook Case 10" style="">case 10</a>: format(elc_reason,sizeof(elc_reason),"Vehicle Crasher");
    }
    strcat(elc_str,elc_reason);
    SendClientMessageToAll(0xBD0000FF,elc_str);
	return 1;
}
Reply
#2

You'll need to make a "SendClientMessageToAdmins" stock. It's not hard at all, all you need to do is copy the "SendClientMessageToAll" functions, and use the admin variables. (EG: below)

Код:
stock SendMessageToAdmins(string)
{
    for(new i = 0; i != MAX_PLAYERS; i++)
    {
        if(playerData[i][adminLevel] > 0)
        {
            SendClientMessage(i, 0xCC000000, string);
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)