Jump to content

Recommended Posts

Posted

Acum am sa va zic cum se face un TextDraw care arata unde s-a teleportat cineva .

1.Pentru Inceput adaugam la inceputul GM-ului:

new Text:TextdrawTele, TextHideTimer;
2.Mergem la public OnGameModeInit() si adaugam:
TextdrawTele = TextDrawCreate(20.000000, 428.000000, " ");
TextDrawBackgroundColor(TextdrawTele, 255);
TextDrawFont(TextdrawTele, 1);
TextDrawLetterSize(TextdrawTele, 0.300000, 1.000000);
TextDrawColor(TextdrawTele, 16711935);
TextDrawSetOutline(TextdrawTele, 1);
TextDrawSetProportional(TextdrawTele, 1);
3.Mergem la public OnPlayerConnect si adaugam:
TextDrawHideForPlayer(playerid,TextdrawTele);
4.Mergem la sfarsitul GM-ului si adaugam:
stock ShowTele(playerid,const tele[])
{
	new string[256],pName[MAX_PLAYER_NAME];
	GetPlayerName(playerid, pName, sizeof(pName));
	format(string, sizeof(string), "~g~%s ~w~s-a dus la ~y~%s",pName, tele);
	TextDrawSetString(TextdrawTele,string);
	TextDrawShowForAll(TextdrawTele);
	KillTimer(TextHideTimer);
	TextHideTimer = SetTimer("OnTextDrawTeleHide",3000,0);
}
stock OnTextDrawTeleHide() { TextDrawHideForAll(TextdrawTele); return 1; }
Si pentru a aparea unde teai teleportat adaugati:
ShowTele(playerid,cmdtext);

la fiecare comanda de teleport .

i0418xcttya707ofg.jpg

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.