Help me with this FS I made
#1

Ok so i made a player joiner, it doesnt work. IDK why?
Код:
#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" PLAYER JOINER FILTERSCRIPT BY KDSTRP");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}


public OnPlayerConnect(playerid)
{
  new string[64], pName[MAX_PLAYER_NAME];
  GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
  format(string,sizeof string,"%s has joined Black Ops",pName);
  SendClientMessageToAll(#define COLOR_BLUE 0x0000BBAA,string);
  return 1;
}
I want it to look like: (EXAMPLE NAME) Has Joined ERP. (IP Address Here) I just dont know what else to add, cause im not really knowing to the IP Address Coding.
Reply
#2

pawn Код:
new string[64], name[MAX_PLAYER_NAME], ip[16];
GetPlayerName(playerid, name, sizeof(name));
GetPlayerIp(playerid, ip, sizeof(ip));
format(string, sizeof(string), "%s has joined black ops. (%s)", name, ip);
SendClientMessageToAll(COLOR_BLUE, string);
Reply
#3

u should make it save ip adresses to a flat file or send to online admin only.
Reply
#4

well there was your code.
Reply
#5

I have a Admin SYstem, Would this Count?

Код:
if(IsPlayerAdmin(playerid) == 1){
new string[64], name[MAX_PLAYER_NAME], ip[16];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s has joined black ops. (%s)", name, ip);
SendClientMessageToAll(COLOR_BLUE, string);
}
I have Admininistration:3
Reply
#6

That is for RCON admin's.
Reply
#7

I dont care.
Reply
#8

Hmmmm... ok then.
Reply
#9

gooooooooood.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)