setplayername
#1

using SetPlayerName in OnPlayerDisconnects causes server to crash.
Reply
#2

Perhaps so but why would you want to set someones name when they disconnect in the first place
Reply
#3

Quote:
Originally Posted by Jay_
View Post
Perhaps so but why would you want to set someones name when they disconnect in the first place
Agreed seriously, why?
Reply
#4

it doesnt matters, a bug is a bug.
^^
Reply
#5

Ofc it happens, no one would use SetPlayerName in OnPlayerDisconnect
LoL why would you do it ina first place yeah,
and the thing is that it will try to change player's name, and playerid is disconnected already, so CRASH
Reply
#6

Quote:
Originally Posted by Macluawn
View Post
it doesnt matters, a bug is a bug.
^^
No, i think it's logical for this to happen.
It's not like player is setting name first then quits.
Player quits first and then his name will be changed, but this won't happen because he left already and this will result in an epic crash.
Also this makes no sens at all, why would you set player's name? I mean this could be a good thing when you are saving it in a file or something, but.,
Reply
#7

Quote:
Originally Posted by Macluawn
View Post
using SetPlayerName in OnPlayerDisconnects causes server to crash.
Although setting the player's name when he's disconnecting doesn't make any sense, it won't crash the server. You should post the code you're using in OnPlayerDisconnect.
Reply
#8

Tested it doesn't crash at all.

pawn Code:
public OnPlayerDisconnect ( playerid, reason )
{
    SetPlayerName   ( playerid, "LongGoneFag"  );
    printf          ( "%d%d", playerid, reason );

    return 1;
}
Reply
#9

Quote:
Originally Posted by Zh3r0
View Post
No, i think it's logical for this to happen.
It's not like player is setting name first then quits.
Player quits first and then his name will be changed, but this won't happen because he left already and this will result in an epic crash.
Also this makes no sens at all, why would you set player's name? I mean this could be a good thing when you are saving it in a file or something, but.,
I tried it with gmx and kick, in both ways the server crashed.
Reply
#10

Quote:
Originally Posted by Macluawn
View Post
I tried it with gmx and kick, in both ways the server crashed.
Remove SetPlayerName and try again.
I've tested, and it did not crash the server when restarting it or kicking a player.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)