Peoples are awesome. If nobody cares my work - GTFO!
Printable View
Peoples are awesome. If nobody cares my work - GTFO!
amazing man, congrats!
Hammerpoint can't do this and you make this with most of the things working!
The difference is that the report function in the official Warz is a dummy function, because they don't see the reports
Nice Job :)
ohh nice, i got another idea from this :)
after changing all of this , i need to compile another warz_server and the client?
i have compiled a server and it's crash ERROR: r3dNetwork::CreateHost failed 5
Nice, it would be even vetter with a check that the player is online and a screenshot of the offending players screen
Checkout:
void HUDDisplay::addChatMessage(int tabIndex, const char* user, const char* text, uint32_t flags)
in the client to be able to set the name of the "null" channel
After some test i believe that one need to edit the swf files to add a new tab to the chat with the id of the channel.
Wow. Great, thanks.
Hi There!
Great this command, but a little bit recoded...
in the servergamelogic.cpp
Code:if(strncmp(cmd, "/report", 3) == 0)
return Cmd_Report(plr, cmd);
and into the servergamelogic.hCode:int ServerGameLogic::Cmd_Report(obj_ServerPlayer *plr, const char *cmd){
r3dAddReport("%s: %s \n", plr->userName, cmd);
return 0;
}
everything else what you do in the r3d.h and r3d.cpp is good ;)Code:int Cmd_Report(obj_ServerPlayer* plr, const char* cmd);
dont need modify anything else in the servergamelogic.cpp
Yeah but now other Players are able to see the "Command Executed" or im wrong?
Because if you return 0 from the Cmd_Report then it sets the msgChannel to 1 which is Global and then it calls p2pSendToPeer with the Global MsgChannel.
So if you enter /report Player Reason then Everyone sees that you the System
says something like Player Reported....
And for the New Message Channel yeah you need to change them in the Client
and not in the swf xD
Whisper someone works fine for me =D
[Proximity, Global, Clan, Whisper, Friends] =)
No, only the "command executed" visible, when visible.. (i dont test i because im alone on my server :) )
But im think this msg is for you only, not all peer. (maybe wrong)
When i dont have right, we need a new return rule, like yours (but yours make something wrong, i tried /sv and the core says: player reported or i implemented wrong)
I look this later, im trying to recode this commands and implementing new commands, teleport to player, give item to player etc.
I think you did something wrong =D
Well, if you look into Cmd_SetVitals Function, it will return 0 if successfull else it will return 2.
We now know that when something is successfull you get a 0 and when something is wrong you get 2.
Okay next check the IMPL_PACKET_FUNC(ServerGameLogic, PKT_C2C_ChatMessage)
It checks if its a / in the chat at the first Character
if(n.msg[0] == '/')
Normaly the next what comes looks like this:
if(int res = ProcessChatCommand(fromPlr, n.msg); == 0)
it just says if the return of Cmd_SetVitalis as example is successfull then it returns a 0 and you get the Command Executed.
This is what i changed.
In my Report function i return a 5 instead of a 0 when success.
The If statement checks only 0 or else so i declared
int res = ProcessChatCommand(fromPlr, n.msg);
above the if statement to get the result into res
so i know res is 0 from the other commands or 2 and from my function it returns a 5.
Now i changed the if statement to if(res == 0) command success
elseif (res == 5) Player reported //because my function returns a 5 instead of a 2
then atlast the else -> Command not found.
If you read the Changes again (without the r3d changes) then you will see what i mean.
I also changed command from "/gi itemid" to "/gi itemid amount"
Or Added command like: /give itemid amount to give an item to a player.
/si sets my value and
/heal playername heals the player =)
Also the /tp command is changed to tp to a player but its a little bit tricky with the raycast to get the players pos because you need to
know where the player is =)
Currently i work on a /setspawn to set lootboxes and /addzombie to spawn more zombies.