Jump to content
Autentificarea cu Google și Facebook nu mai este disponibilă. ×

Question

Posted

Salut.Am incercat sa pun cuiva unul dintre noile skin-uri aparute in 0.3.7 dar nu functioneaza.

5 answers to this question

Recommended Posts

  • 0
Posted (edited)

Salut.Am incercat sa pun cuiva unul dintre noile skin-uri aparute in 0.3.7 dar nu functioneaza.

 

Cum ai încercat să îi setezi skin-ul?

 

Arată-ne te rog comanda /setskin (sau cum o ai tu definită), folosește

 [//code]
Edited by Gawitkkk
  • 0
Posted (edited)

Uite comanda

CMD:setskin(playerid,params[])
{
    if(playerVariables[playerid][pAdminLevel] >= 1)
    {
        new id, string[256], giveplayer[25],skin;
        if(sscanf(params, "ui", id,skin)) return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/setskin [playerid] [skin id]");
        {
            if(id != INVALID_PLAYER_ID)
            {
                if(skin < 300 && skin >= 0)
                {
                    GetPlayerName(id, giveplayer, sizeof(giveplayer));
                    format(string, sizeof(string), "You set %s's skin to %d.", giveplayer, skin);
                    SendClientMessage(playerid, COLOR_WHITE, string);
                    playerVariables[id][pSkin] = skin;
                    SetPlayerSkin(id, skin);
                    new wakaname[25];
                    GetPlayerName(id,wakaname,25);
                    new str[128];
                    format(str,128,"UPDATE `playeraccounts` SET `playerSkin`='%d' WHERE `playerID`='%d'",skin,playerVariables[id][pInternalID]);
                    mysql_tquery(handle,str);
                }
            }
        }
    }
    else return SendClientMessage(playerid, COLOR_WHITE, AdminOnly);
    return 1;
}

 

Edited by ..::STeFaNN::..
  • 0
Posted (edited)

Uite comanda

CMD:setskin(playerid,params[])
{
    if(playerVariables[playerid][pAdminLevel] >= 1)
    {
        new id, string[256], giveplayer[25],skin;
        if(sscanf(params, "ui", id,skin)) return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/setskin [playerid] [skin id]");
        {
            if(id != INVALID_PLAYER_ID)
            {
                if(skin < 300 && skin >= 0)
                {
                    GetPlayerName(id, giveplayer, sizeof(giveplayer));
                    format(string, sizeof(string), "You set %s's skin to %d.", giveplayer, skin);
                    SendClientMessage(playerid, COLOR_WHITE, string);
                    playerVariables[id][pSkin] = skin;
                    SetPlayerSkin(id, skin);
                    new wakaname[25];
                    GetPlayerName(id,wakaname,25);
                    new str[128];
                    format(str,128,"UPDATE `playeraccounts` SET `playerSkin`='%d' WHERE `playerID`='%d'",skin,playerVariables[id][pInternalID]);
                    mysql_tquery(handle,str);
                }
            }
        }
    }
    else return SendClientMessage(playerid, COLOR_WHITE, AdminOnly);
    return 1;
}

 

Salut ! Uite, pune așa în gamemode și va merge:

 

CMD:setskin(playerid,params[])
{
    if(playerVariables[playerid][pAdminLevel] >= 1)
    {
        new id, string[256], giveplayer[25],skin;
        if(sscanf(params, "ui", id,skin)) return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/setskin [playerid] [skin id]");
        {
            if(id != INVALID_PLAYER_ID)
            {
                if(skin < 311 && skin >= 0)
                {
                    GetPlayerName(id, giveplayer, sizeof(giveplayer));
                    format(string, sizeof(string), "You set %s's skin to %d.", giveplayer, skin);
                    SendClientMessage(playerid, COLOR_WHITE, string);
                    playerVariables[id][pSkin] = skin;
                    SetPlayerSkin(id, skin);
                    new wakaname[25];
                    GetPlayerName(id,wakaname,25);
                    new str[128];
                    format(str,128,"UPDATE `playeraccounts` SET `playerSkin`='%d' WHERE `playerID`='%d'",skin,playerVariables[id][pInternalID]);
                    mysql_tquery(handle,str);
                }
            }
        }
    }
    else return SendClientMessage(playerid, COLOR_WHITE, AdminOnly);
    return 1;
}

 

Problema era de la if(skin < 311 && skin >= 0), aceasta este o protecție ce nu te lasă să pui skin-uri cu ID-uri mai mare de 300. Acum numărul maxim este 311, numărul total de skin-uri.

Edited by Gawitkkk
  • 0
  • 0
Posted (edited)

problem solved?

Am rezolvat problema....Nu fusesem atent...Multumesc Gawitkkk

Edited by ..::STeFaNN::..

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.