[Ajuda] /sexchange
#1

Oi eu gostava de saber quando o player faz o comando /sexchange 1 ele altera-se para uma skin de homem e /sexchange 2 altera-se para skin de mulher

pawn Код:
CMD:sexchange(playerid, params[])
{
    new string[128], sex;
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(sscanf(params, "i", sex)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /sexchange [1-Male / 2-Female]");
    if(!IsPlayerInRangeOfPoint(playerid, 2, 361.8299,173.3985,1008.3828)) return SendClientMessage(playerid, COLOR_GREY, "You are not at the cityhall.");
    if(sex < 1 || sex > 2)
    if(sex == 1) format(string, sizeof(string), "Male");
    else if(sex == 2) format(string, sizeof(string), "Female");
    SetPlayerSkin(playerid, 26);
    PlayerInfo[playerid][pModel] = 26;
    GiveDodMoney(playerid, PlayerInfo[playerid][pLevel] * -700);
    sex = PlayerInfo[playerid][pGender];
    format(string, sizeof(string), "You've changed your Gender to %s, and you've charged %d for it", string, PlayerInfo[playerid][pLevel] * -700);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    return 1;
}
Reply
#2

pawn Код:
CMD:sexchange(playerid, params[])
{
    new string[128], sex;
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(sscanf(params, "i", sex)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /sexchange [1-Male / 2-Female]");
    if(!IsPlayerInRangeOfPoint(playerid, 2, 361.8299,173.3985,1008.3828)) return SendClientMessage(playerid, COLOR_GREY, "You are not at the cityhall.");
    if(sex < 1 || sex > 2)
    if(sex == 1) format(string, sizeof(string), "Male"), SetPlayerSkin ( playerid , SKINMACHO );
    else if(sex == 2) format(string, sizeof(string), "Female"), SetPlayerSkin ( playerid , SKINFEMEA );
    PlayerInfo[playerid][pModel] = 26;
    GiveDodMoney(playerid, PlayerInfo[playerid][pLevel] * -700);
    sex = PlayerInfo[playerid][pGender];
    format(string, sizeof(string), "You've changed your Gender to %s, and you've charged %d for it", string, PlayerInfo[playerid][pLevel] * -700);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    return 1;
}
Reply
#3

Nгo mudou de skin :S
Reply
#4

pawn Код:
CMD:sexchange(playerid, params[])
{
    new string[128], sex;
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(sscanf(params, "i", sex)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /sexchange [1-Male / 2-Female]");
    if(!IsPlayerInRangeOfPoint(playerid, 2, 361.8299,173.3985,1008.3828)) return SendClientMessage(playerid, COLOR_GREY, "You are not at the cityhall.");
    if(sex < 1 || sex > 2) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /sexchange [1-Male / 2-Female]");
    if(sex == 1) format(string, sizeof(string), "Male"), SetPlayerSkin(playerid, 26), PlayerInfo[playerid][pModel] = 26;
    else if(sex == 2) format(string, sizeof(string), "Female"), SetPlayerSkin(playerid, 56), PlayerInfo[playerid][pModel] = 56;
    GiveDodMoney(playerid, PlayerInfo[playerid][pLevel] * -700);
    PlayerInfo[playerid][pGender] = sex;
    format(string, sizeof(string), "You've changed your Gender to %s, and you've charged %d for it", string, PlayerInfo[playerid][pLevel] * -700);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    return 1;
}
Penso que assim deverб dar! se tiver algum erro posta ai que irei corrigir!
Reply
#5

obrigado +1
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)