GTA Közösség - A magyar GTA fórum

San Andreas Multiplayer (SA-MP) => SA-MP: Szerverfejlesztés => Segítségkérés => A témát indította: N@rbirock - 2012. Május 22. - 13:32:51

Cím: Intibe nem menti le a poziciót
Írta: N@rbirock - 2012. Május 22. - 13:32:51
   
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?
Cím: Intibe nem menti le a poziciót
Írta: SmokeR - 2012. Május 22. - 14:46:43
Oda kell írni az interior IDjét és a koordinátát
Cím: Intibe nem menti le a poziciót
Írta: TengeriMalac - 2012. Május 22. - 15:54:39
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;
}
Cím: Intibe nem menti le a poziciót
Írta: N@rbirock - 2012. Május 22. - 16:57:14
(483) : warning 202: number of arguments does not match definition
 
      GetPlayerInterior(playerid, Interior);

 
Ez mért van.
Cím: Intibe nem menti le a poziciót
Írta: Gabor.. - 2012. Május 22. - 17:14:22
GetPlayerInterior( playerid );
Cím: Intibe nem menti le a poziciót
Írta: Zsolesszka - 2012. Május 22. - 19:35:30
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);
Cím: Intibe nem menti le a poziciót
Írta: N@rbirock - 2012. Május 22. - 13:32:51
   
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?
Cím: Intibe nem menti le a poziciót
Írta: SmokeR - 2012. Május 22. - 14:46:43
Oda kell írni az interior IDjét és a koordinátát
Cím: Intibe nem menti le a poziciót
Írta: TengeriMalac - 2012. Május 22. - 15:54:39
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;
}
Cím: Intibe nem menti le a poziciót
Írta: N@rbirock - 2012. Május 22. - 16:57:14
(483) : warning 202: number of arguments does not match definition
 
      GetPlayerInterior(playerid, Interior);

 
Ez mért van.
Cím: Intibe nem menti le a poziciót
Írta: Gabor.. - 2012. Május 22. - 17:14:22
GetPlayerInterior( playerid );
Cím: Intibe nem menti le a poziciót
Írta: Zsolesszka - 2012. Május 22. - 19:35:30
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);