onplayerrequestclass .... :S
#1

okay, so can you change the camera position whilst in request class?

such as if skinid = 2

it changes the camera position ect
Reply
#2

yes you can

pawn Код:
SetPlayerCameraLookAt(playerid, Float:x, Float:y, Float:z)
Reply
#3

What do you mean? Something like this?
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    if(classid == 1)
    {
          //SetPlayerPos
         //SetPlayerCameraPos
        //SetPlayerCameraLookAt    
    }
    return 1;
}
you could also use a switch
Reply
#4

you're making it on every classid you should do it like that:

public OnPlayerRequestClass(playerid, classid)
{
switch(classid)
{
case 1:
{
//SetPlayerPos
//SetPlayerCameraPos
//SetPlayerCameraLookAt
}
case 2:
{
//SetPlayerPos
//SetPlayerCameraPos
//SetPlayerCameraLookAt
}
}
return 1;
}
Reply
#5

Quote:
Originally Posted by i514x_
Посмотреть сообщение
you're making it on every classid you should do it like that:

public OnPlayerRequestClass(playerid, classid)
{
switch(classid)
{
case 1:
{
//SetPlayerPos
//SetPlayerCameraPos
//SetPlayerCameraLookAt
}
case 2:
{
//SetPlayerPos
//SetPlayerCameraPos
//SetPlayerCameraLookAt
}
}
return 1;
}
yeah thanks, but i got multiple skins i wish to use with one camera position, would i do something like

new skin[10]; < 10 skins in 1 position

but i dont know how to put that into a switch in one
Reply
#6

Just do like
pawn Код:
//Blah
case 1,2,3,4,5,6:
{
    //SetCamera Stuff
}
case 7,8,9,25,68,66,150:
{
   //Insert cat food here!
}
Reply
#7

Quote:
Originally Posted by Fj0rtizFredde
Посмотреть сообщение
Just do like
pawn Код:
case 1,2,3,4,5,6:
{
    //SetCamera Stuff
}
or

pawn Код:
case 1..6: {}
Reply
#8

Quote:
Originally Posted by Fj0rtizFredde
Посмотреть сообщение
Just do like
pawn Код:
//Blah
case 1,2,3,4,5,6:
{
    //SetCamera Stuff
}
case 7,8,9,25,68,66,150:
{
   //Insert cat food here!
}
Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
or

pawn Код:
case 1..6: {}

thank you both
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)