Why it isn't working?!?!?!
#1

I have set up my admin house and some objects around it. There is the script:

pawn Код:
CreateObject(3483, -2338.1276855469, -1622.5887451172, 489.96249389648, 0.999755859375, 0, 0); // the house
CreateObject(971, -2339.6259765625, -1639.7559814453, 486.27304077148, 0, 0, 0); // gate1
CreateObject(971, -2330.6284179688, -1639.7492675781, 486.27304077148, 0, 0, 0); // gate2
CreateObject(14510, -2340.3935546875, -1620.63671875, 486.93395996094, 0, 0, 0); // random interiror
These are my objects. Now, I set up a /enter cmd:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/enter", true) == 0)
    {
        if(PlayerInfo[playerid][AdminLevel] < 3)
        {
            if(IsPlayerInRangeOfPoint(playerid, 2.0, -2324.1108,-1625.5382,483.7064))
            {
                SetPlayerPos(playerid, -2340.3935546875, -1620.63671875, 486.93395996094);
                SetPlayerVirtualWorld(playerid, 999);
            }
        }
        return 1;
}
When I go near the house and I type /enter I don't get inside the house :@ WTF?

some pics:




lol...
Reply
#2

what is your admin level?
&
Is your co-ordinates are correct

Код:
if(IsPlayerInRangeOfPoint(playerid, 2.0, -2324.1108,-1625.5382,483.7064))
Reply
#3

And you sure you want be in virtual world 999 ? Mybe you could see the house interior id and set interior and not VW....
Reply
#4

Guys...
pawn Код:
if(PlayerInfo[playerid][AdminLevel] < 3)
        {
So it will only work if it's below 3.
I think you means:
pawn Код:
if(PlayerInfo[playerid][AdminLevel] >= 3)
        {
Or just > 3
Reply
#5

Oh yeah xD But i think the VW stuff is bad too!
Reply
#6

Why? Virtual world can be good... 999 is a valid virtual world.
Look:
pawn Код:
Script Property    Max Limit

Virtual Worlds    2,147,483,647
As you can see, that 999 was actually VERY low
Reply
#7

Quote:

what is your admin level?
&
Is your co-ordinates are correct[/QOUTE]

My admin level is > than 1337 (9999 srv owner) and I don't know why it isn't working lol...

[QOUTE]So it will only work if it's below 3.
I think you means:
pawn Code:

pawn Код:
if(PlayerInfo[playerid][AdminLevel] >= 3)
        {
^^ tried... no shit

Can you give me some other coordinates, but keep the CreateObjects
Reply
#8

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/enter", true))
    {
        if(PlayerInfo[playerid][pAdminLevel] >= 3)
        {
            if(IsPlayerInRangeOfPoint(playerid, 2.0, -2324.1108,-1625.5382,483.7064))
            {
                SetPlayerPos(playerid, -2340.3935546875, -1620.63671875, 486.93395996094);
                SetPlayerVirtualWorld(playerid, 999);
                SendClientMessage(playerid, 0x00FF00AA, "[DEBUG] Successfull");
            }
            else return SendClientMessage(playerid, 0xFF0000AA, "[DEBUG] Error: Not in range");
        }
        else return SendClientMessage(playerid, 0xFF0000AA, "[DEBUG] Not the right admin level");
        return 1;
    }
    return 1;
}
Try that. It won't work, but tell me what for amessage you get when you typ /enter
Reply
#9

lol it showed me 123123123123 errors!
Reply
#10

It would be very usefull if you post the errors....
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)