1.Pentru Inceput adaugam la inceputul GM-ului:
Code: [Select]
new Text:TextdrawTele, TextHideTimer;
2.Mergem la public OnGameModeInit() si adaugam:
Code: [Select]
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:
Code: [Select]
TextDrawHideForPlayer(playerid,TextdrawTele);
4.Mergem la sfarsitul GM-ului si adaugam:
Code: [Select]
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:
Code: [Select]
ShowTele(playerid,cmdtext);
Sursa: http://www.sa-mp.ro/forum/index.php/topic,11358.0.html
Code: [Select]
new Text:TextdrawTele, TextHideTimer;
2.Mergem la public OnGameModeInit() si adaugam:
Code: [Select]
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:
Code: [Select]
TextDrawHideForPlayer(playerid,TextdrawTele);
4.Mergem la sfarsitul GM-ului si adaugam:
Code: [Select]
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:
Code: [Select]
ShowTele(playerid,cmdtext);
Sursa: http://www.sa-mp.ro/forum/index.php/topic,11358.0.html