SA-MP Forums Archive
print function exporting to player screen - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: print function exporting to player screen (/showthread.php?tid=320229)



print function exporting to player screen - milanosie - 22.02.2012

Could this be happening? In my print version to the server logs I include the time, but for some reason this NON admin player can see both admin chat(which is also in logs) and also the time infront of every sentence while that is not suposed to show

SCREEN: http://files.enjin.com.s3.amazonaws....1329864751.png


Re: print function exporting to player screen - [HiC]TheKiller - 22.02.2012

Post the section of the code that bans someone.


Re: print function exporting to player screen - milanosie - 22.02.2012

Quote:
Originally Posted by [HiC]TheKiller
Посмотреть сообщение
Post the section of the code that bans someone.
sure, but what does that have to do with the admin chat and stuff?

pawn Код:
CMD:ban(playerid, params[])
{
    new id;
    new reason2[128];
        if(PlayerInfo[playerid][AdminLevel] >= 3)
        {
            if(!sscanf(params, "uS(no Reason given)[128]", id, reason2))
            {
                if(isspawned[playerid] == 0) return Kick(playerid);
                new year2, month2,day2;
                new hour2,minuite2,second2;
                getdate(year2, month2, day2);
                gettime(hour2,minuite2,second2);
                new string[256];
                new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
                GetPlayerName(playerid, name, sizeof(name));
                GetPlayerName(id, PlayerName, sizeof(PlayerName));
                format(string, sizeof(string), "Administrator %s has just banned %s for reason %s", name, PlayerName, reason2);
                ProxDetector(10000000000.0, playerid, string, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF);
                printf("[%d:%d][%d/%d/%d] [ ADMIN BAN ] %s banned %s for %s", hour2 + 1, minuite2, day2, month2, year2, name, PlayerName, reason2);
                format(file,sizeof(file),"realityrp/users/%s.ini", PlayerName);
                dini_IntSet(file, "Banned",PlayerInfo[id][Banned] = 1);
                Ban(id);
                return 1;
            }
            else return SendClientMessage(playerid, 0xD8D8D8FF, "USAGE: /ban [PlayerId/PartOfName] (Reason)");
        }
        else return SendClientMessage(playerid, 0xD8D8D8FF, "You are not allowed to use this command.");
}



AW: Re: print function exporting to player screen - Campbell- - 22.02.2012

Quote:
Originally Posted by [HiC]TheKiller
Посмотреть сообщение
Post the section of the code that bans someone.
Seems like you didn't really read the question.

Quote:
Originally Posted by milanosie
and also the time infront of every sentence while that is not suposed to show
Start your server and check the SA:MP command /timestamp.

Quote:
Originally Posted by milanosie
but for some reason this NON admin player can see both admin chat
In this case we need to see the script of the admin chat. We can't guess what might be wrong and who might receive the chatlines.


Re: AW: Re: print function exporting to player screen - milanosie - 22.02.2012

Quote:
Originally Posted by Campbell-
Посмотреть сообщение
Seems like you didn't really read the question.



Start your server and check the SA:MP command /timestamp.



In this case we need to see the script of the admin chat. We can't guess what might be wrong and who might receive the chatlines.
hmm, thanks