Problem
#1

Why it works only first ?

The code :
Код:
if(IsPlayerInArea(killerid,1091.817, 2707.167, 1513.54, 2858.022))
    {
    SendClientMessage(killerid, COLOR_GREY, "   You have been kicked by Server, reason DM in SAFEZONE !");
    Kick(killerid);
    }
    else if(IsPlayerInArea(killerid,1098.173, -2116.114, 1356.766, -1958.204))
    {
    SendClientMessage(killerid, COLOR_GREY, "   You have been kicked by Server, reason DM in SAFEZONE !");
    Kick(killerid);
    }
    else if(IsPlayerInArea(killerid,1310.488, 664.8284, 1548.684, 827.2872))
    {
    SendClientMessage(killerid, COLOR_GREY, "   You have been kicked by Server, reason DM in SAFEZONE !");
    Kick(killerid);
    }
    else if(IsPlayerInArea(killerid,1695.218, -1883.197, 1813.106, -1816.085))
    {
    SendClientMessage(killerid, COLOR_GREY, "   You have been kicked by Server, reason DM in SAFEZONE !");
    Kick(killerid);
    }
    else if(IsPlayerInArea(killerid,1436.625, -1764.764, 1550.711, -1587.116))
    {
    SendClientMessage(killerid, COLOR_GREY, "   You have been kicked by Server, reason DM in SAFEZONE !");
    Kick(killerid);
    }
    else if(IsPlayerInArea(killerid,679.8611, -1591.064, 820.566, -1421.311))
    {
    SendClientMessage(killerid, COLOR_GREY, "   You have been kicked by Server, reason DM in SAFEZONE !");
    Kick(killerid);
    }
    else if(IsPlayerInArea(killerid,2505.372, 2223.659, 2642.041, 2440.271))
    {
    SendClientMessage(killerid, COLOR_GREY, "   You have been kicked by Server, reason DM in SAFEZONE !");
    Kick(killerid);
    }
    else if(IsPlayerInArea(killerid,2611.702, -1144.969, 2828.463, -1054.171))
    {
    SendClientMessage(killerid, COLOR_GREY, "   You have been kicked by Server, reason DM in SAFEZONE !");
    Kick(killerid);
    }
When I said first,i said about frist IsPlayerInArea condition.

Thanks for help!
Reply
#2

No one knows ? Is very important !!!
Reply
#3

Where are you using this? - OnPlayerDeath i noticed it now.

edit://
Check this:

pawn Код:
if(IsPlayerInArea(killerid, 1091.817, 2707.167, 1513.54, 2858.022)
|| IsPlayerInArea(killerid, 1098.173, -2116.114, 1356.766, -1958.204)
|| IsPlayerInArea(killerid, 1310.488, 664.8284, 1548.684, 827.2872)
|| IsPlayerInArea(killerid, 1695.218, -1883.197, 1813.106, -1816.085)
|| IsPlayerInArea(killerid, 1436.625, -1764.764, 1550.711, -1587.116)
|| IsPlayerInArea(killerid, 679.8611, -1591.064, 820.566, -1421.311)
|| IsPlayerInArea(killerid, 2505.372, 2223.659, 2642.041, 2440.271)
|| IsPlayerInArea(killerid, 2611.702, -1144.969, 2828.463, -1054.171))
{
    SendClientMessage(killerid, COLOR_GREY, "You have been kicked by Server, reason DM in SAFEZONE!");
    Kick(killerid);
}
Reply
#4

you're saying only the first one works? try removing the else if and add if(.....

it would be like this


pawn Код:
if(IsPlayerInArea(killerid,1091.817, 2707.167, 1513.54, 2858.022))
{
    SendClientMessage(killerid, COLOR_GREY, "   You have been kicked by Server, reason DM in SAFEZONE !");
    Kick(killerid);
}


if(IsPlayerInArea(killerid,1098.173, -2116.114, 1356.766, -1958.204))
{
    SendClientMessage(killerid, COLOR_GREY, "   You have been kicked by Server, reason DM in SAFEZONE !");
    Kick(killerid);
}


if(IsPlayerInArea(killerid,1310.488, 664.8284, 1548.684, 827.2872))
{
    SendClientMessage(killerid, COLOR_GREY, "   You have been kicked by Server, reason DM in SAFEZONE !");
    Kick(killerid);
}


if(IsPlayerInArea(killerid,1695.218, -1883.197, 1813.106, -1816.085))
{
    SendClientMessage(killerid, COLOR_GREY, "   You have been kicked by Server, reason DM in SAFEZONE !");
    Kick(killerid);
}


if(IsPlayerInArea(killerid,1436.625, -1764.764, 1550.711, -1587.116))
{
    SendClientMessage(killerid, COLOR_GREY, "   You have been kicked by Server, reason DM in SAFEZONE !");
    Kick(killerid);
}


if(IsPlayerInArea(killerid,679.8611, -1591.064, 820.566, -1421.311))
{
    SendClientMessage(killerid, COLOR_GREY, "   You have been kicked by Server, reason DM in SAFEZONE !");
    Kick(killerid);
}


if(IsPlayerInArea(killerid,2505.372, 2223.659, 2642.041, 2440.271))
{
    SendClientMessage(killerid, COLOR_GREY, "   You have been kicked by Server, reason DM in SAFEZONE !");
    Kick(killerid);
}


if(IsPlayerInArea(killerid,2611.702, -1144.969, 2828.463, -1054.171))
{
    SendClientMessage(killerid, COLOR_GREY, "   You have been kicked by Server, reason DM in SAFEZONE !");
    Kick(killerid);
}
Reply
#5

Quote:
Originally Posted by Riddick94
Посмотреть сообщение
Where are you using this? - OnPlayerDeath i noticed it now.

edit://
Check this:

pawn Код:
if(IsPlayerInArea(killerid, 1091.817, 2707.167, 1513.54, 2858.022)
|| IsPlayerInArea(killerid, 1098.173, -2116.114, 1356.766, -1958.204)
|| IsPlayerInArea(killerid, 1310.488, 664.8284, 1548.684, 827.2872)
|| IsPlayerInArea(killerid, 1695.218, -1883.197, 1813.106, -1816.085)
|| IsPlayerInArea(killerid, 1436.625, -1764.764, 1550.711, -1587.116)
|| IsPlayerInArea(killerid, 679.8611, -1591.064, 820.566, -1421.311)
|| IsPlayerInArea(killerid, 2505.372, 2223.659, 2642.041, 2440.271)
|| IsPlayerInArea(killerid, 2611.702, -1144.969, 2828.463, -1054.171))
{
    SendClientMessage(killerid, COLOR_GREY, "You have been kicked by Server, reason DM in SAFEZONE!");
    Kick(killerid);
}
Yea,i used it at onplayerdeath I will try your code and i will give you a reply if works or not Thanks

Kitten,Thank you for reply,but it doesn,t work like that...Only frist condition...


I will try the code tommorow,now it's late and my friends are offline...

Have a nice day and thanks
Reply
#6

use playerid because a person can stand in the zone and be killed by a person outside the zone without the person getting kicked so switch the killerid to playerid or maybe both if you dont want any killing near the safezone.
Reply
#7

By the way try to use Incognito streamer. I'm using this and it works great and fast
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)