Help /safehouse
#1

Wanted your help to fix my command / safe for the player to use the command in your home, but the error and giving ta to use this command inside the houses of other players.

pawn Code:
if(strcmp(cmd,"/safehouse",true)==0)
    {
        for(new h = 0; h < sizeof(HouseInfo); h++)
        {
        if (!PlayerToPoint(3, playerid,HouseInfo[playerid][hExitx], HouseInfo[playerid][hExity], HouseInfo[playerid][hExitz]))
        {
             SendClientMessage(playerid, COLOR_GREY, "You are not inside your home.");
             return 1;
        }
        ShowPlayerDialog(playerid,1144,DIALOG_STYLE_LIST,"Safe House","Deposit\nBooty\nBalance","okay","cancel");
        return 1;
    }
    }
Reply
#2

Wwhat ?
Reply
#3

I want to fix the command to the player using it only within your home, but giving him use ta ne homes of other players.
Reply
#4

I would be very grateful if someone helps me, I need the code urgently.
Reply
#5

Wanted your help to fix my command / safe for the player to use the command in your home, but the error and giving ta to use this command inside the houses of other players.

pawn Code:
if(strcmp(cmd,"/safehouse",true)==0)
    {
        for(new h = 0; h < sizeof(HouseInfo); h++)
        {
        if (!PlayerToPoint(3, playerid,HouseInfo[playerid][hExitx], HouseInfo[playerid][hExity], HouseInfo[playerid][hExitz]))
        {
             SendClientMessage(playerid, COLOR_GREY, "You are not inside your home.");
             return 1;
        }
        ShowPlayerDialog(playerid,1144,DIALOG_STYLE_LIST,"Safe House","Deposit\nBooty\nBalance","okay","cancel");
        return 1;
    }
    }
Reply
#6

Quote:
Originally Posted by Freak@
View Post
Wanted your help to fix my command / safe for the player to use the command in your home, but the error and giving ta to use this command inside the houses of other players.

pawn Code:
if(strcmp(cmd,"/safehouse",true)==0)
    {
        for(new h = 0; h < sizeof(HouseInfo); h++)
        {
        if (!PlayerToPoint(3, playerid,HouseInfo[playerid][hExitx], HouseInfo[playerid][hExity], HouseInfo[playerid][hExitz]))
        {
             SendClientMessage(playerid, COLOR_GREY, "You are not inside your home.");
             return 1;
        }
        ShowPlayerDialog(playerid,1144,DIALOG_STYLE_LIST,"Safe House","Deposit\nBooty\nBalance","okay","cancel");
        return 1;
    }
    }
What you are doing here is getting the distance between to player and the point defined inside the home, you need to use 'IsPlayerInRangeOfPoint'.
Reply
#7

Quote:
Originally Posted by zDivine
View Post
What you are doing here is getting the distance between to player and the point defined inside the home, you need to use 'IsPlayerInRangeOfPoint'.
The business and realizing not to make the code indetificar if the player is inside your home gm and my GF.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)