18.10.2017, 12:22
Hello,
1) I'm trying to get my onrequestclass screen classes to look straight at the screen but the direction of their body is always looking away. Is there any body angle which I should set so they can look at the screen?
Here is my code:
Picture:
![](http://i67.tinypic.com/2i75krk.png)
2) Suppose you've added 5 classes in the gamemode, how can I, while switching the classes display a particular text on the screen?
For example, on the request class screen, it should be like this
If class = Class1
ShowGameText(playerid, ~r~"Class 1")
Else if class = Class2
ShowGameText(playerid, ~g~"Class 2")
3) How can I set a particular spawn position for a particular selected class? And where should that code come (my guess is under OnPlayerSpawn?
For example:
If class = Class1
SetPlayerPos(position1)
Else if class = Class2
SetPlayerPos(position2)
Basically what I'm asking is how to control where the player spawns if a particular class is selected from the OnPlayerRequestClass screen.
1) I'm trying to get my onrequestclass screen classes to look straight at the screen but the direction of their body is always looking away. Is there any body angle which I should set so they can look at the screen?
Here is my code:
PHP код:
SetPlayerPos(playerid, -2308.7197,-1640.9999,484.0369);
SetPlayerCameraPos(playerid, -2298.2161,-1634.1735,484.0371);
SetPlayerCameraLookAt(playerid, -2308.7197,-1640.9999,484.0369);
![](http://i67.tinypic.com/2i75krk.png)
2) Suppose you've added 5 classes in the gamemode, how can I, while switching the classes display a particular text on the screen?
For example, on the request class screen, it should be like this
If class = Class1
ShowGameText(playerid, ~r~"Class 1")
Else if class = Class2
ShowGameText(playerid, ~g~"Class 2")
3) How can I set a particular spawn position for a particular selected class? And where should that code come (my guess is under OnPlayerSpawn?
For example:
If class = Class1
SetPlayerPos(position1)
Else if class = Class2
SetPlayerPos(position2)
Basically what I'm asking is how to control where the player spawns if a particular class is selected from the OnPlayerRequestClass screen.