Skin Selection Help - 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: Skin Selection Help (
/showthread.php?tid=444247)
Skin Selection Help -
JoshP - 15.06.2013
I'm making a skin selection for a RP server, though this time i've ran into a problem. I've got 3 skins for 1 team and im wanting to create another three for another. Though when i changed the camera angle for the 1st skin of the next team all the other cams changed too, any idea why?
Код:
Code:
if(classid == 0) GameTextForPlayer(playerid,"~b~nice team",2000,5);
{
SetPlayerPos(playerid,1268.7476,-900.2996,42.8828);
SetPlayerCameraPos(playerid,1268.6455,-904.1758,42.8828);
SetPlayerFacingAngle(playerid,187.4978);
SetPlayerCameraLookAt(playerid,1268.7476,-900.2996,42.882);
}
if(classid == 1) GameTextForPlayer(playerid,"~b~nice team",2000,5);
{
SetPlayerPos(playerid,1268.7476,-900.2996,42.8828);
SetPlayerCameraPos(playerid,1268.6455,-904.1758,42.8828);
SetPlayerFacingAngle(playerid,187.4978);
SetPlayerCameraLookAt(playerid,1268.7476,-900.2996,42.882);
}
if(classid == 2) GameTextForPlayer(playerid,"~b~nice team",2000,5);
{
SetPlayerPos(playerid,1268.7476,-900.2996,42.8828);
SetPlayerCameraPos(playerid,1268.6455,-904.1758,42.8828);
SetPlayerFacingAngle(playerid,187.4978);
SetPlayerCameraLookAt(playerid,1268.7476,-900.2996,42.882);
}
if(classid == 3) GameTextForPlayer(playerid,"~r~blab team",2000,5);
{
SetPlayerPos(playerid,1862.1805,-1603.5808,13.5391);
SetPlayerCameraPos(playerid,1864.1364,-1601.8025,13.5439);
SetPlayerFacingAngle(playerid,184.3764);
SetPlayerCameraLookAt(playerid,1862.1805,-1603.5808,13.5391);
Re: Skin Selection Help -
Sandiel - 15.06.2013
Make sure you have a variable that specifies the player that is in the skin selection.
Example: on top of your script you'd make a new variable: SkinSelecting[MAX_PLAYERS];
And you'd assign it once the player registers and moves on to the skin selection (SkinSelecting[playerid = 1)
And disable it once they're done (SkinSelecting[playerid = 0)
And then:
pawn Код:
if(classid == 0 && SkinSelecting[playerid == 1)
{
GameTextForPlayer(playerid,"~b~nice team",2000,5);
SetPlayerPos(playerid,1268.7476,-900.2996,42.8828);
SetPlayerCameraPos(playerid,1268.6455,-904.1758,42.8828);
SetPlayerFacingAngle(playerid,187.4978);
SetPlayerCameraLookAt(playerid,1268.7476,-900.2996,42.882);
}
Hope this helps.
Re: Skin Selection Help -
JoshP - 15.06.2013
hmm ok dont think thats the problem tbh