Szerző Téma: Intibe nem menti le a poziciót  (Megtekintve 634 alkalommal)

Intibe nem menti le a poziciót
« Dátum: 2012. Május 22. - 13:32:51 »
0 Show voters
   
public OnPlayerDisconnect(playerid, reason)
{
new name[MAX_PLAYER_NAME];
             new
                 Float:fPos[ 3 ];
        GetPlayerPos( playerid, fPos[ 0 ], fPos[ 1 ], fPos[ 2 ] );
        GetPlayerName( playerid, name, MAX_PLAYER_NAME );
        format( file, sizeof( file ), \"pos/%s.ini\", name );
        if( !dini_Exists( file ) )
        {
          dini_Create( file );
          dini_FloatSet(file, \"KooX\", fPos[ 0 ] );
          dini_FloatSet(file, \"KooY\", fPos[ 1 ] );
          dini_FloatSet(file, \"KooZ\", fPos[ 2 ] );
        }
        else
        {
          dini_FloatSet(file, \"KooX\", fPos[ 0 ] );
          dini_FloatSet(file, \"KooY\", fPos[ 1 ] );
          dini_FloatSet(file, \"KooZ\", fPos[ 2 ] );
        }
return 1;
}
ublic OnPlayerSpawn(playerid)
{
new name[MAX_PLAYER_NAME];
              new
                 Float:fPos[ 3 ];
        GetPlayerName( playerid, name, MAX_PLAYER_NAME );
        format( file, sizeof( file ), \"pos/%s.ini\", name );
        if( dini_Exists( file ) )
        {
           fPos[ 0 ] = dini_Float( file, \"KooX\" );
           fPos[ 1 ] = dini_Float( file, \"KooY\" );
           fPos[ 2 ] = dini_Float( file, \"KooZ\" );
           SetPlayerPos( playerid, fPos[ 0 ], fPos[ 1 ], fPos[ 2 ] );
        }
        else
        {
           SetPlayerPos( playerid, -1408.2825,2654.6626,55.6875) ;
        }
return 1;
}

 
Hogy lehet megcsinálni hogy interiorba is mentse?

SmokeR

  • Vendég
Intibe nem menti le a poziciót
« Válasz #1 Dátum: 2012. Május 22. - 14:46:43 »
0 Show voters
Oda kell írni az interior IDjét és a koordinátát

Intibe nem menti le a poziciót
« Válasz #2 Dátum: 2012. Május 22. - 15:54:39 »
+1 Show voters
public OnPlayerDisconnect(playerid, reason)
{
new name[MAX_PLAYER_NAME],
Float:fPos[3],
Interior;
GetPlayerInterior(playerid, Interior);
    GetPlayerPos(playerid, fPos[0], fPos[1], fPos[2]);
    GetPlayerName(playerid, name, MAX_PLAYER_NAME);
    format(file, sizeof(file), \"pos/%s.ini\", name);
    if(!dini_Exists(file)) dini_Create(file);
    dini_FloatSet(file, \"KooX\", fPos[0]);
    dini_FloatSet(file, \"KooY\", fPos[1]);
    dini_FloatSet(file, \"KooZ\", fPos[2]);
    dini_IntSet(file, \"KooI\", Interior);
return 1;
}
public OnPlayerSpawn(playerid)
{
new name[MAX_PLAYER_NAME],
Float:fPos[3],
Interior;
    GetPlayerName(playerid, name, MAX_PLAYER_NAME);
    format(file, sizeof(file), \"pos/%s.ini\", name);
    if(dini_Exists(file))
    {
fPos[0] = dini_Float(file, \"KooX\");
          fPos[1] = dini_Float(file, \"KooY\");
          fPos[2] = dini_Float(file, \"KooZ\");
          Interior = dini_Int(file, \"KooI\");
          SetPlayerPos(playerid, fPos[0], fPos[1], fPos[2]);
          SetPlayerInterior(playerid, Interior);
    }
    else SetPlayerPos(playerid, -1408.2825,2654.6626,55.6875);
    return 1;
}

Intibe nem menti le a poziciót
« Válasz #3 Dátum: 2012. Május 22. - 16:57:14 »
0 Show voters
(483) : warning 202: number of arguments does not match definition
 
      GetPlayerInterior(playerid, Interior);

 
Ez mért van.

Nem elérhető Gabor..

  • 1883
  • Gabor..
    • Profil megtekintése
Intibe nem menti le a poziciót
« Válasz #4 Dátum: 2012. Május 22. - 17:14:22 »
+1 Show voters
GetPlayerInterior( playerid );

Intibe nem menti le a poziciót
« Válasz #5 Dátum: 2012. Május 22. - 19:35:30 »
+1 Show voters
Idézetet írta: N@rbirock date=1337698634\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"21815\" data-ipsquote-contentclass=\"forums_Topic
(483) : warning 202: number of arguments does not match definition
 
      GetPlayerInterior(playerid, Interior);

 
Ez mért van.
 

Interior = GetPlayerInterior(playerid);

Intibe nem menti le a poziciót
« Válasz #6 Dátum: 2012. Május 22. - 13:32:51 »
0 Show voters
   
public OnPlayerDisconnect(playerid, reason)
{
new name[MAX_PLAYER_NAME];
             new
                 Float:fPos[ 3 ];
        GetPlayerPos( playerid, fPos[ 0 ], fPos[ 1 ], fPos[ 2 ] );
        GetPlayerName( playerid, name, MAX_PLAYER_NAME );
        format( file, sizeof( file ), \"pos/%s.ini\", name );
        if( !dini_Exists( file ) )
        {
          dini_Create( file );
          dini_FloatSet(file, \"KooX\", fPos[ 0 ] );
          dini_FloatSet(file, \"KooY\", fPos[ 1 ] );
          dini_FloatSet(file, \"KooZ\", fPos[ 2 ] );
        }
        else
        {
          dini_FloatSet(file, \"KooX\", fPos[ 0 ] );
          dini_FloatSet(file, \"KooY\", fPos[ 1 ] );
          dini_FloatSet(file, \"KooZ\", fPos[ 2 ] );
        }
return 1;
}
ublic OnPlayerSpawn(playerid)
{
new name[MAX_PLAYER_NAME];
              new
                 Float:fPos[ 3 ];
        GetPlayerName( playerid, name, MAX_PLAYER_NAME );
        format( file, sizeof( file ), \"pos/%s.ini\", name );
        if( dini_Exists( file ) )
        {
           fPos[ 0 ] = dini_Float( file, \"KooX\" );
           fPos[ 1 ] = dini_Float( file, \"KooY\" );
           fPos[ 2 ] = dini_Float( file, \"KooZ\" );
           SetPlayerPos( playerid, fPos[ 0 ], fPos[ 1 ], fPos[ 2 ] );
        }
        else
        {
           SetPlayerPos( playerid, -1408.2825,2654.6626,55.6875) ;
        }
return 1;
}

 
Hogy lehet megcsinálni hogy interiorba is mentse?

SmokeR

  • Vendég
Intibe nem menti le a poziciót
« Válasz #7 Dátum: 2012. Május 22. - 14:46:43 »
0 Show voters
Oda kell írni az interior IDjét és a koordinátát

Intibe nem menti le a poziciót
« Válasz #8 Dátum: 2012. Május 22. - 15:54:39 »
0 Show voters
public OnPlayerDisconnect(playerid, reason)
{
new name[MAX_PLAYER_NAME],
Float:fPos[3],
Interior;
GetPlayerInterior(playerid, Interior);
    GetPlayerPos(playerid, fPos[0], fPos[1], fPos[2]);
    GetPlayerName(playerid, name, MAX_PLAYER_NAME);
    format(file, sizeof(file), \"pos/%s.ini\", name);
    if(!dini_Exists(file)) dini_Create(file);
    dini_FloatSet(file, \"KooX\", fPos[0]);
    dini_FloatSet(file, \"KooY\", fPos[1]);
    dini_FloatSet(file, \"KooZ\", fPos[2]);
    dini_IntSet(file, \"KooI\", Interior);
return 1;
}
public OnPlayerSpawn(playerid)
{
new name[MAX_PLAYER_NAME],
Float:fPos[3],
Interior;
    GetPlayerName(playerid, name, MAX_PLAYER_NAME);
    format(file, sizeof(file), \"pos/%s.ini\", name);
    if(dini_Exists(file))
    {
fPos[0] = dini_Float(file, \"KooX\");
          fPos[1] = dini_Float(file, \"KooY\");
          fPos[2] = dini_Float(file, \"KooZ\");
          Interior = dini_Int(file, \"KooI\");
          SetPlayerPos(playerid, fPos[0], fPos[1], fPos[2]);
          SetPlayerInterior(playerid, Interior);
    }
    else SetPlayerPos(playerid, -1408.2825,2654.6626,55.6875);
    return 1;
}

Intibe nem menti le a poziciót
« Válasz #9 Dátum: 2012. Május 22. - 16:57:14 »
0 Show voters
(483) : warning 202: number of arguments does not match definition
 
      GetPlayerInterior(playerid, Interior);

 
Ez mért van.

Nem elérhető Gabor..

  • 1883
  • Gabor..
    • Profil megtekintése
Intibe nem menti le a poziciót
« Válasz #10 Dátum: 2012. Május 22. - 17:14:22 »
0 Show voters
GetPlayerInterior( playerid );

Intibe nem menti le a poziciót
« Válasz #11 Dátum: 2012. Május 22. - 19:35:30 »
0 Show voters
Idézetet írta: N@rbirock date=1337698634\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"21815\" data-ipsquote-contentclass=\"forums_Topic
(483) : warning 202: number of arguments does not match definition
 
      GetPlayerInterior(playerid, Interior);

 
Ez mért van.
 

Interior = GetPlayerInterior(playerid);

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal