SA-MP Forums Archive
How To Solve This Problem - 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: How To Solve This Problem (/showthread.php?tid=277635)



How To Solve This Problem - shaikh007 - 18.08.2011





I have below code on player spawn and request class

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerInterior(playerid,14);
    SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
    SetPlayerFacingAngle(playerid, 270.0);
    SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
    SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
    SetPlayerVirtualWorld(playerid, 0);
    return 1;
}


public OnPlayerConnect(playerid)
{
    TextDrawShowForPlayer(playerid,servername);
    TextDrawShowForPlayer(playerid,servernamea);
    BuridgeConnect(playerid);
    return 1;
}



Re: How To Solve This Problem - [MWR]Blood - 18.08.2011

You must set the interior to 0 on the OnPlayerSpawn callback.


Re: How To Solve This Problem - Jefff - 18.08.2011

Show OnPlayerSpawn, You must put SetPlayerInterior(playerid,0); in that public


Re: How To Solve This Problem - shaikh007 - 18.08.2011

pawn Код:
public OnPlayerSpawn(playerid)
{
if(FirstSpawnOfPlayer[playerid] == 0)
{
PayDayTimer = SetTimerEx("PlusPayDayZeit",150000,1,"i",playerid);
FirstSpawnOfPlayer[playerid] = 1;
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid, 0);
}
return 1;
}
here is on player spawn code


Re: How To Solve This Problem - [MWR]Blood - 18.08.2011

Shouldn't it be

pawn Код:
public OnPlayerSpawn(playerid)
{
if(FirstSpawnOfPlayer[playerid] == 1)
{
PayDayTimer = SetTimerEx("PlusPayDayZeit",150000,1,"i",playerid);
FirstSpawnOfPlayer[playerid] = 0;
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid, 0);
}
return 1;
}



Re: How To Solve This Problem - Jefff - 18.08.2011

pawn Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid,0);
    if(FirstSpawnOfPlayer[playerid] == 0)
    {
        PayDayTimer = SetTimerEx("PlusPayDayZeit",150000,1,"i",playerid);
        FirstSpawnOfPlayer[playerid] = 1;
    }
    return 1;
}



Re: How To Solve This Problem - shaikh007 - 18.08.2011

Quote:
Originally Posted by Delux13
Посмотреть сообщение
Shouldn't it be

pawn Код:
public OnPlayerSpawn(playerid)
{
if(FirstSpawnOfPlayer[playerid] == 1)
{
PayDayTimer = SetTimerEx("PlusPayDayZeit",150000,1,"i",playerid);
FirstSpawnOfPlayer[playerid] = 0;
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid, 0);
}
return 1;
}
Ok i m testing it. I think it should be perfect. but lets see


Re: How To Solve This Problem - shaikh007 - 18.08.2011

Quote:
Originally Posted by Delux13
Посмотреть сообщение
Shouldn't it be

pawn Код:
public OnPlayerSpawn(playerid)
{
if(FirstSpawnOfPlayer[playerid] == 1)
{
PayDayTimer = SetTimerEx("PlusPayDayZeit",150000,1,"i",playerid);
FirstSpawnOfPlayer[playerid] = 0;
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid, 0);
}
return 1;
}
problem still persist now trying Jefff Code


Re: How To Solve This Problem - shaikh007 - 18.08.2011

Quote:
Originally Posted by Jefff
Посмотреть сообщение
pawn Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid,0);
    if(FirstSpawnOfPlayer[playerid] == 0)
    {
        PayDayTimer = SetTimerEx("PlusPayDayZeit",150000,1,"i",playerid);
        FirstSpawnOfPlayer[playerid] = 1;
    }
    return 1;
}
Thanks Jefff it worked +rep