Samp crashing while typing and sending chat messages
#3

here is on player text-
Its located on a filterscript, not on my gamemode.
Код:
public OnPlayerText(playerid, text[])
{


if(PlayerInfo[playerid][LoggedIn] !=1) return SendClientMessage(playerid,COLOR_RED,"אתה חייב להתחבר בשביל לרשום");


 new file[128],pName[24],s[128];
	GetPlayerName(playerid,pName,24);
	format(file,128,"Tags/%s.ini",pName);
	if(!dini_Isset(file,"Tag"))
	{
		if(fexist(file))
		{
			format(s,128," %s [ID:%d]",text,playerid);
			SendPlayerMessageToAll(playerid, s);
		}
		return 0;
	}
	else if(dini_Isset(file,"Tag"))
	{
		if(fexist(file))
		{
			format(s,128," %s [ID:%d| %s]",text,playerid,dini_Get(file,"Tag"));
			SendPlayerMessageToAll(playerid, s);
			return 1;
 }

 	}
	return 0;
}
Here is onplayerconnect on the same filterscript-
Код:
	new file[128],pName[24],s[128];
	GetPlayerName(playerid,pName,24);
	format(file,128,"Tags/%s.ini",pName);

	if(!fexist(file))
	{
	  dini_Create(file);
	  dini_Set(file,"Tag","");
	}
	new ServerName[26];
	GetServerVarAsString("hostname",ServerName,26);
	

	if(!dini_Exists(GetPlayerFile(playerid)))
	{
	  format(String,256," - /Register - בכדי להירשם אנא הקש ,\"%s\" ברוך הבא",GetName(playerid));
	  SendClientMessage(playerid,COLOR_BRIGHTRED,String);
	  return 1;
	}
	else if(dini_Exists(GetPlayerFile(playerid)) && !PlayerInfo[playerid][LoggedIn])
	{

	  format(String,256," - בכדי להתחבר לחשבונך אנא הקש סיסמה,\"%s\" ברוך הבא",GetName(playerid));
	  SendClientMessage(playerid,COLOR_BRIGHTRED,String);
	  	if(!dini_Exists(GetPlayerFile(playerid))) return SendClientMessage(playerid,COLOR_LIGHTBLUE," - /Register - אינך רשום במערכת, כדי להירשם אנא הקש");
	  if(PlayerInfo[playerid][LoggedIn]) return SendClientMessage(playerid,COLOR_LIGHTBLUE," - .הינך מחובר לחשבונך כבר");
	  format(PlayerInfo[playerid][Password],24,"%s",dini_Get(GetPlayerFile(playerid),"Password"));
	  ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"                       .התחברות - -=Stunts & DM=-","     .אנא הקש את סיסמתך בבקשה - -=Stunts & DM=-","התחבר","ביטול");
		return 1;

	}

	return 1;
}
Reply


Messages In This Thread
Samp crashing while typing and sending chat messages - by Apply - 16.05.2010, 02:48
Re: Samp crashing while typing and sending chat messages - by [HiC]TheKiller - 16.05.2010, 07:17
Re: Samp crashing while typing and sending chat messages - by Apply - 16.05.2010, 08:25

Forum Jump:


Users browsing this thread: 1 Guest(s)