Returning to where you died
#7

Hmm... I don't know what to say. This is how the lines should be placed inside the gamemode.

pawn Код:
#include <a_samp>

new Float:DeathPosX[MAX_PLAYERS]; //This
new Float:DeathPosY[MAX_PLAYERS]; //This
new Float:DeathPosZ[MAX_PLAYERS]; //This
new Died[MAX_PLAYERS]; //This

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
}

#endif

public OnPlayerConnect(playerid)
{
    Died[playerid] = 0; //This
    return 1;
}

public OnPlayerSpawn(playerid)
{
    if(Died[playerid] == 1) //This
    { //This
        SetPlayerPos(playerid,DeathPosX[playerid],DeathPosY[playerid],DeathPosZ[playerid]); //This
        Died[playerid] = 0; //This
    } //This
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    GetPlayerPos(playerid,DeathPosX[playerid],DeathPosY[playerid],DeathPosZ[playerid]); //This
    Died[playerid] = 1; //This
    return 1;
}
Reply


Messages In This Thread
Returning to where you died - by yoran765 - 23.06.2013, 19:27
Re: Returning to where you died - by Vlad64 - 23.06.2013, 19:35
Re: Returning to where you died - by yoran765 - 23.06.2013, 19:40
Re: Returning to where you died - by yoran765 - 23.06.2013, 19:44
Re: Returning to where you died - by Vlad64 - 23.06.2013, 20:04
Re: Returning to where you died - by yoran765 - 23.06.2013, 20:07
Re: Returning to where you died - by Vlad64 - 23.06.2013, 20:15

Forum Jump:


Users browsing this thread: 1 Guest(s)