kā uztaisīt Autokill?
Moderator: Moderatori
kā uztaisīt Autokill?
Kā uztaisīt autokill bāzei,lai nomirtu tie,kas ienāk bāzē,tikai ne bāzes īpašnieks(i)



- [AoD]Aleksis
- Nelabojams spameris
- Posts: 3891
- Joined: 25 May 2008, 14:05
- Location: Tepat.
Re: kā uztaisīt Autokill?
Code: Select all
new ClanZone;
forward AdminArea(playerid);
forward DoesPlayerHasTag(playerid,tag[]);
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Clan Area by Snipe");
print("--------------------------------------\n");
ClanZone = GangZoneCreate(-768.4227,822.0857,-583.2678,989.1851); // Put here your Clan Zone Coords
SetTimer("AdminArea", 1000, 1);
SetTimer("DoesPlayerHasTag", 500, 1);
return 1;
}
public OnPlayerConnect(playerid)
{
GangZoneShowForAll(ClanZone,COLOR_RED);// Replace Red with the color you want,Remember you can only use one of the colors defined
//------------------------------------------------------------------------------
public AdminArea(playerid)
{
new i, Float:X, Float:Y, Float:Z;
for (i = 0; i = -768.4227 && X = 822.0857 && Y = 0.0000 && Z <= 30.0000) //REPLACE XMIN,XMAX,YMIN,YMAX,ZMIN,ZMAX by your coordinates
{
if(!DoesPlayerHasTag(playerid,"[XTC]")) //Replace This by Your Clan Tag
{
SetPlayerHealth(playerid,0);
}
}
}
}
//------------------------------------------------------------------------------
public DoesPlayerHasTag(playerid,tag[]) {
new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name));
return (strfind(name,tag,true) != -1) ? 1 : 0;
}
//------------------------------------------------------------------------------

Re: kā uztaisīt Autokill?
un kā var uzlikt lai bāzē tiktu tikai divi spēlētāji?



- [NWA]Dumper
- Bembists
- Posts: 4322
- Joined: 20 Apr 2008, 22:30
- Location: Best country in the world
Re: kā uztaisīt Autokill?
Vainu tiem abiem spēlētājiem jāspēlē ar kaut kādu klan tag, vai arī cik es sapratu...
[XTC] vietā ieliec spēlētāja niku.
if(!DoesPlayerHasTag(playerid,"[XTC]")) //Replace This by Your Clan Tag
{
[XTC] vietā ieliec spēlētāja niku.

Re: kā uztaisīt Autokill?
Es izdarīju tā:
Un compile bez erroriem un warningiem.
Varat lock!
Code: Select all
if(!DoesPlayerHasTag(playerid,"[XTC]"))
if(!DoesPlayerHasTag(playerid,"[XTC1]"))
Varat lock!



- [AoD]Aleksis
- Nelabojams spameris
- Posts: 3891
- Joined: 25 May 2008, 14:05
- Location: Tepat.
Re: kā uztaisīt Autokill?
vispār jau
Code: Select all
if(!(DoesPlayerHasTag(playerid,"[XTC]") || DoesPlayerHasTag(playerid,"[XTC2]")))
