Szerző Téma: Hogy lehet megcsinálni hogy csak 10m en belül lássák a chatet?  (Megtekintve 955 alkalommal)

Nem elérhető buci11

  • 502
    • Profil megtekintése
Hogy lehet megcsinálni hogy csak 10m en belül lássák a chatet?
« Dátum: 2011. November 21. - 20:42:14 »
0
mint rp szerokon hogy ne lehessen mindenkivel beszélni csak az aki közel van

Hogy lehet megcsinálni hogy csak 10m en belül lássák a chatet?
« Válasz #1 Dátum: 2011. November 21. - 20:49:05 »
0
RP szerókon? hmm?

Nem elérhető Sheet

  • 1508
  • Támogató
    • Profil megtekintése
Hogy lehet megcsinálni hogy csak 10m en belül lássák a chatet?
« Válasz #2 Dátum: 2011. November 21. - 20:58:39 »
0
Gf-be van egy fügvény, ProxDetector, azzal

Nem elérhető buci11

  • 502
    • Profil megtekintése
Hogy lehet megcsinálni hogy csak 10m en belül lássák a chatet?
« Válasz #3 Dátum: 2011. November 21. - 21:05:09 »
0
igen rp szerókhoz és mibe mi csinált kicsoda mit? légyszi linkelj :D

Nem elérhető Sheet

  • 1508
  • Támogató
    • Profil megtekintése
Hogy lehet megcsinálni hogy csak 10m en belül lássák a chatet?
« Válasz #4 Dátum: 2011. November 21. - 21:15:55 »
0
[pawn]forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
if(PlayerInfo[playerid][pLogged] == 1)
{
   new Float:posx, Float:posy, Float:posz;
   new Float:oldposx, Float:oldposy, Float:oldposz;
   new Float:tempposx, Float:tempposy, Float:tempposz;
   GetPlayerPos(playerid, oldposx, oldposy, oldposz);
   //radi = 2.0; //Trigger Radius
   for(new i = 0; i < MAX_PLAYERS; i++)
   {
      if(IsPlayerConnected(i) && (GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i)))
      {
         if(!BigEar)

         {


            GetPlayerPos(i, posx, posy, posz);


            tempposx = (oldposx -posx);


            tempposy = (oldposy -posy);


            tempposz = (oldposz -posz);


            //printf(\"DEBUG: X:%f Y:%f Z:%f\",posx,posy,posz);


            if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))


            {


               SendClientMessage(i, col1, string);


            }


            else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))


            {


               SendClientMessage(i, col2, string);


            }


            else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))


            {


               SendClientMessage(i, col3, string);


            }


            else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))


            {


               SendClientMessage(i, col4, string);


            }


            else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))


            {


               SendClientMessage(i, col5, string);


            }


         }


         else


         {


            SendClientMessage(i, col1, string);


         }


      }


   }


}//not connected


return 1;


}[/pawn]

Nem elérhető buci11

  • 502
    • Profil megtekintése
Hogy lehet megcsinálni hogy csak 10m en belül lássák a chatet?
« Válasz #5 Dátum: 2011. November 21. - 21:23:32 »
0
ebbbe is van error nem tudom hogy miez
[pawn]C:\\Users\\endyke\\Downloads\\szerver\\pawno\\tuning.pwn(4) : error 017: undefined symbol \"PlayerInfo\"
C:\\Users\\endyke\\Downloads\\szerver\\pawno\\tuning.pwn(4) : warning 215: expression has no effect
C:\\Users\\endyke\\Downloads\\szerver\\pawno\\tuning.pwn(4) : error 001: expected token: \";\", but found \"]\"
C:\\Users\\endyke\\Downloads\\szerver\\pawno\\tuning.pwn(4) : error 029: invalid expression, assumed zero
C:\\Users\\endyke\\Downloads\\szerver\\pawno\\tuning.pwn(4) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664           Copyright © 1997-2006, ITB CompuPhase
4 Errors.
[/pawn]

Hogy lehet megcsinálni hogy csak 10m en belül lássák a chatet?
« Válasz #6 Dátum: 2011. November 21. - 21:28:28 »
0
Nem kompatibilisek a változók az rp mododdal... Írd át, vagy csináld meg az onplayertext-et IsPlayerInRangeOfPoint-al.
OnPlayerText alatt:
[pawn]new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerInRangeOfPoint(i,5.0,x,y,z))
{
//Ez az amikor közel van az üzenetküldõhöz
}
}[/pawn]
Megtudod csinálni? Ha nem akkor mond hogy mit hogy akarsz meg ilyenek..

Nem elérhető Sheet

  • 1508
  • Támogató
    • Profil megtekintése
Hogy lehet megcsinálni hogy csak 10m en belül lássák a chatet?
« Válasz #7 Dátum: 2011. November 21. - 21:46:25 »
0
[pawn]forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
if(IsPlayerConnected(playerid))
{
   new Float:posx, Float:posy, Float:posz;
   new Float:oldposx, Float:oldposy, Float:oldposz;
   new Float:tempposx, Float:tempposy, Float:tempposz;
   GetPlayerPos(playerid, oldposx, oldposy, oldposz);
   //radi = 2.0; //Trigger Radius
   for(new i = 0; i < MAX_PLAYERS; i++)
   {
      if(IsPlayerConnected(i) && (GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i)))
      {
         if(!BigEar)

         {


            GetPlayerPos(i, posx, posy, posz);


            tempposx = (oldposx -posx);


            tempposy = (oldposy -posy);


            tempposz = (oldposz -posz);


            //printf(\"DEBUG: X:%f Y:%f Z:%f\",posx,posy,posz);


            if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))


            {


               SendClientMessage(i, col1, string);


            }


            else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))


            {


               SendClientMessage(i, col2, string);


            }


            else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))


            {


               SendClientMessage(i, col3, string);


            }


            else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))


            {


               SendClientMessage(i, col4, string);


            }


            else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))


            {


               SendClientMessage(i, col5, string);


            }


         }


         else


         {


            SendClientMessage(i, col1, string);


         }


      }


   }


}//not connected


return 1;


}[/pawn]

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal