Jump to content
  • 0

Problema sistem masini personale


wifi123

Question

Salut am si eu o problema la sistemul de masini personale. Comenzile sunt /v lock(1-7) /v park /v find /v foundit  /v sellcarto..etc si vreau sa nu mai fie cu /v la inceput ci direct /lock /park /find /foundit /sellcarto...etc

Uitati sistemu:

http://pastebin.com/UpRef72C

L-am pus in pastebin ca nu mergea sa postez ca are peste 50000 caractere

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Deci copiezi inceputul comenzii adica strcmd.... pana la {.Dupa care pui codul ai aici exemplu comanda /lock1:

[pawn][pawn]if(strcmp(cmd, "/lock1", true) == 0)

{

    new keycar = PlayerInfo[playerid][pPcarkey];

                if(keycar != 999)

                {

                    new locked[256];

                    locked = strtok(cmdtext, idx);

                    if(CarInfo[keycar][cLock] == 1)

                    {

                        for(new i = 0; i < MAX_PLAYERS; i++)

                                                {

                                                        if (IsPlayerConnected(i))

                                                        {

                                                                SetVehicleParamsForPlayer(keycar,i,0,0);

                                                        }

                                                }

                                                format(string, sizeof(string), "~w~Vehicle~n~~g~Unlocked");

                                                GameTextForPlayer(playerid, string, 4000, 3);

                                                CarInfo[keycar][cLock] = 0;

                                                OnPropUpdate();

                                                return 1;

                                        }

                                        else if(CarInfo[keycar][cLock] == 0)

                                        {

                                            for(new i = 0; i < MAX_PLAYERS; i++)

                                                {

                                                        if (IsPlayerConnected(i))

                                                        {

                                                                SetVehicleParamsForPlayer(keycar,i,0,1);

                                                        }

                                                }

                                                format(string, sizeof(string), "~w~Vehicle~n~~r~Locked");

                                                GameTextForPlayer(playerid, string, 4000, 3);

                                                CarInfo[keycar][cLock] = 1;

                                                OnPropUpdate();

                                                return 1;

                                        }

                }

                else

                {

                    SendClientMessage(playerid, COLOR_GREY, "[Eroare]: You don't have a vehicle at slot 1");

                    return 1;

                }[/pawn][/pawn]

 

 

Link to comment
Share on other sites

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.