24.06.2011, 23:33
Olha eu tenho aqui o morphinc mais nгo sei como faзo para virar um include e sу colar no bloco de notas e depois colocar na pasta das Includes ?
Code Pawn:
new pdistance = 1;
forward NameTimer();
Float:GetPointDistanceToPointExMorph(Float1,Floa t:y1,Float:z1,Float2,Float:y2,Float:z2)
{
new Float, Float:y, Float:z;
x = x1-x2;
y = y1-y2;
z = z1-z2;
return floatsqroot(x*x+y*y+z*z);
}
stock SetPDistance(dista)
{
pdistance = dista;
}
stock GetPDistance()
{
return pdistance;
}
stock EnableDistancedNameTag(delay)
{
SetTimer("NameTimer",delay,1);
}
forward NameTimer();
public NameTimer()
{
for(new i = 0;i < MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
for(new q = 0;q < MAX_PLAYERS;q++)
{
if(IsPlayerConnected(q))
{
new Float1x;
new Float1y;
new Float1z;
new Float2x;
new Float2y;
new Float2z;
if(IsPlayerConnected(i) && IsPlayerConnected(q))
{
GetPlayerPos(i,p1x,p1y,p1z);
GetPlayerPos(q,p2x,p2y,p2z);
if(GetPointDistanceToPointExMorph(p1x,p1y,p1z,p2x, p2y,p2z) < pdistance)
{
ShowPlayerNameTagForPlayer(i,q,1);
}
else
{
ShowPlayerNameTagForPlayer(i,q,0);
}
}}}}}
}
Code Pawn:
new pdistance = 1;
forward NameTimer();
Float:GetPointDistanceToPointExMorph(Float1,Floa t:y1,Float:z1,Float2,Float:y2,Float:z2)
{
new Float, Float:y, Float:z;
x = x1-x2;
y = y1-y2;
z = z1-z2;
return floatsqroot(x*x+y*y+z*z);
}
stock SetPDistance(dista)
{
pdistance = dista;
}
stock GetPDistance()
{
return pdistance;
}
stock EnableDistancedNameTag(delay)
{
SetTimer("NameTimer",delay,1);
}
forward NameTimer();
public NameTimer()
{
for(new i = 0;i < MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
for(new q = 0;q < MAX_PLAYERS;q++)
{
if(IsPlayerConnected(q))
{
new Float1x;
new Float1y;
new Float1z;
new Float2x;
new Float2y;
new Float2z;
if(IsPlayerConnected(i) && IsPlayerConnected(q))
{
GetPlayerPos(i,p1x,p1y,p1z);
GetPlayerPos(q,p2x,p2y,p2z);
if(GetPointDistanceToPointExMorph(p1x,p1y,p1z,p2x, p2y,p2z) < pdistance)
{
ShowPlayerNameTagForPlayer(i,q,1);
}
else
{
ShowPlayerNameTagForPlayer(i,q,0);
}
}}}}}
}