Auto kill

Ja kas neizprotams.

Moderator: Moderātori

Post Reply
User avatar
Tektro
Jauniņais
Jauniņais
Posts: 34
Joined: 23 Sep 2012, 12:40

Auto kill

Post by Tektro » 27 Sep 2012, 16:00

Vai kaads var iedot auto kill skriptu un pamaciibu kaa lietot

User avatar
Unknowns
Censoņa
Censoņa
Posts: 364
Joined: 03 Jul 2012, 12:40

Re: Auto kill

Post by Unknowns » 27 Sep 2012, 17:21

BoxG izmanto paštaisītu , bet es varētu palīdzēt uzstaisīt , prasi man vai Magnifico , skype:hujna2
Image

User avatar
Tektro
Jauniņais
Jauniņais
Posts: 34
Joined: 23 Sep 2012, 12:40

Re: Auto kill

Post by Tektro » 27 Sep 2012, 17:26

nav skaips krch man leens nevaru novilkt 100gadi kachaasies

User avatar
Unknowns
Censoņa
Censoņa
Posts: 364
Joined: 03 Jul 2012, 12:40

Re: Auto kill

Post by Unknowns » 27 Sep 2012, 17:27

Savējais |:)
EDIT: ķer , tiko paņēmu piemēru no bāzes savas

Code: Select all

public OnPlayerConnect(playerid)
{
	
	SetTimer("eStrike_AK_Timer", 1, true);
	return 1;

}
forward eStrike_AK_Timer(playerid);
public eStrike_AK_Timer(playerid)
{
if (IsPlayerInAreaEx(playerid,-74.913414, -394.928070, 13.086585, -266.928070))
{
	new Nick[MAX_PLAYER_NAME];
   	GetPlayerName(playerid, Nick, sizeof(Nick));
   	if(strfind(Nick, "(niks)", true) != -1 || strfind(Nick, "(klans)", true) != -1)
    {
	SetPlayerHealth(playerid,100);
    }
}
else
{
SetPlayerHealth(playerid,1.0);
}
}
bet ka gribi lai viens iejiet -

Code: Select all

public OnPlayerUpdate(playerid)
{
    new Nick[MAX_PLAYER_NAME];
        GetPlayerName(playerid, Nick, sizeof(Nick));
    if(IsPlayerInArea(playerid, 2516.385009, 2472.937011, 2402.251708, 2351.189453))
    {
                if(strfind(Nick, "(niks)", true) != -1)
                {
                    return 1;
                }
                else
                {
                        SetPlayerHealth(playerid, 0);
                }
        }
        return 1;
}
 
stock IsPlayerInArea(playerid, Float:max_x, Float:min_x, Float:max_y, Float:min_y)
{
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
        if(X = min_x && Y = min_y) return 1;
        return 0;
}
}
:)
Image

User avatar
Tektro
Jauniņais
Jauniņais
Posts: 34
Joined: 23 Sep 2012, 12:40

Re: Auto kill

Post by Tektro » 27 Sep 2012, 18:19

nestraadaa ka man likt vinju pareizi

User avatar
Unknowns
Censoņa
Censoņa
Posts: 364
Joined: 03 Jul 2012, 12:40

Re: Auto kill

Post by Unknowns » 27 Sep 2012, 18:21

ka tev tur var nestradat ?
Image

User avatar
Tektro
Jauniņais
Jauniņais
Posts: 34
Joined: 23 Sep 2012, 12:40

Re: Auto kill

Post by Tektro » 27 Sep 2012, 18:24

krch skriptaa viss iet bet kad ieiet baazee ar citu niku nekas nenotiek

User avatar
[NF]Magnifico
Censoņa
Censoņa
Posts: 245
Joined: 09 Oct 2011, 02:17
Location: Cēsis
Contact:

Re: Auto kill

Post by [NF]Magnifico » 27 Sep 2012, 18:53

[NWA]Unknowns wrote:Savējais |:)
EDIT: ķer , tiko paņēmu piemēru no bāzes savas

Code: Select all

public OnPlayerConnect(playerid)
{
	
	SetTimer("eStrike_AK_Timer", 1, true);
	return 1;

}
forward eStrike_AK_Timer(playerid);
public eStrike_AK_Timer(playerid)
{
if (IsPlayerInAreaEx(playerid,-74.913414, -394.928070, 13.086585, -266.928070))
{
	new Nick[MAX_PLAYER_NAME];
   	GetPlayerName(playerid, Nick, sizeof(Nick));
   	if(strfind(Nick, "(niks)", true) != -1 || strfind(Nick, "(klans)", true) != -1)
    {
	SetPlayerHealth(playerid,100);
    }
}
else
{
SetPlayerHealth(playerid,1.0);
}
}
bet ka gribi lai viens iejiet -

Code: Select all

public OnPlayerUpdate(playerid)
{
    new Nick[MAX_PLAYER_NAME];
        GetPlayerName(playerid, Nick, sizeof(Nick));
    if(IsPlayerInArea(playerid, 2516.385009, 2472.937011, 2402.251708, 2351.189453))
    {
                if(strfind(Nick, "(niks)", true) != -1)
                {
                    return 1;
                }
                else
                {
                        SetPlayerHealth(playerid, 0);
                }
        }
        return 1;
}
 
stock IsPlayerInArea(playerid, Float:max_x, Float:min_x, Float:max_y, Float:min_y)
{
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
        if(X = min_x && Y = min_y) return 1;
        return 0;
}
}
:)
Unknown, jums visi skripti lejupielādēti no SA-MP foruma? Vai arī kaut ko pats arī izveidot no 0 protiet?

User avatar
Unknowns
Censoņa
Censoņa
Posts: 364
Joined: 03 Jul 2012, 12:40

Re: Auto kill

Post by Unknowns » 27 Sep 2012, 18:53

tur kur ir playerid, (kordinates ieliec) !!! (IsPlayerInAreaEx(playerid,-74.913414, -394.928070, 13.086585, -266.928070))

2 panemu no samp foruma
Image

User avatar
Tektro
Jauniņais
Jauniņais
Posts: 34
Joined: 23 Sep 2012, 12:40

Re: Auto kill

Post by Tektro » 27 Sep 2012, 18:56

saakumaa jau ieliku

User avatar
[NF]Magnifico
Censoņa
Censoņa
Posts: 245
Joined: 09 Oct 2011, 02:17
Location: Cēsis
Contact:

Re: Auto kill

Post by [NF]Magnifico » 27 Sep 2012, 18:59

Code: Select all

public OnPlayerUpdate(playerid)
    {
    new Nick[MAX_PLAYER_NAME];
    GetPlayerName(playerid, Nick, sizeof(Nick));
    if(IsPlayerInArea(playerid, 2516.385009, 2472.937011, 2402.251708, 2351.189453))
         {
         if(!strfind(Nick, "(niks)", true) != -1)
              {
               SetPlayerHealth(playerid, 0);
               }
        }
return 1;
}
 
stock IsPlayerInArea(playerid, Float:max_x, Float:min_x, Float:max_y, Float:min_y)
{
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
        if(X = min_x && Y = min_y) return 1;
        return 0;
}
}
Pārveidoju šo Unknowna skriptu ar mazāk rindiņām, vienkārši uzliekot 0hp tam kuram nav šāds niks. Neko vairāk tur nevajag.

User avatar
Unknowns
Censoņa
Censoņa
Posts: 364
Joined: 03 Jul 2012, 12:40

Re: Auto kill

Post by Unknowns » 27 Sep 2012, 20:37

da viņš tikai copy pesto mūsu darbus :D
Image

User avatar
[NF]Magnifico
Censoņa
Censoņa
Posts: 245
Joined: 09 Oct 2011, 02:17
Location: Cēsis
Contact:

Re: Auto kill

Post by [NF]Magnifico » 28 Sep 2012, 07:19

Tektro, teikšu vienu. Vai nu sāc mācīties skriptot, vai arī met malā skriptošanu.
Neviens tev nedos tik daudz skriptus, lai tu varētu izveidot serveri, tas būs Tev pašam jāizveido, nevis kādam no mums.
Tas tāds padoms no manas puses.

User avatar
Tektro
Jauniņais
Jauniņais
Posts: 34
Joined: 23 Sep 2012, 12:40

Re: Auto kill

Post by Tektro » 28 Sep 2012, 13:25

A kaa lai maacaas es jau maacos no jusu dotajiem skriptiem
un es jau palenaam saaku kaut ko maaceet

User avatar
hits
Jauniņais
Jauniņais
Posts: 27
Joined: 17 Nov 2012, 12:26

Re: Auto kill

Post by hits » 26 Jan 2013, 11:10

kas jaliek To ciparu vietaa? if (IsPlayerInAreaEx(playerid,-74.913414, -394.928070, 13.086585, -266.928070))
Image

Post Reply