Én így csinálnám . . .
[pawn]#include <a_samp>
#include <zcmd>
new Text:TeleportText;
forward TeleTimer();
public OnGameModeInit()
{
TeleportText = TextDrawCreate(x, y,\"_\");
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, \"/parancs\", true) == 0)
{
Teleport(playerid, \"Tele neve\", x, y, z, a, int);
return 1;
}
return 1;
}
stock Teleport(playerid, telename[], Float:Px, Float:Py, Float:Pz, Float:Pa, interior)
{
new string[128], playerName[MAX_PLAYER_NAME];
SetPlayerPos(playerid,Px,Py,Pz);
SetPlayerFacingAngle(playerid,Pa);
SetPlayerInterior(playerid, interior);
TextDrawHideForAll(TeleportText);
GetPlayerName(playerid, playerName, MAX_PLAYER_NAME);
format(string, sizeof(string), \"%s elteleportált ide: %s\", playerName, telename);
TextDrawSetString(TeleportText, string);
TextDrawShowForAll(TeleportText);
SetTimerEx(\"TeleTimer\",10000,0, \"d\", playerid);
return 1;
}
public TeleTimer()
{
TextDrawHideForAll(TeleportText);
return 1;
}[/pawn]