AdminMod.de
https://www.adminmod.de/

plugin_sharp_connect hat fehler
https://www.adminmod.de/viewtopic.php?t=3402
Seite 1 von 1

Autor:  sentinel [ 22.06.2002, 04:37 ]
Betreff des Beitrags:  plugin_sharp_connect hat fehler

Code:
/* This plugin was made by: Sharpsniper it is a revision of Fah-Q[Dio]' plugin but this
 * pluin announces every person that connects to your server in a typesay form and 
 * greets them.
 * Plugin Created: October 13, 2001, 12:48 AM 
 * Sharpsniper: $harp$sniper Enjoy!
 * Changes Made: Announce Delay is now 30 seconds, Everyone gets announced
*/

#include <core>
#include <console>
#include <string>
#include <admin>
#include <adminlib>

#define ACCESS_ALL 0
#define ANNOUNCE_DELAY 30

new STRING_VERSION[MAX_DATA_LENGTH] = "2.50.07";

plr_announce(strName[], lConnect=0) {

  new Text[MAX_TEXT_LENGTH] = "";

  if (lConnect == 1) {
    strcat(Text,"Welcome ^n ",MAX_DATA_LENGTH);
    strcat(Text, strName,MAX_DATA_LENGTH);
    strcat(Text, " Enjoy playing here!!",MAX_DATA_LENGTH);
  } else {
    strcat(Text, strName,MAX_DATA_LENGTH);
    strcat(Text, "^n has left but will return again!",MAX_DATA_LENGTH);
  }
  typesay(Text, 7, 12, 125, 12);
}

public plugin_connect(HLName,HLIP,UserIndex) {

	new strName[MAX_NAME_LENGTH];
	convert_string(HLName, strName, MAX_NAME_LENGTH);

	set_timer("ann_timer",ANNOUNCE_DELAY, 1, strName);

	return PLUGIN_CONTINUE;
}

public plugin_disconnect(HLName, UserIndex) {

  new strName[MAX_NAME_LENGTH];
  convert_string(HLName, strName, MAX_NAME_LENGTH);

  if (access(ACCESS_ALL, strName)!=0)
    plr_announce(strName, 0);

  return PLUGIN_CONTINUE;
}

public ann_timer(Timer,Repeat,HLName,HLParam) {
  new strName[MAX_NAME_LENGTH];

  convert_string(HLParam,strName,MAX_NAME_LENGTH);

  if (access(ACCESS_ALL, strName)!=0)
		plr_announce(strName, 1);

}

public plugin_init() {
  plugin_registerinfo("Client Connect Greeting!","Announces and Greets Every Player That Connects!",STRING_VERSION);  

  return PLUGIN_CONTINUE;
}
kann mir einer helfen?
hat diesen fehlerplugin_sharp_cconnect.sma(33) Error [25]: function heading differs from prototype
plugin_sharp_cconnect.sma(43) Error [25]: function heading differs from prototype


*edit: das mit den CODE Tags lernen wir noch, gell? ;) --daRope*

Autor:  Sir Drink a lot [ 26.06.2002, 09:52 ]
Betreff des Beitrags: 

So sollte es klappen.

Autor:  Sir Drink a lot [ 26.06.2002, 09:53 ]
Betreff des Beitrags: 

Ich habe einfach aus HLName ein HLUserName gemacht.

Seite 1 von 1 Alle Zeiten sind UTC+01:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/