question 2 help me please
#1

How to make a welcome message? Plies code there?
Reply
#2

add this under OnPlayerConnect :
Код:
new welmessage[128];
new pNamE[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,sizeof(pNamE));
format(welmessage,sizeof(welmessage),"Welcome To Our Server %s,pNamE);
SendClientMessage(playerid,COLOR_RED,welmessage);
Reply
#3

Quote:
Originally Posted by !Vampire!
add this under OnPlayerConnect :
Код:
new welmessage[128];
new pNamE[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,sizeof(pNamE));
format(welmessage,sizeof(welmessage),"Welcome To Our Server %s,pNamE);
SendClientMessage(playerid,COLOR_RED,welmessage);
which means [128]
Reply
#4

Quote:
Originally Posted by !Vampire!
add this under OnPlayerConnect :
Код:
new welmessage[128];
new pNamE[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,sizeof(pNamE));
format(welmessage,sizeof(welmessage),"Welcome To Our Server %s,pNamE);
SendClientMessage(playerid,COLOR_RED,welmessage);
He gives as an error

C:\DOCUME~1\Londen\BUREAU~1\NIEUWE~1\new.pwn(156) : error 017: undefined symbol "pName"
C:\DOCUME~1\Londen\BUREAU~1\NIEUWE~1\new.pwn(156) : error 035: argument type mismatch (argument 2)
C:\DOCUME~1\Londen\BUREAU~1\NIEUWE~1\new.pwn(15 : error 017: undefined symbol "COLOR_RED"
C:\DOCUME~1\Londen\BUREAU~1\NIEUWE~1\new.pwn(159) : warning 217: loose indentation
C:\DOCUME~1\Londen\BUREAU~1\NIEUWE~1\new.pwn(155) : warning 204: symbol is assigned a value that is never used: "pNamE"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.
Reply
#5

use this :

Код:
new pNamE[MAX_PLAYER_NAME];
GetPlayerName(playerid,pNamE,sizeof(pNamE));
format(welmessage,sizeof(welmessage),"Welcome To Our Server %s,pNamE);
SendClientMessage(playerid,0xFFFF00AA,welmessage);
Reply
#6

Quote:
Originally Posted by !Vampire!
use this :

Код:
new pNamE[MAX_PLAYER_NAME];
GetPlayerName(playerid,pNamE,sizeof(pNamE));
format(welmessage,sizeof(welmessage),"Welcome To Our Server %s,pNamE);
SendClientMessage(playerid,0xFFFF00AA,welmessage);
but then I get this
C:\DOCUME~1\Londen\BUREAU~1\NIEUWE~1\new.pwn(154) : error 017: undefined symbol "nieuwe"
C:\DOCUME~1\Londen\BUREAU~1\NIEUWE~1\new.pwn(154) : error 017: undefined symbol "pNamE"
C:\DOCUME~1\Londen\BUREAU~1\NIEUWE~1\new.pwn(154) : warning 215: expression has no effect
C:\DOCUME~1\Londen\BUREAU~1\NIEUWE~1\new.pwn(154) : error 001: expected token: ";", but found "]"
C:\DOCUME~1\Londen\BUREAU~1\NIEUWE~1\new.pwn(154) : fatal error 107: too many error messages on one line

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


4 Errors.
Reply
#7

need some help?
Reply
#8

oh sorry i forgot something xD :
Код:
new pNamE[MAX_PLAYER_NAME];
GetPlayerName(playerid,pNamE,sizeof(pNamE));
format(welmessage,sizeof(welmessage),"Welcome To Our Server %s",pNamE);
SendClientMessage(playerid,0xFFFF00AA,welmessage);
Reply
#9

Quote:
Originally Posted by !Vampire!
oh sorry i forgot something xD :
Код:
new pNamE[MAX_PLAYER_NAME];
GetPlayerName(playerid,pNamE,sizeof(pNamE));
format(welmessage,sizeof(welmessage),"Welcome To Our Server %s",pNamE);
SendClientMessage(playerid,0xFFFF00AA,welmessage);
now a get this
C:\DOCUME~1\Londen\BUREAU~1\NIEUWE~1\new.pwn(156) : error 017: undefined symbol "welmessage"
C:\DOCUME~1\Londen\BUREAU~1\NIEUWE~1\new.pwn(156) : error 017: undefined symbol "welmessage"
C:\DOCUME~1\Londen\BUREAU~1\NIEUWE~1\new.pwn(156) : error 029: invalid expression, assumed zero
C:\DOCUME~1\Londen\BUREAU~1\NIEUWE~1\new.pwn(156) : fatal error 107: too many error messages on one line

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


4 Errors.
Reply
#10

dude i just meant to edit the part i sent u but if u want the whole code here is it :
Код:
new welmessage[128];
new pNamE[MAX_PLAYER_NAME];
GetPlayerName(playerid,pNamE,sizeof(pNamE));
format(welmessage,sizeof(welmessage),"Welcome To Our Server %s",pNamE);
SendClientMessage(playerid,COLOR_RED,welmessage);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)