Jump to content
  • 0

Problema masini


Slipknot

Question

Am o problema cu masinile am pus un cars.cfg pe serverul meu insa masinile sunt cumparate de playeri si multe dintre masini au /v lock .... mam conectat cu /rcon login si degeaba nu pot intra in masina casa le vand cum pot face ca cu /rcon sau un admin cu grad mai mare sa pot intra intro masina luata de un player care are /v lock so vand?

Vrei ceva? [email protected]

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

Lock:

      [pawn] else if(strcmp(x_nr,"lock",true) == 0)

        {

                new keycar = PlayerInfo[playerid][pPcarkey];

                new carkey = 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~%s ~g~Unlocked",CarInfo[carkey][cDescription]);

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~%s ~r~Locked",CarInfo[carkey][cDescription]);

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;

}

                }

                else

                {

                    SendClientMessage(playerid, COLOR_GREY, "  You don't have a vehicle at slot 2");

                    return 1;

                }

        }

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

        {

                new keycar = PlayerInfo[playerid][pPcarkey3];

                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 3");

                    return 1;

                }

        }[/pawn]

Vrei ceva? [email protected]

Link to comment
Share on other sites

Cauta OnPlayerEnterVehicle si adauga acolo asta :

[pawn]

if(IsAnOwnableCar(vehicleid) && CarInfo[vehicleid][cLock] == 1 && CarInfo[vehicleid][cOwned] == 1)

{

    if(PlayerInfo[playerid][pAdmin] >= 5) { }

    else

    {

new Float:cx, Float:cy, Float:cz;

  GetPlayerPos(playerid, cx, cy, cz);

    SetPlayerPos(playerid, cx, cy, cz);

}

}

[/pawn]

Stiu si eu ... branza e pe bani, dar eu tot ma joc pe gratis!

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.