Multiple classes in OnPlayerRequestClass
#1

How do I place multiple classes in the OnPlayerRequestClass function?

For example, I want to make CJ spawn in front of his house and Ryder in front of his house.
Reply
#2

PHP код:
switch(classid)
{
      case 
0SetPlayerPos(playeridxyz); //the first skin if cj set in cj house if ryder in ryder's house
      
case 1SetPlayerPos(playeridxyz); //the second skin if cj set in cj house if ryder in ryder's house
      
case default: SetPlayerPos(playeridxyz); //if neither set other pos

Reply
#3

Thank you! I knew that I needed a switch but didn't know how to write one.
Reply
#4

The default case is causing me a problem. I can't compile, I get error 029: invalid expression, assumed zero.
Reply
#5

ohh my bad

PHP код:
case default: SetPlayerPos(playeridxyz); //if neither set other pos 
to

PHP код:
default: SetPlayerPos(playeridxyz); //if neither set other pos 
Reply
#6

Remove the 'case' keyword from that line.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)