Jump to content

Problema vipname


MGeorge

Recommended Posts

Cum sa fac sa apara vipname-ul de pe masina mai mare? ce anume din aceasta comanda trebuie sa modific

Spoiler

CMD:vipname(playerid, params[])
{
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to log in first.");
    if(!IsPlayerInAnyVehicle(playerid)) return SS(playerid, COLOR_LIGHTGREEN3, "Nu esti intr-un vehicul!", "You are not in a vehicle!");
    new carid = GetPlayerVehicleID(playerid),idcar=-1;
    for(new vv; vv < MAX_PERSONAL_VEHICLES; vv++)
    {
        if(carid == PlayerInfo[playerid][pCarID][vv])
        {
            idcar = vv;
        }
    }
    if(idcar == -1) return SS(playerid, COLOR_LIGHTGREEN3, "Poti folosi aceasta comanda doar pe vehicule VIP.", "You can add custom wheels on VIP vehicles.");
    if(IsPlayerConnected(playerid))
    {
        if(carid == PlayerInfo[playerid][pCarID][idcar])
        {
            if(PlayerInfo[playerid][pCarVIP][idcar] > 0)
            {
                new query[256],text[20],test[20];
                if(sscanf(params, "s[20]", text)) return SCM(playerid, COLOR_GREY, "Syntax:{FFFFFF} /vipname [text]");
                if(strlen(text) > 20) return SendClientMessage(playerid, COLOR_LIGHTGREEN3, "Maximum 20 characters are allowed.");
                if(strlen(text) == 0) return 1;
                format(CarVipName[playerid][idcar], 20, text);
                SetVipText(playerid, idcar);
                mysql_real_escape_string(text, test);
                mysql_format(SQL, query, sizeof(query), "UPDATE `cars` SET `VipText`='%s' WHERE `ID`='%d'", test, PlayerInfo[playerid][pCar][idcar]);
                mysql_tquery(SQL, query, "", "");
                format(query, sizeof(query), "Text pentru vehicul setat: %s", text);
                SendClientMessage(playerid, COLOR_ADMCOMMANDS, query);
            }
            else return SS(playerid, COLOR_LIGHTGREEN3, "Poti folosi aceasta comanda doar pe vehicule VIP.", "You can add custom text on VIP vehicles.");
        }
        else return SS(playerid, COLOR_LIGHTGREEN3, "Poti folosi aceasta comanda doar pe vehicule VIP.", "You can add custom text on VIP vehicles.");
    }
    return 1;
}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.