Onplayerspawn setinterior error :(
#1

pawn Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerInterior(playerid, 18);
    SetPlayerPos(playerid, 1726.18, -1641.00, 20.23);
}
this is in the script when player spawn he is spawning in the Pos but not in the interior

i want players should spawn in the Atrium Interior

can anybody help me please ?? ??
Thanks in advance
Reply
#2

Try this!
Код:
public OnPlayerSpawn(playerid)
{
     SetPlayerInterior(playerid, 18);
     SetPlayerPos(playerid, 1726.18, -1641.00, 20.23);
     return 1;
}
Working?
Reply
#3

ShivRp you didn't even edit anything...
pawn Код:
public OnPlayerSpawn(playerid)
{
SetPlayerInterior(playerid, 18);
SetPlayerPos(playerid, 1710.433715,-1669.379272,20.225049);//check this:http://weedarr.wikidot.com/interior
}
Reply
#4

Quote:
Originally Posted by ShivRp
Посмотреть сообщение
Try this!
Код:
public OnPlayerSpawn(playerid)
{
     SetPlayerInterior(playerid, 18);
     SetPlayerPos(playerid, 1726.18, -1641.00, 20.23);
}
Working?
Nope
Reply
#5

Quote:
Originally Posted by Eth
Посмотреть сообщение
ShivRp you didn't even edit anything...
pawn Код:
public OnPlayerSpawn(playerid)
{
SetPlayerInterior(playerid, 18);
SetPlayerPos(playerid, 1710.433715,-1669.379272,20.225049);//check this:http://weedarr.wikidot.com/interior
}
already tried this and it didnt work.
so i used coordinates from samp wiki.



Sorry for double Post
Reply
#6

Can you sow us your whole thing under onplayerspawn, because some ither tele variable may event affect this.
Reply
#7

onplayerconnect:
SetPlayerInterior to 18
then onplayerspawn set his position to :1710.433715,-1669.379272,20.225049
or onplayerrequestspawn setplayerinterior to 18
and on player spawn set his position to anything you want.
Reply
#8

Quote:

playerspawn set his position to :1710.433715,-1669.379272,20.225049
or onplayerrequestspawn setplayerinterior to 18
and on player spawn set his position to anything you want.

In cmd

Код:
Public OnPlayerConnect(playerid)
{
     SetPlayerInterior(playerid, 18);
}
And now spawning with that interior.

Код:
public OnPlayerSpawn(playerid)
{
     SetPlayerPos(playerid, 1726.18, -1641.00, 20.23);
     return 1;
}
Working?
Reply
#9

pawn Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerInterior(playerid, 18);
    if(IsPlayerNPC(playerid)) return 1;
    SetPlayerInterior(playerid,0);
    TogglePlayerClock(playerid,1);
    SetPlayerPos(playerid, 1726.18, -1641.00, 20.23);

    if(Dead[playerid] == 1 && DmID[playerid] == 1)
    {
        SetPlayerInterior(playerid, 1);
        SetPlayerPos(playerid, 1412.639892, -1.787510, 1000.924377);
        SetPlayerVirtualWorld(playerid, 1);
        Dead[playerid] = 0;
    }
    else if(Dead[playerid] == 1 && DmID[playerid] == 2)
    {
        SetPlayerInterior(playerid, 10);
        SetPlayerPos(playerid, -975.975708,1060.983032,1345.671875);
        SetPlayerVirtualWorld(playerid, 1);
        Dead[playerid] = 0;
    }
    else if(Dead[playerid] == 1 && DmID[playerid] == 3)
    {
        SetPlayerInterior(playerid, 3);
        SetPlayerPos(playerid, 288.745971, 169.350997, 1007.171875);
        SetPlayerVirtualWorld(playerid, 1);
        Dead[playerid] = 0;
    }
    else if(Dead[playerid] == 1 && DmID[playerid] == 4)
    {
        SetPlayerInterior(playerid, 3);
        SetPlayerPos(playerid, -2640.762939, 1406.682006, 906.460937);
        SetPlayerVirtualWorld(playerid, 1);
        Dead[playerid] = 0;
    }
    return 1;
}
this is the whole thing in onplayerspawn
Reply
#10

Remove this line:
pawn Код:
SetPlayerInterior(playerid,0);
If you want the whole code fixed:
pawn Код:
public OnPlayerSpawn(playerid)
{
    if(IsPlayerNPC(playerid)) return 1;
    TogglePlayerClock(playerid,1);
    SetPlayerInterior(playerid, 18);
    SetPlayerPos(playerid, 1726.18, -1641.00, 20.23);

    if(Dead[playerid] == 1 && DmID[playerid] == 1)
    {
        SetPlayerInterior(playerid, 1);
        SetPlayerPos(playerid, 1412.639892, -1.787510, 1000.924377);
        SetPlayerVirtualWorld(playerid, 1);
        Dead[playerid] = 0;
    }
    else if(Dead[playerid] == 1 && DmID[playerid] == 2)
    {
        SetPlayerInterior(playerid, 10);
        SetPlayerPos(playerid, -975.975708,1060.983032,1345.671875);
        SetPlayerVirtualWorld(playerid, 1);
        Dead[playerid] = 0;
    }
    else if(Dead[playerid] == 1 && DmID[playerid] == 3)
    {
        SetPlayerInterior(playerid, 3);
        SetPlayerPos(playerid, 288.745971, 169.350997, 1007.171875);
        SetPlayerVirtualWorld(playerid, 1);
        Dead[playerid] = 0;
    }
    else if(Dead[playerid] == 1 && DmID[playerid] == 4)
    {
        SetPlayerInterior(playerid, 3);
        SetPlayerPos(playerid, -2640.762939, 1406.682006, 906.460937);
        SetPlayerVirtualWorld(playerid, 1);
        Dead[playerid] = 0;
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)