[HELP]: Lock house
#1

Hello again !

I am trying to make a command to lock/unlock a house, but for some reason nothing happends.

pawn Код:
CMD:lockh(playerid, params[])
{
    for(new i = 0; i < MAX_HOUSES; i ++)
    {
    if(!IsPlayerInRangeOfPoint(playerid, 2.0, HouseInfo[i][posX], HouseInfo[i][posY], HouseInfo[i][posZ])) continue;
    new pName[24]; new string[70];
    GetPlayerName(playerid, pName, 24);
    if(strcmp(pName, HouseInfo[i][Owner], true))
    {
    if(HouseInfo[i][hLock] == 0)
    {
    HouseInfo[i][hLock] = 1;
    format(string, sizeof(string), "* %s has locked his house !", GetName(playerid));
    ProxDetector(30, playerid, string, COLOR_PURPLE);
    GameTextForPlayer(playerid, "~w~house ~r~locked", 3000, 5);
    }
    if(HouseInfo[i][hLock] == 1)
    {
    HouseInfo[i][hLock] = 0;
    format(string, sizeof(string), "* %s has unlocked his house !", GetName(playerid));
    ProxDetector(30, playerid, string, COLOR_PURPLE);
    GameTextForPlayer(playerid, "~w~house ~g~unlocked", 3000, 5);
    }
    }
    }
    return 1;
}
Thanks
Reply


Messages In This Thread
[HELP]: Lock house - by Areax - 30.11.2013, 17:43
Re: [HELP]: Lock house - by Loot - 30.11.2013, 18:09
Re: [HELP]: Lock house - by Areax - 30.11.2013, 18:11
Re: [HELP]: Lock house - by Loot - 30.11.2013, 18:13
Re: [HELP]: Lock house - by Areax - 30.11.2013, 18:18
Re: [HELP]: Lock house - by Loot - 30.11.2013, 18:23
Re: [HELP]: Lock house - by Areax - 30.11.2013, 18:29
Re: [HELP]: Lock house - by Loot - 30.11.2013, 18:41
Re: [HELP]: Lock house - by Areax - 30.11.2013, 18:53

Forum Jump:


Users browsing this thread: 3 Guest(s)