Jump to content
  • 0

/v lock1,2 Error


friezakinght

Question

Am gamemod-ul xtr-zone by Teddy23 si am un sistem de vehicule cu /v lock1 sau /v lock2 pentru slotul 2 al masinii si cand scrie Vehicle Locked tot merge sa intru in ea,daca intru intr-o casa sau schimb vw,merge sa intru in ea,ajutati-ma va rog, ma puteti ajuta va rog frumos, uite aici codul pentru /v lock1 si /v lock2

[pawn]else if(strcmp(x_nr,"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, "  You don't have a vehicle at slot 1");

                    return 1;

                }

        }

        else if(strcmp(x_nr,"lock2",true) == 0)

        {

                new keycar = PlayerInfo[playerid][pPcarkey2];

                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;

}

                }[/pawn]

Va rog ajutati-ma!! Multumesc apreciez orice ajutor

Raven's Roleplay translated percent

button.php?barPosition=20&leftFill=%2300FF33

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

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.