17/09/2022 23:04
Boa noite.. eu estou usando o sistema que fiz para ter o spawn quando escolhe o traje porém na favela 2 que no caso ali é o case 3 ele não puxa a posição e sim a posição da primeira favela o case 2 porque isso acontece?
codigo:
codigo:
Código PHP:
case 1:
{
switch(PlayerInfo[playerid][mudandoskin])
{
case 0..264:SendClientMessage(playerid,Vermelho,"[ ERRO ] Escolhe um uniforme valido!");
case 265..267, 280..288, 300..302, 306, 307, 309..311:
{
SendClientMessage(playerid,COR_ZP,"[ ZP ] {FFFFFF}Voce escolheu o uniforme de ID:{1E90FF}%d{FFFFFF}!",PlayerInfo[playerid][mudandoskin]);
TogglePlayerControllable(playerid,1);
TextDrawShowForPlayer(playerid,TEXTZP[0]);
TextDrawShowForPlayer(playerid,TEXTZP[1]);
DeletePVar(playerid,"EscolhendoSkinPM");
SetPVarInt(playerid,"UniformePM",1);
CancelSelectTextDraw(playerid);
SalvandoConta(playerid);
for(new gt = 0; gt < 3; gt++)TextDrawHideForPlayer(playerid,TEXTLOGIN[gt]);
for(new i = 0; i < 3; i++)PlayerTextDrawHide(playerid,ESCOLHALOGIN[playerid][i]);
SpawnPlayer(playerid);
SetPlayerSkin(playerid,PlayerInfo[playerid][mudandoskin]);
SetPlayerPos(playerid,253.6823,79.3733,1003.6406);
SetPlayerFacingAngle(playerid,197.3632);
SetPlayerInterior(playerid,6);
SetPlayerVirtualWorld(playerid,1);
}
}
}
case 2:
{
switch(PlayerInfo[playerid][mudandoskin])
{
case 0..27,31..45,49..92,94..101,126..189,194..311:SendClientMessage(playerid,Vermelho,"[ ERRO ] Escolhe um traje valido!");
case 28..30, 46..48,93,102..125,190..193:
{
SendClientMessage(playerid,Vermelho,"[ ZP ] {FFFFFF}Voce escolheu o traje de ID:{FF0000}%d{FFFFFF}!",PlayerInfo[playerid][mudandoskin]);
TogglePlayerControllable(playerid,1);
TextDrawShowForPlayer(playerid,TEXTZP[0]);
TextDrawShowForPlayer(playerid,TEXTZP[1]);
DeletePVar(playerid,"EscolhendoSkinPM");
SetPVarInt(playerid,"TrajeMF",1);
CancelSelectTextDraw(playerid);
SalvandoConta(playerid);
for(new gt = 0; gt < 3; gt++)TextDrawHideForPlayer(playerid,TEXTLOGIN[gt]);
for(new i = 0; i < 3; i++)PlayerTextDrawHide(playerid,ESCOLHALOGIN[playerid][i]);
SpawnPlayer(playerid);
SetPlayerSkin(playerid,PlayerInfo[playerid][mudandoskin]);
SetPlayerPos(playerid,2580.0957,-968.2602,81.3625);
SetPlayerFacingAngle(playerid,54.2779);
SetPlayerVirtualWorld(playerid,1);
}
}
}
case 3:
{
switch(PlayerInfo[playerid][mudandoskin])
{
case 0..27,31..45,49..92,94..101,126..189,194..311:SendClientMessage(playerid,Vermelho,"[ ERRO ] Escolhe um traje valido!");
case 28..30, 46..48,93,102..125,190..193:
{
SendClientMessage(playerid,Vermelho,"[ ZP ] {FFFFFF}Voce escolheu o traje de ID:{FF0000}%d{FFFFFF}!",PlayerInfo[playerid][mudandoskin]);
TogglePlayerControllable(playerid,1);
TextDrawShowForPlayer(playerid,TEXTZP[0]);
TextDrawShowForPlayer(playerid,TEXTZP[1]);
DeletePVar(playerid,"EscolhendoSkinPM");
SetPVarInt(playerid,"TrajeMF",1);
CancelSelectTextDraw(playerid);
SalvandoConta(playerid);
for(new gt = 0; gt < 3; gt++)TextDrawHideForPlayer(playerid,TEXTLOGIN[gt]);
for(new i = 0; i < 3; i++)PlayerTextDrawHide(playerid,ESCOLHALOGIN[playerid][i]);
SpawnPlayer(playerid);
SetPlayerSkin(playerid,PlayerInfo[playerid][mudandoskin]);
SetPlayerPos(playerid,1173.9382,-2053.4451,69.0078);
SetPlayerFacingAngle(playerid,182.4926);
SetPlayerVirtualWorld(playerid,1);
}
}
}