New to this stuff or whatever help ffs

Author Topic: New to this stuff or whatever help ffs  (Read 1888 times)

So, Im thinking about making some sort of addon that labels the players rake or BL_ID or something, But I have No idea how, I want to learn this type of stuff aswell so I can start doing my own stuff. Note that I have no experience with coding once so ever.
I want to LEARN This, so don't come and flame me. Maybe some sort of tutorial or something you have found on youtube too could be great.

what do you mean by labeling them? like on their name in the chat or what?

Name / chat, can be either way.


you gotta be more specific
so do you want it to show the player's blid in the chat when they speak?


You can try to use a loop through the playerlist object and match the player's chatname, then you can grab the bl_id there. If you have my chatlog script it'll show you how it finds the bl_id. It doesn't work on every server (such as Crown's or any other custom chat mod that doesn't send the chatmessage command).

If you're doing this server-sided it's pretty easy. You can try to package serverCmdMessageSent(%client, %message) and add it to their clantag (then restore it after the parent).
« Last Edit: July 20, 2016, 06:34:13 PM by Kyuande »

I found more than one thing including BLID in it so im just supposing its one of these that labels the BLID

Code: [Select]
function findNPLBL_IDByName(%name)
{
for(%i=0;%i<NPL_List.rowCount();%i++)
{
%n = getField(NPL_List.getRowText(%i), 1);
if(striPos(%n, %name) >= 0)
return getField(NPL_List.getRowText(%i), 3);
}
return -1;
}

function VisoLogger_Add(%server, %bl_id, %name, %message)
{


Code: [Select]
%f = new FileObject(LoggerSO);
if(%bl_id != -1)
{
%f.openForAppend("config/client/Logging/" @ %server @ "/PlayerLog " @ %date @ ".txt");
%line = %time TAB %name TAB %bl_id TAB %message;
%chatLine = "(" @ %bl_id @ ") " @ %name @ ": " @ %message;
}
else
{
%f.openForAppend("config/client/Logging/" @ %server @ "/ChatLog " @ %date @ ".txt");
%line = "[" @ %time @ "] " @ %message;
%chatLine = %message;
}
%f.writeLine(%line);

Quote
function clientCmdChatMessage(%client, %callback, %string, %tagged, %prefix, %name, %suffix, %message)
   {
      Parent::clientCmdChatMessage(%client, %callback, %string, %tagged, %prefix, %name, %suffix, %message);
      %msg = stripMLControlChars(deTag(%message));
      %name = stripMLControlChars(deTag(%name));
      if(trim(%msg) !$= "")
         VisoLogger_Add($Logger::ServerName, findNPLBL_IDByName(%name), %name, %msg);
   }

   function clientCmdServerMessage(%client, %callback, %string, %tagged, %prefix, %name, %suffix, %message)
   {

And probably some more that I was too lazy to actually put down
« Last Edit: July 21, 2016, 10:15:29 AM by Potatoh »


What are you bumping for? Did you ask a question? I don't even understand what those three code blocks are telling me. You didn't really even say what you're trying to do here.

I thought there was already an add-on that did this?

I thought there was already an add-on that did this?

I said that I wanted to learn this.

Can you please answer everyone's questions so we know what's going on here

I said that I wanted to learn this.
What are you bumping for? Did you ask a question? I don't even understand what those three code blocks are telling me. You didn't really even say what you're trying to do here.

What are you bumping for? Did you ask a question? I don't even understand what those three code blocks are telling me. You didn't really even say what you're trying to do here.

Im taking parts of code out of Kyundes chatlog script and asking what ones trigger the BLID tracking

Ooops.
OT: I'm new to this stuff too, but I have this script tutorial .cs file. I haven't took the time the read though.
« Last Edit: July 31, 2016, 01:07:18 AM by cooolguy32 »