Ejemplo n.º 1
0
PCL void OnMessageSent(char *message, int slot,qboolean **show){
	FILE *write;
	char path[512]; 
	snprintf(path,sizeof(path),"%s/%i.txt",Plugin_Cvar_VariableString("fs_homepath"),Plugin_Cvar_VariableIntegerValue("net_port"));
	write = fopen( path, "at" );
	fprintf(write,"time\\%d\\name\\%s\\guid\\%s\\message\\%s\n",(int)time(NULL),Plugin_GetPlayerName(slot),Plugin_GetPlayerGUID(slot),message);
	fclose(write);
}
Ejemplo n.º 2
0
PCL int OnInit(){	// Funciton called on server initiation

    char portstr[6];

    serverport = Plugin_Cvar_VariableIntegerValue("net_port");

    Com_sprintf(portstr, sizeof(portstr), "%hu", serverport);

    Plugin_Printf("Sourcebans plugin is ready to work\n");
    return 0;
}