Entering Server - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Entering Server (
/showthread.php?tid=86151)
Entering Server -
Ownzer - 12.07.2009
Can somone help me make somthing by IP. If there IP Is detected on connect it will say in chat
SendClientMessage(playerid, COLOR_RED,"Attention: Server Owner Has Joined The Server");
Detects VIA IP On player connect If Owner?
Re: Entering Server -
happyface - 12.07.2009
https://sampwiki.blast.hk/wiki/GetPlayerIp
look at the example
Re: Entering Server -
Ownzer - 12.07.2009
I got some errors
Код:
//--------------------------------------Server Entry----------------------------
public OnPlayerConnect(playerid )
{
new plrIP[16];
GetPlayerIp(playerid, plrIP, sizeof(plrIP));
if (!strcmp(plrIP, "127.0.0.1")) {
SendClientMessage(playerid, COLOR_RED,"Attention: Server Owner Has Joined The Server")
}
return 1;
}
//-------------------------------------------------------------------------------
Errors:
Код:
C:\Users\Nathan\Desktop\Script.pwn(2) : warning 235: public function lacks forward declaration (symbol "OnPlayerConnect")
C:\Users\Nathan\Desktop\Script.pwn(5) : error 017: undefined symbol "GetPlayerIp"
C:\Users\Nathan\Desktop\Script.pwn(5) : warning 202: number of arguments does not match definition
C:\Users\Nathan\Desktop\Script.pwn(7) : error 017: undefined symbol "strcmp"
C:\Users\Nathan\Desktop\Script.pwn(8) : error 017: undefined symbol "SendClientMessage"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Errors.
Help please
Re: Entering Server -
Gimax - 12.07.2009
did you put this in beginning of script?
Re: Entering Server -
Paranoja - 12.07.2009
Код:
public OnPlayerConnect(playerid )
change to, 1 error should solve
Код:
public OnPlayerConnect(playerid)
Re: Entering Server -
Gimax - 12.07.2009
Quote:
Originally Posted by Paranoja
Код:
public OnPlayerConnect(playerid )
change to, 1 error should solve
Код:
public OnPlayerConnect(playerid)
|
lol, not, he didn't include a_samp
Re: Entering Server -
Ownzer - 12.07.2009
Fixed.
Thanks for the help really appreciate it
Re: Entering Server -
Frankox - 12.07.2009
Lol, wouldnt it be easier like this?
if(GetPlayerName(playerid) == your name)
SendClientMessageToAll(0xFFFF00AA, "The server owner has joined to the server.");
else
new n[MAX_PLAYER_NAME], string[48];
GetPlayerName(playerid, n, sizeof(name));
format(string, sizeof(string), "%s has joined the server.", n );
SendClientMessageToAll(0xFFFF00AA, string);
Re: Entering Server -
Paranoja - 12.07.2009
Quote:
Originally Posted by Gimax
Quote:
Originally Posted by Paranoja
Код:
public OnPlayerConnect(playerid )
change to, 1 error should solve
Код:
public OnPlayerConnect(playerid)
|
lol, not, he didn't include a_samp
|
I didin't mentioned that it would fix all the errors, i said that one of the errors could occur because of the invalid heading...
Re: Entering Server -
Francis[French] - 29.07.2009
Quote:
Originally Posted by Paranoja
Quote:
Originally Posted by Gimax
Quote:
Originally Posted by Paranoja
Код:
public OnPlayerConnect(playerid )
change to, 1 error should solve
Код:
public OnPlayerConnect(playerid)
|
lol, not, he didn't include a_samp
|
I didin't mentioned that it would fix all the errors, i said that one of the errors could occur because of the invalid heading...
|
No, spacing is not source of errors.