Amunation interiours
#1

Hi, on my server we do not allow guns, how can i block all the amunation interiours wirthout blocking all interiours or by putting objects there, how do i do this
Thanks
Cameron
Reply
#2

With PlayerToPoint function and a timer
Reply
#3

Please could you show me how to do that?
thanks
Reply
#4

Set a main timer (OnGameModeInit)
with 1000 milliseconds.

On the timer you need to check if a player is near X,Y,Z coords (If() statement with PlayerToPoint
If the player is near the place you defined. He gets teleported to another place
Reply
#5

pawn Код:
if(PlayerToPoint(10.0,i,checkpoint cords) == 1)
{
    // Do whatever
    SendClientMessage(i,COLOUR_YELLOW,"Closed");
}
Do that in a timer like MenaceX said, and just change the cords

WeeDarr
Reply
#6

Quote:
Originally Posted by WeeDarr
pawn Код:
if(PlayerToPoint(10.0,i,checkpoint cords) == 1)
{
    // Do whatever
    SendClientMessage(i,COLOUR_YELLOW,"Closed");
}
Do that in a timer like MenaceX said, and just change the cords

WeeDarr
Thnaks, is it possabe to add multiple places in that?
Reply
#7

Quote:
Originally Posted by CAMERON_BANFIELD
Quote:
Originally Posted by WeeDarr
pawn Код:
if(PlayerToPoint(10.0,i,checkpoint cords) == 1)
{
    // Do whatever
    SendClientMessage(i,COLOUR_YELLOW,"Closed");
}
Do that in a timer like MenaceX said, and just change the cords

WeeDarr
Thnaks, is it possabe to add multiple places in that?
else if(PlayerToPoint
Reply
#8

pawn Код:
if(PlayerToPoint(10.0,i,checkpoint cords) == 1)
{
    // Do whatever
    SendClientMessage(i,COLOUR_YELLOW,"Closed");
}
else if(PlayerToPoint(10.0,i,checkpoint cords) == 1)
{
    // Do whatever
    SendClientMessage(i,COLOUR_YELLOW,"Closed");
}
Etc. btw you will need to search for the playertopoint function

WeeDarr
Reply
#9

thanks !!!
Reply
#10

Quote:
Originally Posted by WeeDarr
pawn Код:
if(PlayerToPoint(10.0,i,checkpoint cords) == 1)
{
    // Do whatever
    SendClientMessage(i,COLOUR_YELLOW,"Closed");
}
else if(PlayerToPoint(10.0,i,checkpoint cords) == 1)
{
    // Do whatever
    SendClientMessage(i,COLOUR_YELLOW,"Closed");
}
Etc. btw you will need to search for the playertopoint function

WeeDarr
I use PlayerToPoint without that == 1. Why do you use that?

pawn Код:
stock PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
   if(IsPlayerConnected(playerid))
    {
        new Float:oldposx, Float:oldposy, Float:oldposz;
        new Float:tempposx, Float:tempposy, Float:tempposz;
        GetPlayerPos(playerid, oldposx, oldposy, oldposz);
        tempposx = (oldposx -x);
        tempposy = (oldposy -y);
        tempposz = (oldposz -z);
        if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
        {
            return 1;
        }
    }
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)