if(GetPVarInt(playerid, "camara") == 0)
{
InterpolateCameraPos(playerid, 837.702331, -1809.893798, 23.584636, 829.948120, -2030.598632, 13.588906, 5000);
InterpolateCameraLookAt(playerid, 837.552001, -1814.885864, 23.823146, 829.743469, -2035.582275, 13.936600, 5000);
SetPVarInt(playerid, "camara", 1);
}
if(GetPVarInt(playerid, "camara") == 0)
{
InterpolateCameraPos(playerid, 837.702331, -1809.893798, 23.584636, 829.948120, -2030.598632, 13.588906, 5000);
InterpolateCameraLookAt(playerid, 837.552001, -1814.885864, 23.823146, 829.743469, -2035.582275, 13.936600, 5000);
SetPVarInt(playerid, "camara", 1);
}
SetPlayerPos(playerid, "Cordenadas de la posicion donde estara el skin");
necesitas agregar la posicion original del spawn de tu servidor
PHP код:
|
public SetupPlayerForClassSelection(playerid)
{
SetPlayerPos(playerid,829.44, -2037.53, 12.87);
SetPlayerFacingAngle(playerid,360.3343);
SetPlayerInterior(playerid,0);
SetPlayerTime(playerid,2,0);
//
TextDrawShowForPlayer(playerid,Sprite0);
TextDrawShowForPlayer(playerid,Sprite1);
TextDrawShowForPlayer(playerid,Sprite2);
TextDrawShowForPlayer(playerid,Sprite3);
TextDrawHideForPlayer(playerid, Hoja);
TextDrawHideForPlayer(playerid, ASD);
TextDrawHideForAll(Sprite4);
//
if(GetPVarInt(playerid, "camara") == 0)
{
InterpolateCameraPos(playerid, 837.702331, -1809.893798, 23.584636, 829.948120, -2030.598632, 13.588906, 5000);
InterpolateCameraLookAt(playerid, 837.552001, -1814.885864, 23.823146, 829.743469, -2035.582275, 13.936600, 5000);
SetPVarInt(playerid, "camara", 1);
}
}
public SetupPlayerForClassSelection(playerid)
{
if(GetPVarInt(playerid, "camara") == 0)
{
InterpolateCameraPos(playerid, 837.702331, -1809.893798, 23.584636, 829.948120, -2030.598632, 13.588906, 5000);
InterpolateCameraLookAt(playerid, 837.552001, -1814.885864, 23.823146, 829.743469, -2035.582275, 13.936600, 5000);
SetPVarInt(playerid, "camara", 1);
}
SetPlayerPos(playerid,829.44, -2037.53, 12.87);
SetPlayerFacingAngle(playerid,360.3343);
SetPlayerInterior(playerid,0);
SetPlayerTime(playerid,2,0);
//
TextDrawShowForPlayer(playerid,Sprite0);
TextDrawShowForPlayer(playerid,Sprite1);
TextDrawShowForPlayer(playerid,Sprite2);
TextDrawShowForPlayer(playerid,Sprite3);
TextDrawHideForPlayer(playerid, Hoja);
TextDrawHideForPlayer(playerid, ASD);
TextDrawHideForAll(Sprite4);
//
}
PHP код:
|
Purbealo asi & revisa si no tienes algun otro callback como este: public OnPlayerRequestClass
|
public OnPlayerRequestClass(playerid, classid)
{
iSpawnSet[playerid] = 0;
SetupPlayerForClassSelection(playerid);
SetPlayerAttachedObject( playerid, 0, 19270, 1, 0.456246, 0.024526, 0.000000, 356.979461, 89.247146, 4.475475, 1.000000, 1.000000, 1.000000 ); // MapMarkerFire1 - hombre fuego
SetPlayerAttachedObject( playerid, 1, 19270, 1, 0.176541, 0.051910, -0.001506, 23.633422, 90.000000, 197.080627, 1.000000, 1.000000, 1.000000 ); // MapMarkerFire1 - hombre fuegi
SetPlayerAttachedObject( playerid, 2, 19270, 1, -0.308661, 0.051910, -0.001506, 23.633422, 90.000000, 197.080627, 1.000000, 1.000000, 1.000000 ); // MapMarkerFire1 - hombre fuegi
SetPlayerAttachedObject( playerid, 3, 19270, 1, -0.729163, 0.051910, -0.001506, 23.633422, 90.000000, 197.080627, 1.000000, 1.000000, 1.000000 ); // MapMarkerFire1 - hombre fuegi
SetPlayerAttachedObject( playerid, 4, 35, 1, -0.065999, -0.134999, 0.000000, 0.000000, 34.799995, 0.000000, 1.000000, 1.000000, 1.000000);
PlayerPlaySound(playerid, 1053, 0.0, 0.0, 0.0);
new Animaciones=random(11);
if (Animaciones==0) {ApplyAnimation(playerid,"DANCING","bd_clap", 2.0, 1, 1, 0, 0, 0);}
else if (Animaciones==1) {ApplyAnimation(playerid,"DANCING","bd_clap1", 2.0, 1, 1, 0, 0, 0);}
else if (Animaciones==2) {ApplyAnimation(playerid,"DANCING","dance_loop", 2.0, 1, 1, 0, 0, 0);}
else if (Animaciones==3) {ApplyAnimation(playerid,"DANCING","DAN_Down_A", 2.0, 1, 1, 0, 0, 0);}
else if (Animaciones==4) {ApplyAnimation(playerid,"DANCING","DAN_Left_A",2.0,1,1,1,1,1);}
else if (Animaciones==5) {ApplyAnimation(playerid,"DANCING","DAN_Loop_A",2.0,1,1,1,1,1);}
else if (Animaciones==6) {ApplyAnimation(playerid,"DANCING", "DAN_Right_A", 2.0, 1, 0, 0, 0, 0);}
else if (Animaciones==7) {ApplyAnimation(playerid,"DANCING", "DAN_Right_A", 2.0, 1, 0, 0, 0,0);}
else if (Animaciones==8) {ApplyAnimation(playerid,"DANCING", "dnce_M_b", 2.0, 1, 1, 0, 1,500);}
else if (Animaciones==9) {ApplyAnimation(playerid,"DANCING", "dnce_M_c", 2.0, 1, 1, 1, 0, 4000);}
else if (Animaciones==10){ApplyAnimation(playerid,"DANCING", "dnce_M_e", 2.0, 1, 1, 0, 0, 0);}
return 1;
}