30.01.2016, 10:23
#define FILTERSCRIPT
#include <a_samp>
new Text: DescriptionText[MAX_PLAYERS];
new DescriptionTimer[MAX_PLAYERS];
stock ShowDescriptionText(playerid, string[])
{
KillTimer(DescriptionTimer[playerid]);
TextDrawSetString(DescriptionText[playerid], string);
TextDrawShowForPlayer(playerid, DescriptionText[playerid]);
DescriptionTimer[playerid] = SetTimerEx("HideDescriptionText", 5000, 0, "i", playerid);
return 1;
}
public OnFilterScriptInit()
{
print("*****************************");
print(" A tutorial by Jack Leslie ");
print("*****************************");
return 1;
}
public OnPlayerConnect(playerid)
{
DescriptionText[playerid] = TextDrawCreate(320.0, 380.0, " ");
TextDrawAlignment(DescriptionText[playerid], 2);
TextDrawFont(DescriptionText[playerid], 1);
TextDrawLetterSize(DescriptionText[playerid], 0.320000, 1.700000);
TextDrawSetOutline(DescriptionText[playerid], 1);
TextDrawHideForPlayer(playerid, DescriptionText[playerid]);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/whatsmyname", cmdtext, true) == 0)
{
new string[126], playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "~w~Your username is: ~y~%s~w~.", playername);
ShowDescriptionText(playerid, string);
return 1;
}
else if(strcmp("/lol", cmdtext, true) == 0)
{
ShowDescriptionText(playerid, "~p~Laugh Out Loud");
return 1;
}
return 0;
}
#include <a_samp>
new Text: DescriptionText[MAX_PLAYERS];
new DescriptionTimer[MAX_PLAYERS];
stock ShowDescriptionText(playerid, string[])
{
KillTimer(DescriptionTimer[playerid]);
TextDrawSetString(DescriptionText[playerid], string);
TextDrawShowForPlayer(playerid, DescriptionText[playerid]);
DescriptionTimer[playerid] = SetTimerEx("HideDescriptionText", 5000, 0, "i", playerid);
return 1;
}
public OnFilterScriptInit()
{
print("*****************************");
print(" A tutorial by Jack Leslie ");
print("*****************************");
return 1;
}
public OnPlayerConnect(playerid)
{
DescriptionText[playerid] = TextDrawCreate(320.0, 380.0, " ");
TextDrawAlignment(DescriptionText[playerid], 2);
TextDrawFont(DescriptionText[playerid], 1);
TextDrawLetterSize(DescriptionText[playerid], 0.320000, 1.700000);
TextDrawSetOutline(DescriptionText[playerid], 1);
TextDrawHideForPlayer(playerid, DescriptionText[playerid]);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/whatsmyname", cmdtext, true) == 0)
{
new string[126], playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "~w~Your username is: ~y~%s~w~.", playername);
ShowDescriptionText(playerid, string);
return 1;
}
else if(strcmp("/lol", cmdtext, true) == 0)
{
ShowDescriptionText(playerid, "~p~Laugh Out Loud");
return 1;
}
return 0;
}