Код:
if(strcmp(cmd, "/ropa", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMember] >= 1)
{
if(IsAtClothShop(playerid))
{
if(PlayerInfo[playerid][pMember] == 1) { ChosenSkin[playerid] = 280; SetPlayerSkin(playerid, 280); }
else if(PlayerInfo[playerid][pMember] == 2) { ChosenSkin[playerid] = 286; SetPlayerSkin(playerid, 286); }
else if(PlayerInfo[playerid][pMember] == 3) { ChosenSkin[playerid] = 287; SetPlayerSkin(playerid, 287); }
else if(PlayerInfo[playerid][pMember] == 4) { ChosenSkin[playerid] = 70; SetPlayerSkin(playerid, 70); }
else if(PlayerInfo[playerid][pMember] == 5) { ChosenSkin[playerid] = 117; SetPlayerSkin(playerid, 117); }
else if(PlayerInfo[playerid][pMember] == 6) { ChosenSkin[playerid] = 111; SetPlayerSkin(playerid, 111); }
else if(PlayerInfo[playerid][pMember] == 8) { ChosenSkin[playerid] = 249; SetPlayerSkin(playerid, 249); }
else if(PlayerInfo[playerid][pMember] == 9) { ChosenSkin[playerid] = 148; SetPlayerSkin(playerid, 148); }
else if(PlayerInfo[playerid][pMember] == 10) { ChosenSkin[playerid] = 255; SetPlayerSkin(playerid, 255); }
else if(PlayerInfo[playerid][pMember] == 11) { ChosenSkin[playerid] = 59; SetPlayerSkin(playerid, 59); }
else if(PlayerInfo[playerid][pMember] == 12) { ChosenSkin[playerid] = 240; SetPlayerSkin(playerid, 240); }
else if(PlayerInfo[playerid][pMember] == 14) { ChosenSkin[playerid] = 117; SetPlayerSkin(playerid, 117); }
else if(PlayerInfo[playerid][pMember] == 15) { ChosenSkin[playerid] = 107; SetPlayerSkin(playerid, 107); }
else if(PlayerInfo[playerid][pMember] == 16) { ChosenSkin[playerid] = 48; SetPlayerSkin(playerid, 48); }
else if(PlayerInfo[playerid][pMember] == 17) { ChosenSkin[playerid] = 110; SetPlayerSkin(playerid, 110); }
else if(PlayerInfo[playerid][pMember] == 18) { ChosenSkin[playerid] = 102; SetPlayerSkin(playerid, 102); }
else if(PlayerInfo[playerid][pMember] == 19) { ChosenSkin[playerid] = 206; SetPlayerSkin(playerid, 206); }
else if(PlayerInfo[playerid][pMember] == 22) { ChosenSkin[playerid] = 240; SetPlayerSkin(playerid, 240); }
else if(PlayerInfo[playerid][pMember] == 23) { ChosenSkin[playerid] = 241; SetPlayerSkin(playerid, 241); }
else { return 1; }
GetPlayerPos(playerid, ChangePos[playerid][0],ChangePos[playerid][1],ChangePos[playerid][2]);
ChangePos2[playerid][0] = GetPlayerInterior(playerid);
ChangePos2[playerid][1] = 1;
SetPlayerInterior(playerid,0);
//new rand = random(sizeof(gInviteSpawns));
/*
SetPlayerInterior(playerid, 18);
SetPlayerPos(playerid, 181.7410,-87.4888,1002.0234);
SetPlayerFacingAngle(playerid, 128.0);
SetPlayerCameraPos(playerid, 178.2804,-89.5319,1003.0234);
SetPlayerCameraLookAt(playerid, 181.7410,-87.4888,1002.0234);
*/
//SetPlayerPos(playerid, gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]); // Warp the player
//SetPlayerFacingAngle(playerid, gInviteSpawns[rand][3]);
//SetPlayerCameraPos(playerid,gInviteSpawns[rand][0] + 3, gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
//SetPlayerCameraLookAt(playerid,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
TogglePlayerControllable(playerid, 0);
SelectChar[playerid] = 255;
SelectCharID[playerid] = PlayerInfo[playerid][pMember];
SelectCharPlace[playerid] = 1;
PlayerInfo[playerid][pModel] = ChosenSkin[playerid];
PlayerInfo[playerid][pChar] = ChosenSkin[playerid];
SendClientMessage(playerid, COLOR_LIGHTRED, "* Usa 'siguiente' Para combiar de ropa.");
SendClientMessage(playerid, COLOR_LIGHTRED, "* Cuando tengas la ropa que te guste escribe 'hecho'.");
SetPlayerFacingAngle(playerid,270);
SetPlayerPos(playerid,258.1813,-41.5929,1002.0234);
SetPlayerInterior(playerid,14);
SetPlayerCameraPos(playerid,255.7253,-39.9420,1002.0234);
SetPlayerCameraLookAt(playerid,258.1813,-41.5929,1002.0234);
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, " No estas en una tienda de Ropas !");
return 1;
}
}
else
{
if(PlayerInfo[playerid][pLeader] != 0)
{
SendClientMessage(playerid, COLOR_GRAD2, " No puedes cambiarte de ropa mientras sera lнder !");
return 1;
}
if(IsAtClothShop(playerid))
{
if(PlayerInfo[playerid][pSex] == 1) { ChosenSkin[playerid] = 2; SetPlayerSkin(playerid, 2); PlayerInfo[playerid][pChar] = 2; }
else if(PlayerInfo[playerid][pSex] == 2) { ChosenSkin[playerid] = 55; SetPlayerSkin(playerid, 55); PlayerInfo[playerid][pChar] = 55; }
else { return 1; }
GetPlayerPos(playerid, ChangePos[playerid][0],ChangePos[playerid][1],ChangePos[playerid][2]);
ChangePos2[playerid][0] = GetPlayerInterior(playerid);
ChangePos2[playerid][1] = 1;
SetPlayerInterior(playerid,0);
new rand = random(sizeof(gInviteSpawns));
SetPlayerPos(playerid, gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, gInviteSpawns[rand][3]);
SetPlayerCameraPos(playerid,gInviteSpawns[rand][0] + 3, gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
SetPlayerCameraLookAt(playerid,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
TogglePlayerControllable(playerid, 0);
SelectChar[playerid] = 255;
if(PlayerInfo[playerid][pSex] == 1) { SelectCharID[playerid] = 20; }
else if(PlayerInfo[playerid][pSex] == 2) { SelectCharID[playerid] = 30; }
else { return 1; }
SelectCharPlace[playerid] = 1;
PlayerInfo[playerid][pModel] = ChosenSkin[playerid];
PlayerInfo[playerid][pChar] = ChosenSkin[playerid];
SendClientMessage(playerid, COLOR_LIGHTRED, "* Usa 'siguiente' Para combiar de ropa.");
SendClientMessage(playerid, COLOR_LIGHTRED, "* Cuando tengas la ropa que te guste escribe 'hecho'.");
}
}
}
return 1;
}