09.02.2018, 15:47 
	
	
	
		C:\Users\Wallen\Desktop\LS DM\gamemodes\DBv1.pwn(1533) : warning 219: local variable "Range" shadows a variable at a preceding level
C:\Users\Wallen\Desktop\LS DM\gamemodes\DBv1.pwn(1535) : warning 219: local variable "using_deprecated_foreach_syntax" shadows a variable at a preceding level
C:\Users\Wallen\Desktop\LS DM\gamemodes\DBv1.pwn(1540) : error 017: undefined symbol "GetDistanceBetweenPoints"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Line 1533:
Line 1535:
Line: 1540
	
	
	
	
C:\Users\Wallen\Desktop\LS DM\gamemodes\DBv1.pwn(1535) : warning 219: local variable "using_deprecated_foreach_syntax" shadows a variable at a preceding level
C:\Users\Wallen\Desktop\LS DM\gamemodes\DBv1.pwn(1540) : error 017: undefined symbol "GetDistanceBetweenPoints"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
PHP код:
CMD:respawn(playerid, params[])
{
   if(connected[playerid] == true) return GameTextForPlayer(playerid, "~r~Spawn First", 5000, 5);
   if(GetPVarInt(playerid,"CMDABUSE")>GetTickCount())return SendClientMessage(playerid,-1,"{c3c3c3}(INFO) You need to wait 10 seconds before using /respawn again!");
   Killed[playerid] = 0;
   SetPVarInt(playerid,"CMDABUSE",GetTickCount()+10000); // anti abuse measurements
   new interiorID = GetPlayerInterior(playerid);
   new Float:health;
   GetPlayerHealth(playerid,health);
   if(interiorID == 10) return SendClientMessage(playerid, -1, "{c3c3c3}You can't use /respawn while in lobby, type /back first!"); // checking if player is in /lobby before typing /respawn
   if(health > 90)
   {
        RespawnNearby(playerid, 15.0);
        SpawnPlayer(playerid);
        SendClientMessage(playerid, -1, "{c3c3c3}(INFO) You have respawned!");
        PlayerTotalKills[playerid] = 0;
        Killed[playerid] = 0;
   }
   else
   {
      SendClientMessage(playerid, -1, "{c3c3c3}(INFO) Atleast 90hp is required in order to respawn.");
   }
   return 1;
} 
PHP код:
stock RespawnNearby(playerid,Float:limit)
{
    new Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2;
    GetPlayerPos(playerid,x1,y1,z1);
    new Float:Range = 3.0;
    new id = -1;
    foreach(Player,i)
    {
        if(playerid != i)
        {
            GetPlayerPos(i,x2,y2,z2);
            new Float:Dist = GetDistanceBetweenPoints(x1,y1,z1,x2,y2,z2); 
            if(floatcmp(Range,Dist) == 1 && floatcmp(limit,Range) == 1)
            {
                Range = Dist;
                id = i;
            }
        }
    }
    return id;
} 
PHP код:
new Float:Range = 3.0; 
PHP код:
foreach(Player,i) 
PHP код:
new Float:Dist = GetDistanceBetweenPoints(x1,y1,z1,x2,y2,z2); 






