/enter /exit help me to create it!
#1

how i can make /enter on every yellow down arrow except house..
then when to exit building /exit.. please show me how..
Reply
#2

No need of making a enter and exit command.You just go and stand in the yellow arrow then you will be automatically enter the shop or whatever..
Reply
#3

no.. i want with command.. i don't like just like that..
please did you know how ?
Reply
#4

Like this you can script
pawn Код:
if(strcmp(cmd, "/enter", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(IsPlayerInRangeOfPoint(playerid,2.0, X,Y,Z)) // change X Y Z coords
            {
                SetPlayerPos(playerid, X, Y, Z); // change X Y Z coords
                SetPlayerInterior(playerid,INTERIOR HERe); //change the interior.
            }
            else
            {
                SendClientMessage(playerid, 0x33CCFFAA, "You need to be near the door to use this feature!");
            }
        }
        return 1;
    }
if(strcmp(cmd, "/exit", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(IsPlayerInRangeOfPoint(playerid,2.0, X,Y,Z))  // change X Y Z coords
            {
                SetPlayerPos(playerid, X, Y, Z); // change X Y Z coords
            }
            else
            {
                SendClientMessage(playerid, 0x33CCFFAA, "You need to be near the door to use this feature!");
            }
        }
        return 1;
    }
If you have any doubt in this? Just ask.
Reply
#5

Quote:
Originally Posted by Ironboy
Посмотреть сообщение
Like this you can script
pawn Код:
if(strcmp(cmd, "/enter", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(IsPlayerInRangeOfPoint(playerid,2.0, X,Y,Z)) // change X Y Z coords
            {
                SetPlayerPos(playerid, X, Y, Z); // change X Y Z coords
                SetPlayerInterior(playerid,INTERIOR HERe); //change the interior.
            }
            else
            {
                SendClientMessage(playerid, 0x33CCFFAA, "You need to be near the door to use this feature!");
            }
        }
        return 1;
    }
if(strcmp(cmd, "/exit", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(IsPlayerInRangeOfPoint(playerid,2.0, X,Y,Z))  // change X Y Z coords
            {
                SetPlayerPos(playerid, X, Y, Z); // change X Y Z coords
            }
            else
            {
                SendClientMessage(playerid, 0x33CCFFAA, "You need to be near the door to use this feature!");
            }
        }
        return 1;
    }
If you have any doubt in this? Just ask.
Having lots of entries, and exits would make both of those commands really long. There are many other methods.
Reply
#6

Yes there is a lots of methods too.And you teach him 1 method.........
Reply
#7

where i put the script ongamemodeinit / onplayercomandtext ?
Reply
#8

Quote:
Originally Posted by leingod
Посмотреть сообщение
where i put the script ongamemodeinit / onplayercomandtext ?
Put it under:

Код:
public OnPlayerCommandText(playerid, cmdtext[])
Reply
#9

well after i do what all you guys said.. then i compile this and have any errors..
please help
Код:
C:\Users\AS4732Z\Desktop\MY SAMP Server\bizantium server\filterscripts\enternexit.pwn(27) : error 017: undefined symbol "cmd"
C:\Users\AS4732Z\Desktop\MY SAMP Server\bizantium server\filterscripts\enternexit.pwn(43) : warning 209: function "OnPlayerCommandText" should return a value
C:\Users\AS4732Z\Desktop\MY SAMP Server\bizantium server\filterscripts\enternexit.pwn(43) : error 010: invalid function or declaration
C:\Users\AS4732Z\Desktop\MY SAMP Server\bizantium server\filterscripts\enternexit.pwn(45) : error 010: invalid function or declaration
C:\Users\AS4732Z\Desktop\MY SAMP Server\bizantium server\filterscripts\enternexit.pwn(47) : error 010: invalid function or declaration
C:\Users\AS4732Z\Desktop\MY SAMP Server\bizantium server\filterscripts\enternexit.pwn(51) : error 010: invalid function or declaration
C:\Users\AS4732Z\Desktop\MY SAMP Server\bizantium server\filterscripts\enternexit.pwn(56) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
what must i do ?
Reply
#10

Show us your code. Without it, we can't help.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)