Mask System
#2

pawn Код:
GetPlayerName(playerid, string, sizeof(string));
strmid(PlayerInfo[playerid][pRealName], string, 0, strlen(string), 64);
strmid? What?

It isn't exactly the ideal function to use for string copying. It seems this is a habit commonly derived from Godfather edits. The problem is that strmid only copies characters up to strlen(string), so if anything was stored in pRealName previously, then any characters after strlen(string) would remain.

You could just use GetPlayerName to store the name directly:

pawn Код:
GetPlayerName(playerid, PlayerInfo[playerid][pRealName], MAX_PLAYER_NAME);
Reply


Messages In This Thread
Mask System - by nerovani - 20.02.2016, 11:27
Re: Mask System - by Chump - 20.02.2016, 18:59
Re: Mask System - by nerovani - 21.02.2016, 09:34
Re: Mask System - by nerovani - 21.02.2016, 14:26
Re: Mask System - by Chump - 21.02.2016, 19:22
Re: Mask System - by nerovani - 21.02.2016, 19:40
Re: Mask System - by nerovani - 21.02.2016, 19:52
Re: Mask System - by Chump - 21.02.2016, 19:54
Re: Mask System - by nerovani - 21.02.2016, 19:58
Re: Mask System - by Chump - 21.02.2016, 20:01

Forum Jump:


Users browsing this thread: 1 Guest(s)