onPlayerRequestClass Problem - 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: onPlayerRequestClass Problem (
/showthread.php?tid=582272)
onPlayerRequestClass Problem -
SpikY_ - 19.07.2015
Hellu,
I have a problem with onplayerrequestclass, I don't know why these fegs lookin at there. whats funny there they are looking for?
See the picture attached below.
CODES:
Код:
public OnPlayerRequestClass(playerid, classid)
{
if(classid == 0)
{
gTeam[playerid] = TEAM_ATTACKERS;
TextDrawShowForPlayer(playerid, Textdraw4);
TextDrawShowForPlayer(playerid, Textdraw5);
TextDrawShowForPlayer(playerid, Textdraw6);
TextDrawShowForPlayer(playerid, Textdraw7);
TextDrawShowForPlayer(playerid, Textdraw8);
TextDrawHideForPlayer(playerid, Textdraw9);
TextDrawHideForPlayer(playerid, Textdraw10);
TextDrawHideForPlayer(playerid, Textdraw11);
TextDrawHideForPlayer(playerid, Textdraw12);
TextDrawHideForPlayer(playerid, Textdraw13);
SetPlayerPos(playerid,-845.4263,2748.9109,45.8516);
SetPlayerCameraPos(playerid, -845.4009,2742.9888,45.8045);
SetPlayerCameraLookAt(playerid, -845.4263,2748.9109,45.8516);
}
else if(classid == 1)
{
gTeam[playerid] = TEAM_DEFENDERS;
TextDrawShowForPlayer(playerid, Textdraw9);
TextDrawShowForPlayer(playerid, Textdraw10);
TextDrawShowForPlayer(playerid, Textdraw11);
TextDrawShowForPlayer(playerid, Textdraw12);
TextDrawShowForPlayer(playerid, Textdraw13);
TextDrawHideForPlayer(playerid, Textdraw4);
TextDrawHideForPlayer(playerid, Textdraw5);
TextDrawHideForPlayer(playerid, Textdraw6);
TextDrawHideForPlayer(playerid, Textdraw7);
TextDrawHideForPlayer(playerid, Textdraw8);
SetPlayerPos(playerid,383.7657,2601.5701,16.4844);
SetPlayerCameraPos(playerid, 384.9688,2596.7393,16.4844);
SetPlayerCameraLookAt(playerid, 383.7657,2601.5701,16.4844);
}
return 1;
}
onGamemodeInIt
Код:
public OnGameModeInit()
{
SetGameModeText("Grand Theft Heli 2");
UsePlayerPedAnims();
// Teams Spawn
AddPlayerClass(122,-845.4263,2748.9109,45.8516,181.1951,0,0,0,0,0,0);
AddPlayerClass(287,383.7657,2601.5701,16.4844,193.8924,0,0,0,0,0,0);
return 1;
}
AW: onPlayerRequestClass Problem -
BigBrainAFK - 19.07.2015
Use
https://sampwiki.blast.hk/wiki/SetPlayerFacingAngle
Re: onPlayerRequestClass Problem -
SpikY_ - 19.07.2015
I just forgot this. anyways thanks fixed! +rep