3 Questions (urgent help needed) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: 3 Questions (urgent help needed) (
/showthread.php?tid=643355)
3 Questions (urgent help needed) -
Xessive - 18.10.2017
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:
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);
Picture:
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.
Re: 3 Questions (urgent help needed) -
Kraeror - 18.10.2017
1 Aswer: Check
https://sampwiki.blast.hk/wiki/SetPlayerFacingAngle
2 Aswer: You can use if(classid == 0) it is for first class. To appear a text You can use this function:
https://sampwiki.blast.hk/wiki/GameTextForPlayer
EDITED: 3 Aswer: You can use OnPlayerRequestClass for setting the variable to the class, that You selected and OnPlayerSpawn can checks if the variable is something like 0 (class) it sets Your position!
Re: 3 Questions (urgent help needed) -
DonaldDuck - 18.10.2017
use this for better easy and fast
https://sampforum.blast.hk/showthread.php?tid=140360