SA-MP Forums Archive
[HELP] house car lock - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP] house car lock (/showthread.php?tid=486033)



[HELP] house car lock - Luca12 - 06.01.2014

Hello I have house car system and know I want command foor example lock nad then with the lock I can lock or unlock house car? Thanks


Re: [HELP] house car lock - erminpr0 - 06.01.2014

pawn Код:
YCMD:lock(playerid, params[], help)
{
    #pragma unused help
    #pragma unused params
    new h = PlayerInfo[playerid][pHouseKey];
    if(h == INVALID_HOUSE_ID) return 1; // ?????????
    if(HouseInfo[h][hCarLock]) {
    HouseInfo[h][hCarLock] = 0;
    return SendClientMessage(playerid, -1, "*You unlocked your house car."); }
    else
    HouseInfo[h][hCarLock] = 1;
    SendClientMessage(playerid, -1, "*You've locked your house car.");
    return 1;
}



Re: [HELP] house car lock - Luca12 - 07.01.2014

ok I just want know the codde for onplayerentervehicle so if my house car is locked then it's says to another player that my house car is locked and is there a way somehow to get a owwner name of house car something like this:

the house car is locked. owner of house car: michael_benneti