Objects in class selection
#1

Hi people!

I have little problem. I am using Streamer Plugin and I made few objects in my server for the class selection. The problem is, when player connect and get to the class selection, there is no objects ... Is there any way to spawn obejcts before class selection or something?
Reply
#2

Go to:
pawn Код:
OnPlayerRequestClass
And there add your created objects
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    CreateObject(playerid,x,y,z);
return 1;
Reply
#3

Quote:
Originally Posted by BigM
Go to:
pawn Код:
OnPlayerRequestClass
And there add your created objects
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    CreateObject(playerid,x,y,z);
return 1;
That's bugged code (modelid) and also creating an object each time he requests a class isn't a good idea for many reasons dude, you will end up with a ton of objects for one.

pawn Код:
public OnGameModeInit()
{
  // all init code
  // create code here, native CreateObject( model, x, y, z, ..................
  return 1;
}
Better to just create one global object for everyone to see in the native format and not a streamed one as you have no x,y,z axes data before you are spawned onto the map so the streamer can't possibly stream one for you due to how they work (distance to x,y,z then create or destroy).
Reply
#4

Код:
new Object1;
new Object2;
//etc..

public OnPlayerRequestClass(playerid, classid)
{
  Object1 = CreatePlayerObject(playerid, modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ)
  Object2 = CreatePlayerObject(playerid, modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ);
  //etc..
  return 1;
}

public OnPlayerSpawn(playerid)
{
  DestroyPlayerObject(playerid, Object1);
  DestroyPlayerObject(playerid, Object2);
  //etc..
  return 1;
}
Reply
#5

Thanks for the help guys, but as I said I am using Streamer Plugin with CreateDynamicObject stuff... With CreateObject is working but I must do this with Streamer. Any help?
Reply
#6

Tried and not work... :/ Sorry
Reply
#7

Quote:
Originally Posted by MummyKillerSLO
Tried and not work... :/ Sorry
PM me your Onplyaerclassrequest script and maybe i can help.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)