OnPlayerSpawn
#1

I got an custom location mapped it's loaded OnGameInit(); but when i set my camera pose location the objects won't appear while class selection but as i press spawn the objects are here ? but how to do it.
Reply
#2

Depends. How far is the camera from the objects? Are you using a streamer? Is your player located within range of the objects? Do you have a sufficient streamdistance/drawdistance for your objects?
Reply
#3

ah thanks for telling btw how can i change drawdistance for all objects ? The camers would be like 5-10 meters away and i edited the draw distance and stream distance in streamer.inc becasue i have lot of objects like 400+ and it would take too long to do it 1 by 1
Reply
#4

Код:
CreateObject(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance)
For CreateObject, the last parameter represents drawdistance.

The same applies for a streamer, with CreateDynamicObject.
Код:
CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 200.0, Float:drawdistance = 0.0);
Reply
#5

is ur class selection skin inside sum interior? + m not sure i THINK that world id is different for class selection...then that of normal gameplay...look m not sure tho.
Reply
#6

i am using deafults for everything and i change the default draw distance to 200 and stream distance to 300 still no use
Reply
#7

So you are using a streamer?

If so, try using this:
pawn Код:
Streamer_Update(playerid);
Normally, a streamer updates when a player moves. Seeing as you're not moving during class selection, you will probably have to update the streamer manually for the objects to show.
Reply
#8

No use i added it OnPlayerRequestClass
Reply
#9

Update_StreamerEx under onplayerrequestclass...elseway m confirmed that virtual world is changed during class selection...use virtual world as -1 its gonna work.
Reply
#10

http://orig09.deviantart.net/a945/f/...ke-d8kmru2.png and same..
pawn Код:
new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid,x,y,z);
    Streamer_UpdateEx(playerid,x,y,z);
    SetPlayerPos(playerid,-1743.8019,994.2507,28.6739);
    SetPlayerFacingAngle(playerid,92.5084);
    GameTextForPlayer(playerid,"~Y~Gold Finder",3000,3);
    SetPlayerCameraPos(playerid, -1747.021362,994.213073,29.353200);
    SetPlayerCameraLookAt(playerid, -1747.021362,994.213073,29.353200);
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)