SA-MP Forums Archive
[Ayuda] Spawn... - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: [Ayuda] Spawn... (/showthread.php?tid=360301)



[Ayuda] Spawn... - OTACON - 17.07.2012

Buenas a Todos, Tengo un problemita con el spawn, no spawnea forzandolo con SpawnPlayer(playerid); y despues con un SetSpawnInfo :S

coloke un print para ver si llega a SpawnPlayer(playerid); y si, si llega pero no tiene efecto SpawnPlayer

como puedo solucionarlo y hacer ke forze al player a spawnear ?

Desde ya muchas gracias.


Re: [Ayuda] Spawn... - MrDeath537 - 17.07.2012

Primero va SetSpawnInfo antes que SpawnPlayer, ahora mismo voy a hacer un test y te comento editando este post.

EDIT:
A mн me estб funcionando perfecto, te dejo el test que hice:
pawn Код:
//==============================================================================

#include <a_samp>

//==============================================================================

public OnFilterScriptInit()
{
    print("\n TEST: SpawnPlayer\n");
    return 1;
}

//==============================================================================

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (!strcmp("/spawn", cmdtext, false))
    {
        SetSpawnInfo(playerid, 0, 0, 0.0, 0.0, 5.0, 0.0, 0,0, 0,0, 0,0);
        SpawnPlayer(playerid);
        return 1;
    }

    return 0;
}

//==============================================================================



Respuesta: Re: [Ayuda] Spawn... - OTACON - 17.07.2012

Quote:
Originally Posted by MrDeath537
Посмотреть сообщение
Primero va SetSpawnInfo antes que SpawnPlayer, ahora mismo voy a hacer un test y te comento editando este post.

EDIT:
A mн me estб funcionando perfecto, te dejo el test que hice:
pawn Код:
//==============================================================================

#include <a_samp>

//==============================================================================

public OnFilterScriptInit()
{
    print("\n TEST: SpawnPlayer\n");
    return 1;
}

//==============================================================================

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (!strcmp("/spawn", cmdtext, false))
    {
        SetSpawnInfo(playerid, 0, 0, 0.0, 0.0, 5.0, 0.0, 0,0, 0,0, 0,0);
        SpawnPlayer(playerid);
        return 1;
    }

    return 0;
}

//==============================================================================
con razon no me funcionaba xD, estaba arrevez .
Hay funciono, Muchas Gracias