Jump to content
  • 0

Question

Posted

Salut am 2 texte draw intrun loc amandoua si cum fac sa apara unu dupa altu?

Textdraw0 = TextDrawCreate(495.0, 435.0,"www.sa-mp.ro");
TextDrawAlignment(Textdraw0,1);
    TextDrawBackgroundColor(Textdraw0,0x000000ff);
    TextDrawFont(Textdraw0,3);
    TextDrawLetterSize(Textdraw0,0.299999,1.000000);
    TextDrawColor(Textdraw0,0xE6D617FF);
    TextDrawSetOutline(Textdraw0,1);
    TextDrawSetProportional(Textdraw0,1);
    TextDrawSetShadow(Textdraw0,1);

Textdraw1 = TextDrawCreate(495.0, 435.0,"Sa-mP");
    TextDrawAlignment(Textdraw1,1);
    TextDrawBackgroundColor(Textdraw1,0x000000ff);
    TextDrawFont(Textdraw0,3);
    TextDrawLetterSize(Textdraw0,0.299999,1.000000);
    TextDrawColor(Textdraw0,0xE6D617FF);
    TextDrawSetOutline(Textdraw1,1);
    TextDrawSetProportional(Textdraw1,1);
    TextDrawSetShadow(Textdraw1,1);

Multumesc

15 answers to this question

Recommended Posts

Posted
//indepulul modului
new
    bool:TDState=false;
//ongamemodeinit
SetTimer("ChangeTD",5000,1);//5 secunde

//unde vrei tu,dar nu in alta functie
forward ChangeTD();
public ChangeTD()
{
    if(!TDState)
    {
        TextDrawHideForAll(Textdraw0);
        TextDrawShowForAll(Textdraw1);
        TDState=!TDState;
    }else
    {
        TextDrawHideForAll(Textdraw1);
        TextDrawShowForAll(Textdraw0);
        TDState=!TDState;
    }
}

Posted

Farse am facut cum ai zis da uite cand intru pe sv cum apara si dupa ce ma loghez imi merge bine..

http://img31.imageshack.us/img31/2533/samp009wp.png

Textdraw0 = TextDrawCreate(495.0, 435.0,"www.gamees-x.Com");
    TextDrawAlignment(Textdraw0,1);
    TextDrawBackgroundColor(Textdraw0,0x000000ff);
    TextDrawFont(Textdraw0,3);
    TextDrawLetterSize(Textdraw0,0.299999,1.000000);
    TextDrawColor(Textdraw0,0xE6D617FF);
    TextDrawSetOutline(Textdraw0,1);
    TextDrawSetProportional(Textdraw0,1);
    TextDrawSetShadow(Textdraw0,1);
    
    Textdraw1 = TextDrawCreate(495.0, 436.0,"GameSx RPG");
    TextDrawAlignment(Textdraw1,1);
    TextDrawBackgroundColor(Textdraw1,0x000000ff);
    TextDrawFont(Textdraw1,3);
    TextDrawLetterSize(Textdraw1,0.299999,1.000000);
    TextDrawColor(Textdraw0,0xE6D617FF);
    TextDrawSetOutline(Textdraw1,1);
    TextDrawSetProportional(Textdraw1,1);
    TextDrawSetShadow(Textdraw1,1);

Posted

Cu timer...

- sus in script:

new TextdrawChanger;
- sub OnGameModeInit
SetTimer("TextdrawTimer",5000,1);
- undeva in script:
forward TextdrawTimer();
public TextdrawTimer()
{
	if(TextdrawChanger==1)
	{
		TextDrawHideForAll(Textdraw0);
		TextDrawShowForAll(Textdraw1);
		TextdrawChanger=0;
	}
	else if(TextdrawChanger==0)
	{
		TextDrawShowForAll(Textdraw0);
		TextDrawHideForAll(Textdraw1);
		TextdrawChanger=1;
	}
}

EDIT: Al 800-lea post al meu. :)

Posted

stuntman-=!!" post="39874" timestamp="1283687764"]

Cu timer...

- sus in script:

new TextdrawChanger;
- sub OnGameModeInit
SetTimer("TextdrawTimer",5000,1);
- undeva in script:
forward TextdrawTimer();
public TextdrawTimer()
{
	if(TextdrawChanger==1)
	{
		TextDrawHideForAll(Textdraw0);
		TextDrawShowForAll(Textdraw1);
		TextdrawChanger=0;
	}
	else if(TextdrawChanger==0)
	{
		TextDrawShowForAll(Textdraw0);
		TextDrawHideForAll(Textdraw1);
		TextdrawChanger=1;
	}
}

EDIT: Al 800-lea post al meu. :)

Mane tot asa imi apare http://img31.imageshack.us/img31/2533/samp009wp.png

Amandoua in acelasi timp si dupaia merge perfect da prima data cand intru pe sv imi apare asa si dupa cateva secunde merge bine..

Posted

Mane tot asa imi apare http://img31.imageshack.us/img31/2533/samp009wp.png

Amandoua in acelasi timp si dupaia merge perfect da prima data cand intru pe sv imi apare asa si dupa cateva secunde merge bine..

Ma ajuta si pe mine cineva?

Posted

Ai in GM la OnPlayerSpawn ceva legat de TextDraw-urile astea? Daca da, ce?

logo.png

ATENTIE!!! Nu imi trimiteti mesaje private care au legatura cu scriptingul. NU mai scriptez.

Posted

Nu am , uite ce am la onplayerspawn

public OnPlayerSpawn(playerid)
{
    if (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
	{
		gTeam[playerid] = 2;
		PlayerInfo[playerid][pTeam] = 2;
	}
	if (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
	{
		GivePlayerWeapon(playerid, 24, 50);
		GivePlayerWeapon(playerid, 29, 100);
		GivePlayerWeapon(playerid, 41, 10000);
	}
	if (PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13 || PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14 || PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)
	{
		GivePlayerWeapon(playerid, 5, 1);
	}
    GangZoneShowForPlayer(playerid, surenos, 0x80FFFF96);
    GangZoneShowForPlayer(playerid, bloods, 0x008000C8);
    GangZoneShowForPlayer(playerid, crips, 0x800080CA);
    GangZoneShowForPlayer(playerid, nortenos, 0xFFFF80D1);
	InitLockDoors(playerid);
	STDPlayer[playerid] = 0;
	gTeam[playerid] = PlayerInfo[playerid][pTeam]; //Set the Team
	if (gTeam[playerid] == 4) //medic /    criminal reset team
	{
		gTeam[playerid] = 3;
	}
	if(gPlayerLogged[playerid] == 0)
	{
    	SendClientMessage(playerid, COLOR_LIGHTRED, "** This server requires a Login BEFORE spawn (Kicked) **");
        KickPlayer[playerid] = 1;
 	}
	if(gTeam[playerid] == 11 && PlayerInfo[playerid][pLeader] < 1)
	{
	    MedicBill[playerid] = 0;
	    new rand = random(sizeof(CIV));
		SendClientMessage(playerid, COLOR_LIGHTRED, "You are not an Approved Leader, you are now a Civilian !");
		PlayerInfo[playerid][pTeam] = 3;
		gTeam[playerid] = 3;
		SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
		PlayerInfo[playerid][pModel] = CIV[rand];
		SpawnPlayer(playerid);
	}
	if(gTeam[playerid] == 5)
	{
	    if(PlayerInfo[playerid][pMember] < 1)
	    {
	        MedicBill[playerid] = 0;
	        new rand = random(sizeof(CIV));
			SendClientMessage(playerid, COLOR_LIGHTRED, "You are not a Family Member, you are now a Civilian !");
			PlayerInfo[playerid][pTeam] = 3;
			gTeam[playerid] = 3;
            SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
			PlayerInfo[playerid][pModel] = CIV[rand];
			SpawnPlayer(playerid);
		}
	}
	if(gTeam[playerid] == 10)
	{
	    if(PlayerInfo[playerid][pMember] != 8)
	    {
	        MedicBill[playerid] = 0;
	        new rand = random(sizeof(CIV));
			SendClientMessage(playerid, COLOR_LIGHTRED, "You are not a Member of this Agency, you are now a Civilian !");
			PlayerInfo[playerid][pTeam] = 3;
			gTeam[playerid] = 3;
            SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
			PlayerInfo[playerid][pModel] = CIV[rand];
			SpawnPlayer(playerid);
		}
	}
	if(gTeam[playerid] == 2 && PlayerInfo[playerid][pMember] > 3 && PlayerInfo[playerid][pMember] < 14)
	{
	    MedicBill[playerid] = 0;
		new rand = random(sizeof(CIV));
		SendClientMessage(playerid, COLOR_LIGHTRED, "You haven't applied for being an Officer / FBI / LS Council, you are now a Civilian !");
		PlayerInfo[playerid][pTeam] = 3;
		gTeam[playerid] = 3;
		SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
		PlayerInfo[playerid][pModel] = CIV[rand];
		SpawnPlayer(playerid);
	}
	if(PlayerInfo[playerid][pChar] > 0) { SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]); }
	else { SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]); }
	SetPlayerSpawn(playerid);
	SetPlayerToTeamColor(playerid);
	PlayerFixRadio(playerid);
	for(new i = 0; i < sizeof(Turfs); i++)
	{
	    GangZoneShowForPlayer(playerid, i, TurfInfo[i][zColor]);
	}
	return 1;
}

Posted

Scuze, am gresit eu.

La public OnPlayerConnect(playerid) adauga

TextDrawShowForPlayer(playerid,Textdraw0);
TextDrawShowForPlayer(playerid,Textdraw1);
Ar trebui sa ai ceva de genul:

public OnPlayerConnect(playerid)
{
    TextDrawShowForPlayer(playerid,Textdraw0);
    TextDrawShowForPlayer(playerid,Textdraw1);
    //restu de linii
}

logo.png

ATENTIE!!! Nu imi trimiteti mesaje private care au legatura cu scriptingul. NU mai scriptez.

Posted

Eu zic cai mai usor asa sa faci sa se schimbe.... Merge perfect :)

TextDrawu tau sa zicem ca e asta si adaugal asa cum e aici in gm fara scris .

Textdraw0 = TextDrawCreate(495.0, 435.0," ");
TextDrawAlignment(Textdraw0,1);
    TextDrawBackgroundColor(Textdraw0,0x000000ff);
    TextDrawFont(Textdraw0,3);
    TextDrawLetterSize(Textdraw0,0.299999,1.000000);
    TextDrawColor(Textdraw0,0xE6D617FF);
    TextDrawSetOutline(Textdraw0,1);
    TextDrawSetProportional(Textdraw0,1);
    TextDrawSetShadow(Textdraw0,1);
forward Reklam1();
forward Reklam2();
forward Reklam3();
forward Reklam4();
Dupaia dute la public OnGameModeInit() si adauga
    SetTimer("Reklam1", 30000, 1); // 1
    SetTimer("Reklam2", 40000, true); // true
    SetTimer("Reklam3", 40000, true); // true
    SetTimer("Reklam4", 40000, true); // true
public Reklam1()
{
	new string[256];
	new result[64];
	format(string, sizeof(string), "www.gamees-x.com", result);
    TextDrawSetString(Textdraw0, string);
	TextDrawShowForAll(Textdraw0);
	return 1;
}
public Reklam2()
{
	new string[256];
	new result[64];
	format(string, sizeof(string), "GameSx Rpg", result);
    TextDrawSetString(Textdraw0, string);
	TextDrawShowForAll(Textdraw0);
	return 1;
}
public Reklam3()
{
	new string[256];
	new result[64];
	format(string, sizeof(string), "www.sa-mp.ro", result);
    TextDrawSetString(Textdraw0, string);
	TextDrawShowForAll(Textdraw0);
	return 1;
}
public Reklam4()
{
	new string[256];
	new result[64];
	format(string, sizeof(string), "sa-mp", result);
    TextDrawSetString(Textdraw0, string);
	TextDrawShowForAll(Textdraw0);
	return 1;
}

E usor ...

i0418xcttya707ofg.jpg

Posted

Pai si cu asta ce fac

	Textdraw0 = TextDrawCreate(495.0, 435.0,"www.gamees-x.com");
    TextDrawAlignment(Textdraw0,1);
    TextDrawBackgroundColor(Textdraw0,0x000000ff);
    TextDrawFont(Textdraw0,2);
    TextDrawLetterSize(Textdraw0,0.299999,1.000000);
    TextDrawColor(Textdraw0,0xE6D617FF);
    TextDrawSetOutline(Textdraw0,1);
    TextDrawSetProportional(Textdraw0,1);
    TextDrawSetShadow(Textdraw0,1);
    
    Textdraw1 = TextDrawCreate(495.0, 435.0,"GameSx Rpg");
    TextDrawAlignment(Textdraw1,1);
    TextDrawBackgroundColor(Textdraw1,0x000000ff);
    TextDrawFont(Textdraw1,2);
    TextDrawLetterSize(Textdraw1,0.299999,1.000000);
    TextDrawColor(Textdraw1,0xE6D617FF);
    TextDrawSetOutline(Textdraw1,1);
    TextDrawSetProportional(Textdraw1,1);
    TextDrawSetShadow(Textdraw1,1);

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.