how to do this help :) -
[MKD]Max - 02.07.2011
hello all i want to make any GangZone for army i need to make like when someone who dont have an army skin get killed what mean the player get kill when he enter army zone with out have an army skin
Re: how to do this help :) -
Sascha - 02.07.2011
follow this tutorial
https://sampwiki.blast.hk/wiki/Areacheck
Re: how to do this help :) -
jameskmonger - 02.07.2011
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(GetPlayerSkin(playerid) == ARMYSKIN) {
//do whatever here
}
}
Re: how to do this help :) -
[MKD]Max - 02.07.2011
ok i folow this tut now here is my zone croods
armyzone = GangZoneCreate(914.946960, 2570.812500, 1106.947021, 2730.812500);
how i can put them in here need help
if (X <= -3915 && X >= -3694 && Y <= 401 && Y >= 37)
Re: how to do this help :) -
jameskmonger - 02.07.2011
pawn Код:
if (X <= -914 && X >= 2570 && Y <= 1106 && Y >= 2730)
Should work
Re: how to do this help :) -
[MKD]Max - 02.07.2011
i put in first
forward IsPlayerInArmyZone()
but dont put the SetTimer("IsPlayerInArmyZone",1000,1);
Код:
public isPlayerInArmyZone()
{
new Float:X, Float:Y, Float:Z; //We use this to store player position
for(new i=0; i < MAX_PLAYERS; i++) //This line defines a name for all player, the name is "i"
{
if(gTeam[i] != TEAM_ARMY)
{
GetPlayerPos(i, X, Y, Z);
if (X <= -914 && X >= 2570 && Y <= 1106 && Y >= 2730)
SetPlayerPos(i, X+10,Y+10,Z);
return 1;
}
}
return 1;
}
Re: how to do this help :) -
jameskmonger - 02.07.2011
try this:
pawn Код:
public isPlayerInArmyZone()
{
new Float:X, Float:Y, Float:Z; //We use this to store player position
for(new i=0; i < MAX_PLAYERS; i++) //This line defines a name for all player, the name is "i"
{
if(gTeam[i] != TEAM_ARMY)
{
GetPlayerPos(i, X, Y, Z);
if (X <= -914 && X >= 2570 && Y <= 1106 && Y >= 2730)
{
SetPlayerPos(i, 2760,1106,Z);
}
return 1;
}
}
return 1;
}
Re: how to do this help :) -
[MKD]Max - 02.07.2011
i do like this and
forward isPlayerInArmyZone();
and
SetTimer("isPlayerInArmyZone",1000,1);
Код:
public isPlayerInArmyZone()
{
new Float:X, Float:Y, Float:Z; //We use this to store player position
for(new i=0; i < MAX_PLAYERS; i++) //This line defines a name for all player, the name is "i"
{
if(gTeam[i] != TEAM_ARMY)
{
GetPlayerPos(i, X, Y, Z);
if (X <= -914 && X >= 2570 && Y <= 1106 && Y >= 2730)
{
SetPlayerPos(i, 2760,1106,Z);
}
return 1; '
}
}
return 1;
}
But Still Not Work Help Me
Re: how to do this help :) -
jameskmonger - 02.07.2011
Where do you set the timer?
AW: Re: how to do this help :) -
xerox8521 - 02.07.2011
Quote:
Originally Posted by jameskmonger
try this:
pawn Код:
public isPlayerInArmyZone() { new Float:X, Float:Y, Float:Z; //We use this to store player position for(new i=0; i < MAX_PLAYERS; i++) //This line defines a name for all player, the name is "i" { if(gTeam[i] != TEAM_ARMY) { GetPlayerPos(i, X, Y, Z); if (X <= -914 && X >= 2570 && Y <= 1106 && Y >= 2730) { SetPlayerHealth(i,0); SendClientMessage(i,0xFF0000AA,"Your are not allowed to be in this area"); } } } return 1; }
|
You see the change above in the script
Edit: did you forward the public ?