03.11.2011, 13:30
Criei esse codigo que й muito utel para quem quer criar um gamemode de mini missoes, esse codigo simula um carregamento de uma missгo muito parecida com o loading do GTA OFF.
Screenshots:
Download:
Screenshots:
Download:
pawn Код:
#include <a_samp>
new Text:Textdraw0,
Text:Textdraw1,
Text:Textdraw2,
Text:Textdraw3,
Text:Textdraw4,
Text:Textdraw5,
Text:Textdraw6;
public OnFilterScriptInit()
{
Textdraw0 = TextDrawCreate(656.000000, 2.000000, " ");
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 1);
TextDrawLetterSize(Textdraw0, 0.500000, 1.000000);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw0, 0);
TextDrawSetProportional(Textdraw0, 1);
TextDrawSetShadow(Textdraw0, 1);
TextDrawUseBox(Textdraw0, 1);
TextDrawBoxColor(Textdraw0, 255);
TextDrawTextSize(Textdraw0, -30.000000, 0.000000);
Textdraw1 = TextDrawCreate(656.000000, 386.000000, " ");
TextDrawBackgroundColor(Textdraw1, 255);
TextDrawFont(Textdraw1, 1);
TextDrawLetterSize(Textdraw1, 0.500000, 1.000000);
TextDrawColor(Textdraw1, -1);
TextDrawSetOutline(Textdraw1, 0);
TextDrawSetProportional(Textdraw1, 1);
TextDrawSetShadow(Textdraw1, 1);
TextDrawUseBox(Textdraw1, 1);
TextDrawBoxColor(Textdraw1, 255);
TextDrawTextSize(Textdraw1, -30.000000, 0.000000);
Textdraw2 = TextDrawCreate(477.000000, 367.000000, ".");
TextDrawBackgroundColor(Textdraw2, 255);
TextDrawFont(Textdraw2, 1);
TextDrawLetterSize(Textdraw2, 0.500000, 1.000000);
TextDrawColor(Textdraw2, 255);
TextDrawSetOutline(Textdraw2, 1);
TextDrawSetProportional(Textdraw2, 1);
TextDrawUseBox(Textdraw2, 1);
TextDrawBoxColor(Textdraw2, 255);
TextDrawTextSize(Textdraw2, 631.000000, 65.000000);
Textdraw3 = TextDrawCreate(582.000000, 373.000000, ".");
TextDrawBackgroundColor(Textdraw3, -16776961);
TextDrawFont(Textdraw3, 1);
TextDrawLetterSize(Textdraw3, 0.500000, -0.200000);
TextDrawColor(Textdraw3, -16776961);
TextDrawSetOutline(Textdraw3, 1);
TextDrawSetProportional(Textdraw3, 1);
TextDrawUseBox(Textdraw3, 1);
TextDrawBoxColor(Textdraw3, -16776961);
TextDrawTextSize(Textdraw3, 623.000000, 32.000000);
Textdraw4 = TextDrawCreate(549.000000, 373.000000, ".");
TextDrawBackgroundColor(Textdraw4, -16776961);
TextDrawFont(Textdraw4, 1);
TextDrawLetterSize(Textdraw4, 0.500000, -0.200000);
TextDrawColor(Textdraw4, -16776961);
TextDrawSetOutline(Textdraw4, 1);
TextDrawSetProportional(Textdraw4, 1);
TextDrawUseBox(Textdraw4, 1);
TextDrawBoxColor(Textdraw4, -16776961);
TextDrawTextSize(Textdraw4, 623.000000, 32.000000);
Textdraw5 = TextDrawCreate(484.000000, 373.000000, ".");
TextDrawBackgroundColor(Textdraw5, -16776961);
TextDrawFont(Textdraw5, 1);
TextDrawLetterSize(Textdraw5, 0.500000, -0.200000);
TextDrawColor(Textdraw5, -16776961);
TextDrawSetOutline(Textdraw5, 1);
TextDrawSetProportional(Textdraw5, 1);
TextDrawUseBox(Textdraw5, 1);
TextDrawBoxColor(Textdraw5, -16776961);
TextDrawTextSize(Textdraw5, 623.000000, 32.000000);
Textdraw6 = TextDrawCreate(475.000000, 349.000000, "~r~Mini ~b~Missoes");
TextDrawBackgroundColor(Textdraw6, 255);
TextDrawFont(Textdraw6, 3);
TextDrawLetterSize(Textdraw6, 0.700000, 1.400000);
TextDrawColor(Textdraw6, -1);
TextDrawSetOutline(Textdraw6, 1);
TextDrawSetProportional(Textdraw6, 1);
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/teste", cmdtext, true, 10) == 0)
{
CarregarMissao(playerid);
return 1;
}
return SendClientMessage(playerid, -1,"Comando Desconhecido");
}
forward CarregarMissao(playerid);
public CarregarMissao(playerid)
{
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawShowForPlayer(playerid, Textdraw1);
TextDrawShowForPlayer(playerid, Textdraw2);
SetTimerEx("loading1", 3000, false, "i", playerid);
TextDrawShowForPlayer(playerid, Textdraw6);
}
forward loading1(playerid);
public loading1(playerid)
{
TextDrawShowForPlayer(playerid, Textdraw3);
SetTimerEx("loading2", 3000, false, "i", playerid);
}
forward loading2(playerid);
public loading2(playerid)
{
TextDrawShowForPlayer(playerid, Textdraw4);
SetTimerEx("loading3", 3000, false, "i", playerid);
}
forward loading3(playerid);
public loading3(playerid)
{
TextDrawShowForPlayer(playerid, Textdraw5);
SetTimerEx("destruir", 3000, false, "i", playerid);
}
forward destruir(playerid);
public destruir(playerid)
{
TextDrawHideForAll(Textdraw0);
TextDrawHideForAll(Textdraw1);
TextDrawHideForAll(Textdraw2);
TextDrawHideForAll(Textdraw3);
TextDrawHideForAll(Textdraw4);
TextDrawHideForAll(Textdraw5);
TextDrawHideForAll(Textdraw6);
}