Jump to content

Problema comanda /v setplate


eltAndrei

Recommended Posts

Salut am si eu o problema cu numarul de inmatriculare 3d la masinile personale. Acest numar apare dupa ce dau restart la server de exemplu daca un player scrie /v setplate LS-24-GTA,trebuie sa dau restart la server ca sa ii apara numarul de inmatriculare.. daca ma puteti ajuta, voi ramane recunoscator! 

Uitati si comanda aici:             

else if(strcmp(x_nr,"setplate",true) == 0)
            {
                if(IsPlayerInVehicle(playerid, vehid) || PlayerInfo[vehid][pPcarkey] != -1 && PlayerInfo[vehid][pPcarkey2] != -1 && PlayerInfo[vehid][pPcarkey3] != -1)
                {
                    if(cmdtext[idx++] != 32 || cmdtext[idx] == EOS)
                    {
                        SendClientMessage(playerid,0xFFFFFFAA,"USAGE: /v setplate [newplate]");
                        return 1;
                    }
                    format(CarInfo[vehid][cLicense], 32 ,"%s",cmdtext[idx]);
                    SetVehicleNumberPlate(vehid,CarInfo[vehid][cLicense]);
                    format(string, sizeof(string), "{FFFF00}You have set your vehicle's plate to:{FFFFFF} %s", CarInfo[vehid][cLicense]);
                    SendClientMessage(playerid, 0xFFFFFFFF, string);
                    format(TextCar, sizeof(TextCar), "%s", CarInfo[vehid][cLicense]);
                       TextUpCar[vehid] = Create3DTextLabel(TextCar, 0x33AAFFFF , 0.0, 0.0, 0.0, 25, 0, 1);
                       Attach3DTextLabelToVehicle(TextUpCar[vehid], vehid, 0.0, 0.0, 0.1);
                       Update3DTextLabelText(TextUpCar[vehid], 0x33AAFFFF, string);
                       OnCarUpdate();
                       SavePlayerData(playerid);
                }
                else
                {
                    SendClientMessage(playerid, 0xFFFFFFAA, "Nu esti in masina ta personala pentru a putea schimba NR de Inmatriculare.");
                    return 1;
                }
            }

Dupa cum vedeti am si functia: OnCarUpdate(); in comanda si nu imi dau seama de la ce ar putea fi problema aceasta. 

SKINS SYSTEM BY ELTANDREI >> CLICK <<

DMV SYSTEM BY ELTANDREI >> CLICK <<

(!)SERVER DISCORD: https://discord.gg/8Hwd8EF

Link to comment
Share on other sites

pai am comanda /v park chiar nu inteleg de la ce a aparut aceasta problema poate la 3dtext ceva... nu se modifica direct cand este folosita comanda /v setplate si nu imi dau seama ce trebuie sa fac...

SKINS SYSTEM BY ELTANDREI >> CLICK <<

DMV SYSTEM BY ELTANDREI >> CLICK <<

(!)SERVER DISCORD: https://discord.gg/8Hwd8EF

Link to comment
Share on other sites

  • 2 weeks later...

incearca

 

          

            else if(strcmp(x_nr,"setplate",true) == 0)
            {
                if(IsPlayerInVehicle(playerid, vehid) || PlayerInfo[vehid][pPcarkey] != -1 && PlayerInfo[vehid][pPcarkey2] != -1 && PlayerInfo[vehid][pPcarkey3] != -1)
                {
                    if(cmdtext[idx++] != 32 || cmdtext[idx] == EOS)
                    {
                        SendClientMessage(playerid,0xFFFFFFAA,"USAGE: /v setplate [newplate]");
                        return 1;
                    }
                    format(CarInfo[vehid][cLicense], 32 ,"%s",cmdtext[idx]);
                    SetVehicleNumberPlate(vehid,cmdtext[idx]));
                    format(string, sizeof(string), "{FFFF00}You have set your vehicle's plate to:{FFFFFF} %s", CarInfo[vehid][cLicense]);
                    SendClientMessage(playerid, 0xFFFFFFFF, string);
                    format(TextCar, sizeof(TextCar), "%s", CarInfo[vehid][cLicense]);
                    TextUpCar[vehid] = Create3DTextLabel(TextCar, 0x33AAFFFF , 0.0, 0.0, 0.0, 25, 0, 1);
                    Attach3DTextLabelToVehicle(TextUpCar[vehid], vehid, 0.0, 0.0, 0.1);
                    Update3DTextLabelText(TextUpCar[vehid], 0x33AAFFFF, string);
                    OnCarUpdate();
                    SavePlayerData(playerid);
                    SetVehicleToRespawnEx(GetPlayerVehicleID(playerid));
                    SetVehicleNumberPlate(vehid,cmdtext[idx]));
                }
                else
                {
                    SendClientMessage(playerid, 0xFFFFFFAA, "Nu esti in masina ta personala pentru a putea schimba NR de Inmatriculare.");
                    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.