[Question] Variable of disconnected/Connected player.
#1

Hello, I am kinda new in the Pawno scripting. And, I would like to know how do I script the variable of the name of the players that gets connected/disconnected.
Reply
#2

pawn Code:
new pname[24], string[64];//Creating the variable!
GetPlayerName(playerid,pname,sizeof(pname));//Getting the player's name!
format(string,sizeof(string),"%s (%i) has just connected!",pname,playerid);//Using the variable in a message!
SendClientMessageToAll(-1,string);//Sending the formatted message above ^ to everyone!
Reply
#3

Yeah, what [MWR]Blood said. Place at at OnPlayerConnect.
Reply
#4

What does the numbers means?
Reply
#5

You mean the:
pawn Code:
(%i)
// ???
That's the playerid, so the output is:
Code:
Daniel Carrey (0) has just connected.
Reply
#6

Quote:
Originally Posted by DanTzi
View Post
What does the numbers means?
The numbers are the string cells - put in short, the maximum length of a string.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)