how to make /houserob cmd
#1

how to make /houserob cmd

im using PPC_Housing system
Reply
#2

mean you want if some one /houserob in house he get money or some thing else ?
Reply
#3

I dont know the exact function of it but try this one and instead of my codes put your own .
pawn Код:
#define SCM SendClientMessage
CMD:robhouse(playerid, params[])
{
    for(new i = 0; i < MAX_HOUSES;i++)
    {
        if(IsPlayerInRangeOfPoint(playerid,2.5,HInfo[i][XPos],HInfo[i][YPos],HInfo[i][ZPos]))
        {
            if(HInfo[i][locked] == 0)
            {
                GivePlayerMoney(playerid,3000);
                If(playerinfo[playerid][criminal]);
                SCM(playerid,-1,"You have sucessfully robbed the house.");
            }
        }
        return 1;
    }
    return 0;
}
pawn Код:
If(playerinfo[playerid][criminal]);
Change this to your crimianl like I just gave a example you can choose 1 I guess it should be in your Gamemode.

pawn Код:
if(HInfo[i][locked] == 0)
//and
HInfo[i][XPos],HInfo[i][YPos],HInfo[i][ZPos]
Change this for your house format otherwise it will not work.

When you robhouse you get $3000 you can change it to any thing you want by changing this.

pawn Код:
GivePlayerMoney(playerid,3000);
Change 3000 to any thing you want

I think I helped you I didnt knew the exact function so sorry for that what I understanded was this.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)