PDA

View Full Version : Join Message Problem.


DerickClark
16/08/2015, 11:09 PM
- Fixed

xVIP3Rx
16/08/2015, 11:18 PM
Try formatting it with the new "accent" string.
Also debug it after loading and before saving.

Note: I'm guessing you're not having any problems with your saving/loading system.

DerickClark
16/08/2015, 11:30 PM
- Fixed

UnDetectable
16/08/2015, 11:40 PM
CMD:setmessage(playerid,params[])
{
new accent[128], string[128];
if(sscanf(params,"s[128]",accent)) return SendClientMessage(playerid, -1, "Usage: /setmessage [custom message]");
format(string, sizeof(string), "You have set your Join Message to: %s", accent);
SendClientMessage(playerid, -1, string);
format(PlayerInfo[playerid][personalmsg], 128, "%s", accent);

return 1;
}

public OnPlayerConnect(playerid)
{
new Message[256];
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
format(Message, sizeof(Message), "%s (%s) joined!", pName, PlayerInfo[playerid][personalmsg]);
SendClientMessageToAll(-1, Message);
return 1;
}

About your register thing which is >
new Stats[1000], string[128], accent;
INI_WriteString(File,"Accent", "The New Player");
PlayerInfo[playerid][personalmsg] = accent;

Make it like this:
format(PlayerInfo[playerid][personalmsg], 128, "%s", "The New Player");

DerickClark
16/08/2015, 11:48 PM
CMD:setmessage(playerid,params[])
{
new accent[128], string[128];
if(sscanf(params,"s[128]",accent)) return SendClientMessage(playerid, -1, "Usage: /setmessage [custom message]");
format(string, sizeof(string), "You have set your Join Message to: %s", accent);
SendClientMessage(playerid, -1, string);
format(PlayerInfo[playerid][personalmsg], 128, "%s", accent);

return 1;
}

public OnPlayerConnect(playerid)
{
new Message[256];
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
format(Message, sizeof(Message), "%s (%s) joined!", pName, PlayerInfo[playerid][personalmsg]);
SendClientMessageToAll(-1, Message);
return 1;
}

About your register thing which is >
new Stats[1000], string[128], accent;
INI_WriteString(File,"Accent", "The New Player");
PlayerInfo[playerid][personalmsg] = accent;

Make it like this:
format(PlayerInfo[playerid][personalmsg], 128, "%s", "The New Player");
The register part, don't work.


Edited; its working now. thanks