MP-Events

Posted By: FlorianP

MP-Events - 03/05/07 17:17

Hoi,

hätte da mal ne kurze Zwischenfrage -
und zwar ist im Handbuch folgender Code zu lesen:
Code:
  function server_event(str)
{
if (event_type == event_join)
{
str_cpy(temp_str,str);
str_cat(temp_str," has joined");
scroll_message(temp_str);
return;
}
...
on_server = server_event;



Aufgrund der mangelden Dokumentation ergibt sich da für mich die Frage, ob nach einem Event-Aufruf mittels server_event, der gesendete String/Var automatisch als Parameter übergeben wird.
Posted By: TWO

Re: MP-Events - 03/05/07 17:21

Quote:

on_server = function
The function is executed when the server receives a message from a client. The event_type variable is set to the type of the message. When the message contains a string, a pointer to the received string is handed over as parameter to the function.
Remarks:
There are 4 types of server events:
Event_join A client has joined the session. The client name is handed over.
Event_leave A client has left the session. The client name is handed over.
Event_string A client has sent a string to the server. The string pointer is handed over.
Event_var A client has sent a variable or an array to the server.




Solltest du kein Englisch verstehen übersetz ich dir gerne den Text.
© 2024 lite-C Forums