Welcoem Messsage
#1

how to make a welcome message for example when iany player is to connect
cennection xxxxx
connected , joining the game
and here to show a message Welcome To Server Example
Reply
#2

pawn Код:
public OnIncomingConnection(playerid, ip_address[], port)
{
    printf("Incoming connection for player ID %i [IP/port: %s:%i]", playerid, ip_address, port);
    return 1;
}
https://sampwiki.blast.hk/wiki/OnIncomingConnection

pawn Код:
public OnPlayerConnect(playerid)
{
    new string[64], pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
    format(string,sizeof string,"%s has joined the server. Welcome!",pName);
    SendClientMessageToAll(0xFFFFFFAA,string);
    return 1;
}

https://sampwiki.blast.hk/wiki/OnPlayerConnect
Reply
#3

where to replace?
Reply
#4

add that into ur gamemode
Reply
#5

You seriously just didn't ask that. Place it anywhere in your gamemode, just after the includes. If you already have a callback or both in your gamemode just add it to the existing one.
Reply
#6

thank u very much bro , im sorry bt i'm begginer
Reply
#7

hey when i press f5 to create amx is showing me a problem

C:\Documents and Settings\Administrator\Desktop\PERP.pwn(19) : warning 235: public function lacks forward declaration (symbol "OnIncomingConnection")
C:\Documents and Settings\Administrator\Desktop\PERP.pwn(53372) : error 021: symbol already defined: "Audio_OnPlayerConnect"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)