Jump to content
  • 0

pomoc vlozeni kodu


SparcoCZ

Dotaz

Prosimvas mam kod na to abych se dostal na urad kdyz stoupnu na pickup ale nejak nevim kam ho dat

 

// ---[ 00 ]---[ Urad - VCHOD ]--------------------------| if(IsPlayerInArea(i,-1551.0052,1171.8087,7.1875,3) == 1)

{ SetPlayerInterior(i, 10);

SetPlayerPos(i,246.5165,113.3684,1003.2188);

SetPlayerFacingAngle(i, 359.2381);

SetCameraBehindPlayer(i); }

 

Link to comment
Share on other sites

21 odpovědí na tuto otázku

Recommended Posts

  • 0

C:\Documents and Settings\martin\Plocha\newmod.pwn(747) : warning 217: loose indentation

C:\Documents and Settings\martin\Plocha\newmod.pwn(747) : error 017: undefined symbol "IsPlayerInArea"

C:\Documents and Settings\martin\Plocha\newmod.pwn(749) : error 017: undefined symbol "i"

C:\Documents and Settings\martin\Plocha\newmod.pwn(750) : error 017: undefined symbol "i"

C:\Documents and Settings\martin\Plocha\newmod.pwn(751) : error 017: undefined symbol "i"

C:\Documents and Settings\martin\Plocha\newmod.pwn(752) : error 017: undefined symbol "i"

Link to comment
Share on other sites

  • 0

#pragma tabsize 0//nahoru k includum

 

misto toho i si dej playerid

 

nebbo si to dej do ciklusu for:

 

for(new i=0; i    {

 

 

a mezi stocky:

IsPlayerInSphere(playerid,Float:x,Float:y,Float:z,radius)
{
   if(GetPlayerDistanceToPointEx(playerid,x,y,z) < radius)
{
   return 1;
   }
   return 0;
}

GetPlayerDistanceToPointEx(playerid,Float:x,Float:y,Float:z)
{
   new Float:x1,Float:y1,Float:z1;
   new Float:tmpdis;
   GetPlayerPos(playerid,x1,y1,z1);
   tmpdis = floatsqroot(floatpower(floatabs(floatsub(x,x1)),2)+floatpower(floatabs(floatsub(y,y1)),2)+floatpower(floatabs(floatsub(z,z1)),2));
   return floatround(tmpdis);
}

 

;)

Link to comment
Share on other sites

  • 0

tak sem to udelal takto:

 

// ---[ 00 ]---[ Urad - VCHOD ]--------------------------|

 

if(IsPlayerInArea(playerid,-1551.0052,1171.8087,7.1875,3) == 1)

{

SetPlayerInterior(playerid, 10);

SetPlayerPos(playerid,246.5165,113.3684,1003.2188);

SetPlayerFacingAngle(playerid, 359.2381);

SetCameraBehindPlayer(playerid);

}

 

a mam jeste jeden error error 017: undefined symbol "IsPlayerInArea"

Link to comment
Share on other sites

  • 0

public OnPlayerPickUpPickup(playerid, pickupid)
{
   // ---[ 00 ]---[ Urad - VCHOD ]--------------------------|
   if(IsPlayerInSphere(playerid,-1551.0052,1171.8087,7.1875,3))
   { 
       SetPlayerInterior(playerid, 10);
       SetPlayerPos(playerid,246.5165,113.3684,1003.2188);
       SetPlayerFacingAngle(playerid, 359.2381);
       SetCameraBehindPlayer(playerid);
   }
   return 1;
}

 

A nahoru, mezi stocky si dej:

IsPlayerInSphere(playerid,Float:x,Float:y,Float:z,radius)
{
   if(GetPlayerDistanceToPointEx(playerid,x,y,z) < radius)
{
   return 1;
   }
   return 0;
}

GetPlayerDistanceToPointEx(playerid,Float:x,Float:y,Float:z)
{
   new Float:x1,Float:y1,Float:z1;
   new Float:tmpdis;
   GetPlayerPos(playerid,x1,y1,z1);
   tmpdis = floatsqroot(floatpower(floatabs(floatsub(x,x1)),2)+floatpower(floatabs(floatsub(y,y1)),2)+floatpower(floatabs(floatsub(z,z1)),2));
   return floatround(tmpdis);
}

 

A ted by to melo jit :thumbup:

 

IsPlayerInArea je uplne jina funkce.

Uč se: http://www.pawno.cz/viewtopic.php?f=8&t=558&st=0&sk=t&sd=a&hilit=isplayerinarea

Link to comment
Share on other sites

  • 0

Prosim vas tak nakonec ten kod mam takto

 

// ---[ 00 ]---[ Urad - VCHOD ]--------------------------|

 

if(IsPlayerInSphere(playerid,-1551.0052,1171.8087,7.1875,3) == 1)

{

SetPlayerInterior(playerid, 10);

SetPlayerPos(playerid,246.5165,113.3684,1003.2188);

SetPlayerFacingAngle(playerid, 359.2381);

SetCameraBehindPlayer(playerid);

}

 

 

a kdyz vlezu na pickup tak me to do toho interieru uradu nehodi nic se proste nestane co s tim pls :(

Link to comment
Share on other sites

  • 0

udelej to takhle....tu jednicku tam nedavej

 

public OnPlayerPickUpPickup(playerid, pickupid)
{
   // ---[ 00 ]---[ Urad - VCHOD ]--------------------------|
   if(IsPlayerInSphere(playerid,-1551.0052,1171.8087,7.1875,3))
   {
       SetPlayerInterior(playerid, 10);
       SetPlayerPos(playerid,246.5165,113.3684,1003.2188);
       SetPlayerFacingAngle(playerid, 359.2381);
       SetCameraBehindPlayer(playerid);
   }
   return 1;
}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...