Leaving message[Timeout bug]
#8

Quote:
Originally Posted by Problems
Посмотреть сообщение
Is that a problem with a plugin?
No, It is a problem in your code.

PHP код:
new pName[MAX_PLAYER_NAME][MAX_PLAYERS]; 
When they disconnect there is nothing for the server to GetPlayerName off, that's why when it runs that function it comes back as nothing.

When you call the disconnect instead of using GetPlayerName use pName[playerid]. When they connect use

PHP код:
GetPlayerName(playeridpName[playerid], MAX_PLAYER_NAME); 
to store it.

PHP код:
format(string,sizeof(string),"[LEAVING] %s Has just left the server! (%s)",pName[playerid],aDisconnectNames[reason]);
SendClientMessageToAll(COLOR_WHITE,string); 
Quote:
Originally Posted by Jpew
Посмотреть сообщение
I don't know how you test the in-game message but work for me here [/url]
Your code is untested, and errored. You define a string that is 50, when max name is 24.

The code, even if it does work, will only work for one. No use of arrays at all.


%d = Decimal
%f = Float
%s = String

They are not switchable, and you cannot mix them.

In this case, it's plain and simple, for %s to be the way forward (Just to those who have been guessing)
Reply


Messages In This Thread
Leaving message[Timeout bug] - by Problems - 18.07.2016, 09:24
Re: Leaving message[Timeout bug] - by Dejan12345 - 18.07.2016, 09:30
Respuesta: Leaving message[Timeout bug] - by Jpew - 18.07.2016, 09:32
Re: Leaving message[Timeout bug] - by Problems - 18.07.2016, 09:32
Respuesta: Leaving message[Timeout bug] - by Jpew - 18.07.2016, 09:36
Re: Leaving message[Timeout bug] - by Problems - 18.07.2016, 09:39
Respuesta: Leaving message[Timeout bug] - by Jpew - 18.07.2016, 09:52
Re: Leaving message[Timeout bug] - by Sew_Sumi - 18.07.2016, 09:56

Forum Jump:


Users browsing this thread: 1 Guest(s)