All pastes #544090 Raw Edit

Nothing

public cpp v1 · immutable
·published 2007-06-06 08:53 UTC
rendered paste body
#include <a_samp>const ChatLines = 10;new Text:Rtext[ChatLines];new cCounter[2];new cHistory[ChatLines][64];new Float:cPositions[ChatLines] ={	8.0,	18.0,	28.0,	38.0,	48.0,	58.0,	68.0,	78.0,	88.0,	98.0};public OnFilterScriptInit(){	print("\n---------------------");	print(" RText v1.0 by Ramjet.");	print("-----------------------\n");	return 1;}public OnFilterScriptExit(){    print("\n------------------------------");	print(" RText v1.0 by Ramjet unloaded.");	print("--------------------------------\n");	return 1;}public OnPlayerRequestClass(playerid, classid){	return 1;}public OnPlayerConnect(playerid){	new pname[MAX_PLAYER_NAME], string[64];	GetPlayerName(playerid, pname, sizeof(pname));	format(string, sizeof(string), "[join] %s has joined the server.", pname);	CreateClientText(playerid,string);	return 1;}public OnPlayerDisconnect(playerid, reason){    new pname[MAX_PLAYER_NAME], string[64];	GetPlayerName(playerid, pname, sizeof(pname));	format(string, sizeof(string), "[part] %s has left the server.", pname);	CreateClientText(playerid,string);	return 1;}public OnPlayerText(playerid, text[]){	new string[256], pname[MAX_PLAYER_NAME];	GetPlayerName(playerid, pname, sizeof(pname));	format(string, sizeof(string), "<%s> %s", pname, text);	CreateClientText(playerid,string);	return 0;}public OnPlayerPrivmsg(playerid, recieverid, text[]){	return 1;}CreateClientText(playerid,text[]){	cCounter[0]++;	if(cCounter[0] == 10)	{		cCounter[0] = false;	    cCounter[1] = true;	}	if(cCounter[1])	{	    for(new j; j < ChatLines; j++)	    {	        if(j == 0)	        {         		TextDrawDestroy(Rtext[j]);         		/*	        	Rtext[j] = TextDrawCreate(8.0, cPositions[cCounter[0]], text);				TextDrawUseBox(Rtext[cCounter[0]], true);				TextDrawBoxColor(Rtext[cCounter[0]], GetPlayerColor(playerid));				TextDrawFont(Rtext[cCounter[0]], 3);				TextDrawShowForAll(Rtext[cCounter[0]]);				format(cHistory[9], sizeof(cHistory[]), text);				break;				*/	        }         	TextDrawDestroy(Rtext[j]);	        Rtext[j] = TextDrawCreate(8.0, cPositions[j - 1], cHistory[cCounter[(j - 1)]]);			TextDrawUseBox(Rtext[cCounter[0]], true);			TextDrawBoxColor(Rtext[cCounter[0]], GetPlayerColor(playerid));			TextDrawFont(Rtext[cCounter[0]], 3);			TextDrawShowForAll(Rtext[cCounter[0]]);	   }	}	else	{	    format(cHistory[cCounter[0]], sizeof(cHistory[]), text);		Rtext[cCounter[0]] = TextDrawCreate(8.0, cPositions[cCounter[0]], text);		TextDrawUseBox(Rtext[cCounter[0]], true);		TextDrawBoxColor(Rtext[cCounter[0]], GetPlayerColor(playerid));		TextDrawFont(Rtext[cCounter[0]], 3);		TextDrawShowForAll(Rtext[cCounter[0]]);	}}