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: BoSS - 2012. szeptember 27. - 17:11:00

Cím: Fejtalálatnál azonnali halál
Írta: BoSS - 2012. szeptember 27. - 17:11:00
Sziasztok
Megoldható az hogy ha fejtalálat ér egy játékost az egybõl meghaljon?Mindegy,hogy hány százaléson van az élete...
És ha megoldható akkor chatbe is kiírhatná,hogy ki kit lõtt le... :D
Elõre is köszönöm!
Cím: Fejtalálatnál azonnali halál
Írta: ZyZu. - 2012. szeptember 27. - 17:18:39
http://sampforum.hu/index.php?topic=15268.0
http://wiki.sa-mp.com/wiki/OnPlayerDeath
 

public OnPlayerDeath(playerid, killerid, reason)
{
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,\"Játékost %s megölte %s!\",pName, killerid);
SendClientMessageToAll(0xFFFFFFAA,string);
return 1;
}
Cím: Fejtalálatnál azonnali halál
Írta: Flash - 2012. szeptember 27. - 19:10:20
Zyzukám helyesbítek:
 
public OnPlayerDeath(playerid, killerid, reason)
{
new string[64], pName[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
GetPlayerName(killerid, name, sizeof(name));
format(string,sizeof string,\"Játékost %s megölte %s!\",pName, name);
SendClientMessageToAll(0xFFFFFFAA,string);
return 1;
}
Cím: Fejtalálatnál azonnali halál
Írta: bendor - 2012. szeptember 27. - 19:14:56
Idézetet írta: BoSS date=1348758660\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"28027\" data-ipsquote-contentclass=\"forums_Topic
Sziasztok
Megoldható az hogy ha fejtalálat ér egy játékost az egybõl meghaljon?Mindegy,hogy hány százaléson van az élete...
 
Értõolvasás.
Cím: Fejtalálatnál azonnali halál
Írta: Flash - 2012. szeptember 27. - 20:20:44
Ez a téma nem az oltogatásról/hunterkedésrõl szól, hanem a segítségrõl..  :)
Cím: Fejtalálatnál azonnali halál
Írta: Olie - 2012. szeptember 27. - 20:35:01
By Peppe:
 

#include <a_samp>
/*-------------------------
HeadShot System by Peppe
The faster implementation of a headshot system in SA:MP.
This script requires the new version of SA:MP 0.3b.
www.pawnoitalia.forumfree.it
www.atlantisgaming.it
-------------------------*/
#define TIMER_INTERVAL 150
new
    maxPlayers;
public OnFilterScriptInit()
{
    maxPlayers = GetMaxPlayers();
    SetTimer(\"CheckHeadShot\", TIMER_INTERVAL, 1);
    return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
    if(GetPVarInt(playerid, \"Headshotted\") == 1)
    {
        SetPVarInt(playerid, \"Headshotted\", 0);
        GameTextForPlayer(playerid, \"~r~Headshotted\", 3000, 3);
        GameTextForPlayer(killerid, \"~r~Headshott\", 3000, 3);
    }
    return 1;
}
forward CheckHeadShot();
public CheckHeadShot()
{
    new
        index;
    for(new playerid; playerid < maxPlayers; playerid++)
    {
        if(IsPlayerConnected(playerid))
        {
    index = GetPlayerAnimationIndex(playerid);
    if(index == 1173 || index == 1175 || index == 1177 || index == 1178)
    {
                SetPVarInt(playerid, \"Headshotted\", 1);
                SetPlayerHealth(playerid, 0);
            }
        }
    }
    return 1;
}
Cím: Fejtalálatnál azonnali halál
Írta: ZyZu. - 2012. szeptember 27. - 21:45:07
Idézetet írta: Bendor date=1348766096\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"28027\" data-ipsquote-contentclass=\"forums_Topic


Sziasztok
Megoldható az hogy ha fejtalálat ér egy játékost az egybõl meghaljon?Mindegy,hogy hány százaléson van az élete...
 
Értõolvasás.
 
[/quote]
Megjött a kedves Bendor Hunterunk. Ha megnéznéd a linket Bendor akkor rájönnél + nem tudom mi a bajod, hogy flash kijavitott inkább ne írj Bendor !