i cant make join/leave messages
#1

ok i was making join messages and leave messages using samp wiki tutorial, compiled and got:


C:\Users\MYUSERNAME\Desktop\Favorites\[NR] Call of Duty Nuke's Return\filterscripts\joinmsg.pwn(1) : warning 235: public function lacks forward declaration (symbol "OnPlayerConnect")
C:\Users\MYUSERNAME\Desktop\Favorites\[NR] Call of Duty Nuke's Return\filterscripts\joinmsg.pwn(3) : error 017: undefined symbol "MAX_PLAYER_NAME"
C:\Users\MYUSERNAME\Desktop\Favorites\[NR] Call of Duty Nuke's Return\filterscripts\joinmsg.pwn(3) : error 029: invalid expression, assumed zero
C:\Users\MYUSERNAME\Desktop\Favorites\[NR] Call of Duty Nuke's Return\filterscripts\joinmsg.pwn(3) : error 017: undefined symbol "string"
C:\Users\MYUSERNAME\Desktop\Favorites\[NR] Call of Duty Nuke's Return\filterscripts\joinmsg.pwn(3) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

4 Errors.




code:
public OnPlayerConnect(playerid)
{
new pname[MAX_PLAYER_NAME], string[22 + MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "[JOIN](%s)%d", playerid,pname);
SendClientMessageToAll(0xAAAAAAAA, string);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new pname[MAX_PLAYER_NAME], string[39 + MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
switch(reason)
{
case 0: format(string, sizeof(string), "[TIMEOUT](%s)%d", playerid,pname);
case 1: format(string, sizeof(string), "[LEFT](%s)%d", playerid,pname);
case 2: format(string, sizeof(string), "[KICKED/BANNED](%s)%d", playerid,pname);
}
SendClientMessageToAll(0xAAAAAAAA, string);
return 1;







what i was trying to do is:

a player joins this comes up: [JOIN](id)PLAYERSUSERNAME




when a player leaves: [LEFT](id)PLAYERUSERNAME

when a player timeouts: [TIMEOUT](id)PLAYERUSERNAME

when a player is kicked/banned: [KICKED/BANNED](id)PLAYERUSERNAME



another thing i wanted to add but didnt know how is that the players ip is displayed when they connect and display it for admins only!

and example using join(i do want this for all messages): [JOIN](id)PLAYERUSERNAME [IP:THEIRIP]
Reply


Messages In This Thread
i cant make join/leave messages - by OxGeRo - 16.07.2010, 15:41
Re: i cant make join/leave messages - by DeathOnaStick - 16.07.2010, 15:46
Re: i cant make join/leave messages - by OxGeRo - 16.07.2010, 15:48
Re: i cant make join/leave messages - by OxGeRo - 16.07.2010, 15:51
Re: i cant make join/leave messages - by Kar - 16.07.2010, 15:52
Re: i cant make join/leave messages - by OxGeRo - 16.07.2010, 15:55
Re: i cant make join/leave messages - by Kar - 16.07.2010, 16:04
Re: i cant make join/leave messages - by OxGeRo - 16.07.2010, 16:06
Re: i cant make join/leave messages - by [HUN]Jaki - 16.07.2010, 17:09
Re: i cant make join/leave messages - by OxGeRo - 19.07.2010, 15:05

Forum Jump:


Users browsing this thread: 1 Guest(s)