SA-MP Forums Archive
Why it isn't working?!?!?! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Why it isn't working?!?!?! (/showthread.php?tid=241314)



Why it isn't working?!?!?! - Rivera - 17.03.2011

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...


Re: Why it isn't working?!?!?! - Medal Of Honor team - 17.03.2011

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

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



Re: Why it isn't working?!?!?! - ricardo178 - 17.03.2011

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


Re: Why it isn't working?!?!?! - Kwarde - 17.03.2011

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


Re: Why it isn't working?!?!?! - ricardo178 - 17.03.2011

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


Re: Why it isn't working?!?!?! - Kwarde - 17.03.2011

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


Re: Why it isn't working?!?!?! - Rivera - 18.03.2011

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


Re: Why it isn't working?!?!?! - Kwarde - 18.03.2011

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


Re: Why it isn't working?!?!?! - Rivera - 18.03.2011

lol it showed me 123123123123 errors!


Re: Why it isn't working?!?!?! - Kwarde - 18.03.2011

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