26.01.2014, 19:18
(
Последний раз редактировалось DerickClark; 26.01.2014 в 23:15.
)
It's not doing nothing, in the player file, all it do is Message: 0, how I fix message ? like
Message: Hello
This don't show when the player set their message
Message: Hello
pawn Код:
Password: ^
Admin: 0
Jailed: 0
Wanted: 0
Bans: 0
BanTime: 0
TruckerLicense: 0
BusLicense: 0
StatsMetersDriven: 0.000000
StatsTruckerJobs: 0
StatsConvoyJobs: 0
StatsBusDriverJobs: 0
StatsPilotJobs: 0
StatsPoliceFined: 0
StatsPoliceJailed: 0
Message: 0
Money: 0
Score: 0
pawn Код:
format(LineForFile, 100, "Message: %s\r\n", APlayerData[playerid][JoinMessage]);
fwrite(PFile, LineForFile); // And save it to the file
pawn Код:
if (strcmp(ParameterName, "Message:", false) == 0) // If the parametername is correct ("JoinMessage")
APlayerData[playerid][JoinMessage] = strval(ParameterValue); // Store the JoinMessage
pawn Код:
COMMAND:setmessage(playerid, params[])
{
new string[128], pName[MAX_PLAYER_NAME];
if(sscanf(params, "s[128]", APlayerData[playerid][JoinMessage])) return SendClientMessage(playerid, -1, "Usage: /setmessage [message]");
GetPlayerName(playerid, pName, sizeof(pName));
new file[100], File:PFile, LineForFile[100];
if (fexist(file))
{
PFile = fopen(file, io_append);
format(LineForFile, 100, "Message: %s\r\n", APlayerData[playerid][JoinMessage]);
fwrite(PFile, LineForFile);
fclose(PFile);
format(string, sizeof(string), "You have set your welcome message to: %s", APlayerData[playerid][JoinMessage]);
SendClientMessage(playerid, -1, string);
}
return 1;
}