PDA

View Full Version : Y_ini sending message


1fret
19/06/2017, 07:33 AM
Ok i want to send the ban reason to the player when they connect to the server after they were banned. I add this at my /ban command new INI:File = INI_Open(UserPath(targetid));
INI_SetTag(File,"Ban");
INI_WriteString(File,"Bannedby",GetName(playerid));
INI_WriteString(File,"Reason",reason);
INI_Close(File);

Which works, buts i want to send the person the reason they are banned and who they were banned by, but i dont know how to do that with Y_ini can someone help me or show me some example's of how to do it please

JasonRiggs
19/06/2017, 06:28 PM
Like what I can see now is that you will send him the reason yeah, But you won't send him BannedBy who, As you will send the own player name, And put Under OnPlayerConnect if he is banned make a format and send it to him..

1fret
20/06/2017, 12:06 AM
Like what I can see now is that you will send him the reason yeah, But you won't send him BannedBy who, As you will send the own player name, And put Under OnPlayerConnect if he is banned make a format and send it to him..

Mhmm dont think you understand fully of what i needed. I dont know how to load the line "Reason" when the player connects to the server, i dont kno how to do this with Y_ini.. I just want it to work like this , Once a player connects and there account is banned it will load the line (Reason) from there account file and send it to them. So if i got banned for weapon hacking , once i relog it will send me this "You have been banned from this server. Reason: Weapon Hacks"