stock strvalEx( const string[] ) // fix for strval-bug with > 50 letters.
{
// written by mabako in less than a minute :X
if( strlen( string ) >= 50 ) return 0; // It will just return 0 if the string is too long
return strval(string);
}
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 Float:p1x;
new Float:p1y;
new Float:p1z;
new Float:p2x;
new Float:p2y;
new Float:p2z;
if(IsPlayerConnected(i) && IsPlayerConnected(q))
{
GetPlayerPos(i,p1x,p1y,p1z);
GetPlayerPos(q,p2x,p2y,p2z);
if(GetPointDistanceToPointExMorph(p1x,p1y,p1z,p2x,p2y,p2z) < pdistance)
{
if(PlayerInfo[q][pMaskuse] != 1)
{
ShowPlayerNameTagForPlayer(i,q,1);
}
}
else
{
ShowPlayerNameTagForPlayer(i,q,0);
}
}
}
}
}
}
}
public CheckCarHealth()
{
new string[256];
forward NameTimer();
|
Originally Posted by DJDhan
For your first warning:
Код:
forward NameTimer(); |
public NameTimer() // 43912
{ //43913
for(new i = 0;i < MAX_PLAYERS;i++) //43914
{ //43915
if(IsPlayerConnected(i)) //43916
{ //43916
for(new q = 0;q < MAX_PLAYERS;q++) //43917
{ //43918
if(IsPlayerConnected(q)) ////43919
{ //43920
new Float:p1x; //43921
new Float:p1y; //43922
new Float:p1z; //43923
new Float:p2x; //43924
new Float:p2y; //43925
new Float:p2z; //43926
if(IsPlayerConnected(i) && IsPlayerConnected(q)) //43927
{ ////43928
GetPlayerPos(i,p1x,p1y,p1z); //43929
GetPlayerPos(q,p2x,p2y,p2z); //43930
if(GetPointDistanceToPointExMorph(p1x,p1y,p1z,p2x,p2y,p2z) < pdistance) //43931
{ //43932
if(PlayerInfo[q][pMaskuse] != 1) //43933
{ //43934
ShowPlayerNameTagForPlayer(i,q,1); //43935
} //43936
} //43937
else //43938
{ //43939
ShowPlayerNameTagForPlayer(i,q,0); //43940
} //43941
|
Originally Posted by CJ101
Just use the function anywhere inside your script.
|

Float:GetPointDistanceToPointExMorph(Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2)
{
new Float:x, Float:y, Float:z;
x = x1-x2;
y = y1-y2;
z = z1-z2;
return floatsqroot(x*x+y*y+z*z);
}
D:\Scripts\SuperRp\gamemodes\LSRM.pwn(43932) : error 029: invalid expression, assumed zero D:\Scripts\SuperRp\gamemodes\LSRM.pwn(43932) : warning 215: expression has no effect D:\Scripts\SuperRp\gamemodes\LSRM.pwn(43932) : error 001: expected token: ";", but found ")" D:\Scripts\SuperRp\gamemodes\LSRM.pwn(43932) : error 029: invalid expression, assumed zero D:\Scripts\SuperRp\gamemodes\LSRM.pwn(43932) : fatal error 107: too many error messages on one line
|
Originally Posted by SisasPoiss
new error -.-
Код:
D:\Scripts\SuperRp\gamemodes\LSRM.pwn(43932) : error 029: invalid expression, assumed zero D:\Scripts\SuperRp\gamemodes\LSRM.pwn(43932) : warning 215: expression has no effect D:\Scripts\SuperRp\gamemodes\LSRM.pwn(43932) : error 001: expected token: ";", but found ")" D:\Scripts\SuperRp\gamemodes\LSRM.pwn(43932) : error 029: invalid expression, assumed zero D:\Scripts\SuperRp\gamemodes\LSRM.pwn(43932) : fatal error 107: too many error messages on one line |
|
Originally Posted by DJDhan
Find if you missed a semi-colon in that line before a ) [closing bracket]
|
if(GetPointDistanceToPointExMorph(p1x,p1y,p1z,p2x,p2y,p2z) < pdistance)) // on this one
{
if(PlayerInfo[q][pMaskuse] != 1);
{
ShowPlayerNameTagForPlayer(i,q,1);
}
}
else
|
Originally Posted by SisasPoiss
Quote:
pawn Код:
|