Gate problems & local chat
#1

Why when I activate / use some of my gates they rotate away instead of just going up and down or side to side?


Also how do I make a local /me action such as *Name Opens the door as he passes through*
Reply
#2

For moving gate see this tutorial -->https://sampforum.blast.hk/showthread.php?tid=278463

For the /me command see this --> https://sampforum.blast.hk/showthread.php?tid=301905
Reply
#3

I know how to make a gate but when ever i use them they go all wrong, They have worked before. Also i dont want
to create a /me its when they go through a door so it will send a message as they do /enter
Reply
#4

pawn Код:
if (strcmp("/enter", cmdtext, true) == 0)
{
    if(IsPlayerInRangeOfPoint(playerid,5,-2237.7329,2353.8467,4.9794))
    {
        new str[50], name[MAX_PLAYER_NAME]; //Creates a string and name
        GetPlayerName(playerid, name, sizeof(name)); //Get's the players name storing it in the name variable
        for(new pID; pID <= MAX_PLAYERS; pID++) //Creates a loop, creates a new var, checks if the var is below MAX_PLAYERS, then increments if need be
        {
            if(IsPlayerInRangeOfPoint(pID, radius,x, y, z)) //checks if any other players are in range
            {
                format(str,sizeof(str), "%s has opened some gate.", name); //Formats the string so we can ready it for sending
                SendClientMessage(pID, 0xFFFFFFAA, str); //Sends the string to all players in range
            }
        }
        SetPlayerPos(playerid,246.8081,107.7202,1003.2188);
        SetPlayerInterior(playerid,10);
        SetPlayerVirtualWorld(playerid,5);
    }
    return 1;
}
Reply
#5

oh well the guyabove ^ replied before me so i removed this..
Reply
#6

so how would i turn that into this
pawn Код:
if (strcmp("/enter", cmdtext, true) == 0)
    {
  if(IsPlayerInRangeOfPoint(playerid,5,-2237.7329,2353.8467,4.9794))
        {
        SetPlayerPos(playerid,246.8081,107.7202,1003.2188);
        SetPlayerInterior(playerid,10);
        SetPlayerVirtualWorld(playerid,5);
        }
    return 1;
    }
Reply
#7

I edited my original post showing how
Reply
#8

Ok thanks, Im getting error 017: undefined symbol "x"
Reply
#9

You need to input the X,Y,Z and R values yourself...X,Y,Z is the location, R is Radius...like you did with the other IsPlayerInRangeOfPoint
Reply
#10

Ah im stupid thanks for your help
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)