Üdv!
Kellene nekem egy kis segítség:
//===========================
// * * |
// * * |
// * * |
// ** AdminChat |
// * * |
// * * |
// * * |
// |
// Dont NOT Re-Upload it |
// Do not Remove the credits |
// By XtremeR |
//===========================
#include <a_samp>
#include <zcmd>
#include <sscanf>
//new textdraws
new Text:XMsg[15];
new XMsgStr[15][128];
main()
{
print(\"\\n--------------------------------------------------------\");
print(\" XAdmin Chat By XtremeR\");
print(\"--------------------------------------------------------\\n\");
}
public OnFilterScriptInit()
{
print(\"-----------------------------\");
print(\"X - AdminChat By XtremeR Loaded !\");
print(\"-----------------------------\");
for(new line; line<15; line++)
{
format(XMsgStr[line], 128, \" \");
}
XMsg[2] = TextDrawCreate(365, 374.000000, XMsgStr[2]);
XMsg[3] = TextDrawCreate(365, 383.000000, XMsgStr[3]);
XMsg[4] = TextDrawCreate(365, 392.000000, XMsgStr[4]);
XMsg[5] = TextDrawCreate(365, 410.000000, XMsgStr[5]);
XMsg[6] = TextDrawCreate(365, 410.000000, XMsgStr[6]);
XMsg[7] = TextDrawCreate(365, 419.000000, XMsgStr[7]);
XMsg[8] = TextDrawCreate(365, 428.000000, XMsgStr[8]);
XMsg[9] = TextDrawCreate(365, 436.000000, XMsgStr[9]);
for(new line; line<15; line++)
{
TextDrawLetterSize(XMsg[line], 0.230000, 1.100000);
TextDrawSetShadow(XMsg[line], 0);
TextDrawTextSize(XMsg[line], 640, 480);
TextDrawBoxColor(XMsg[line], 0x000000FF);
TextDrawSetProportional(XMsg[line], 1);
TextDrawFont(XMsg[line], 1);
TextDrawSetOutline(XMsg[line], 1);
TextDrawShowForAll(XMsg[line]);
}
for(new line; line<15; line++)
{
TextDrawLetterSize(XMsg[line], 0.230000, 1.100000);
TextDrawSetShadow(XMsg[line], 0);
TextDrawTextSize(XMsg[line], 640, 480);
TextDrawBoxColor(XMsg[line], 0x000000FF);
TextDrawSetProportional(XMsg[line], 1);
TextDrawFont(XMsg[line], 1);
TextDrawSetOutline(XMsg[line], 1);
TextDrawShowForAll(XMsg[line]);
}
return 1;
}
public OnFilterScriptExit()
{
for(new line; line<15; line++)
{
TextDrawDestroy(XMsg[line]);
}
return 1;
}
public OnPlayerConnect(playerid)
{
for(new line; line<15; line++)
{
TextDrawShowForPlayer(playerid, XMsg[line]);
}
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
CMD:report(playerid,params[])
{
new string[128],id,reason[128];
new reportername[MAX_PLAYER_NAME],hackername[MAX_PLAYER_NAME];
GetPlayerName(playerid,reportername,sizeof(string));
GetPlayerName(id,hackername,sizeof(string));
if(sscanf(params,\"us\",id,reason)) return SendClientMessage(playerid,-1,\"ERROR: /report <Playername/id> <Reason>\");
else if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, \"ERROR: Player is not connected!\");
format(string,sizeof(string),\"~r~REPORT: %s has reported %s ~y~<Reason: %s>\",reportername,hackername,reason);
SendXMessage(playerid,string);
return 1;
}
CMD:a(playerid,params[]) {
#pragma unused params
IsPlayerAdmin(playerid);
if(isnull(params)) return SendClientMessage(playerid,0xBD34DAFF,\"Current Usage: /a [text]\");
SendClientMessage(playerid,0x20B2AAFF,\"Message Sended!\");
new string[128],name[24];
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),\"Admin %s: %s\",name,params);
SendXMessage(playerid,string);
return 1;
}
CMD:clearadminchat(playerid,params[]) {
#pragma unused params
IsPlayerAdmin(playerid);
SendXMessage(playerid,\" \");
SendXMessage(playerid,\" \");
SendXMessage(playerid,\" \");
SendXMessage(playerid,\" \");
SendXMessage(playerid,\" \");
SendXMessage(playerid,\" \");
SendXMessage(playerid,\" \");
SendXMessage(playerid,\" \");
SendXMessage(playerid,\" \");
return 1;
}
stock SendXMessage(playerid, const text[])
{
for(new line; line < 15; line++)
{
TextDrawShowForPlayer(playerid, XMsg[line]);//show the lines
}
for(new line; line < 15; line++)
{
TextDrawHideForAll(XMsg[line]);//hide the line
if(line < 14)
{
XMsgStr[line] = XMsgStr[line+1];//Message going up ^
TextDrawSetString(XMsg[line], XMsgStr[line]);
}
}
format(XMsgStr[9], 128, \"%s\",text);//Message !
TextDrawSetString(XMsg[9], XMsgStr[9]);//Start fron Line 9
for(new line; line < 15; line++) // goes up
{
TextDrawShowForAll(XMsg[line]);//TextDraw show for player
}
return 1;
}
//ALL BY XTREMER!
Van ez a script és azt szeretném, ha csak 5 sor jelenne meg a mostani 15 sor helyett, ezáltal nem foglalná el az egész képernyõt a kiírás.
Azt is szeretném, hogy csak rcon admin írhasson ide.
Köszönöm elõre is.