Jump to content

Question

Posted

Am comanda aceasta de /skin

if(!strcmp(cmdtext, "/skin", true, 5))
{
         if(PlayerInfo[playerid][pMember] >= 1 || PlayerInfo[playerid][pLeader] >= 1)
         {
                              SendClientMessage(playerid, -1, "Nu poti folosi comanda");
                             return 1;
         }
    if(!cmdtext[5])
    {
        SendClientMessage(playerid, COLOR_RED, "COST: $1000");
        return SendClientMessage(playerid, -1, "USAGE: /skin [skinid]");
    }
    new skinid = strval(cmdtext[6]);
    if(skinid < 0 || skinid > 299)
        return SendClientMessage(playerid, -1, "ERROR: Invalid skin id!");

    if(GetPlayerMoney(playerid) < 1000)
        return SendClientMessage(playerid, COLOR_RED, "ERRO: You don't have enough money to change your skin.");

    GivePlayerMoney(playerid, -1000);
    SetPlayerSkin(playerid, skinid);
    return 1;
}

Dar as vrea ca sa nu poti alege un skin de al factiunii , deci as vrea sa pun interdictie pe cateva skinuri,dar nu stiu cum

Multumesc anticipat.

2 answers to this question

Recommended Posts

Posted

Ai aici un tutorial cum sa pui parola pe un skin . +1 ?

http://www.sa-mp.ro/forum/index.php?topic=20681.0

Te-am ajutat ? Dami un +1 si suntem chit :) !

Posted

Ai aici un tutorial cum sa pui parola pe un skin . +1 ?

http://www.sa-mp.ro/forum/index.php?topic=20681.0

Nu l-ai ajutat cu nimic, mai mult l-ai incurcat.

Am comanda aceasta de /skin

if(!strcmp(cmdtext, "/skin", true, 5))
{
         if(PlayerInfo[playerid][pMember] >= 1 || PlayerInfo[playerid][pLeader] >= 1)
         {
                              SendClientMessage(playerid, -1, "Nu poti folosi comanda");
                             return 1;
         }
    if(!cmdtext[5])
    {
        SendClientMessage(playerid, COLOR_RED, "COST: $1000");
        return SendClientMessage(playerid, -1, "USAGE: /skin [skinid]");
    }
    new skinid = strval(cmdtext[6]);
    if(skinid < 0 || skinid > 299)
        return SendClientMessage(playerid, -1, "ERROR: Invalid skin id!");

    if(GetPlayerMoney(playerid) < 1000)
        return SendClientMessage(playerid, COLOR_RED, "ERRO: You don't have enough money to change your skin.");

    GivePlayerMoney(playerid, -1000);
    SetPlayerSkin(playerid, skinid);
    return 1;
}

Dar as vrea ca sa nu poti alege un skin de al factiunii , deci as vrea sa pun interdictie pe cateva skinuri,dar nu stiu cum

Multumesc anticipat.

Foloseste acest cod:

if ( skinid == /* ID */ ) return SendClientMessage ( playerid , -1 , "ERROR: You're not allowed to use this skin!" ) ;

Schimbi "ID" cu id-ul "skin"-ului interzis.Iar daca vrei ca mai multe "skin"-uri sa fie interzise, faci asa:

if ( skinid == /* ID */ || skinid == /* ID */ ) return SendClientMessage ( playerid , -1 , "ERROR: You're not allowed to use this skin!" ) ;

Cred ca se poate observa ca am adaugat || skinid == /* ID */, nu?

Guest
This topic is now closed to further replies.
×
×
  • 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.