help in a command
#1

Hi

i'm trying to make a command so the player can find his door's location (/mydoor)
Код:
enum pInfo
{
    ...
    ...
    ...
    pDoor1,
    pDoor2,
    pDoor3
}
new PlayerInfo[MAX_PLAYERS][pInfo];
I'm saving the Door ID in pDoor1 or pDoor 2 or pDoor3...
Код:
CMD:ddowner(playerid, params[])
{
    new door;
    ...
    ...
    ...
    ...
    PlayerInfo[playerid][pDoor1] = door;
Using this command, i can set the Door owner, and it will saves the door id in "pDoor1"
Код:
CMD:mydoor(playerid, params[])
{
    if(PlayerInfo[playerid][pDoor1] == 1)
    {
       SetPlayerCheckpoint(playerd,DDinfo[pDoor1][Ex],DDinfo[pDoor1][Ey],DDinfo[pDoor1][Ez], 3.0);
    }
    else
    {
        SendClientMessage(playerid, COLOR_WHITE, "You don't own a door.");
    }
    return 1;
}
and this is the command, anything wrong?, the checkpoint will be placed in BlueBerry, not in the Door location..;
Reply


Messages In This Thread
help in a command - by BrianS123 - 01.09.2016, 12:57
Re: help in a command - by javedali1211 - 01.09.2016, 13:03
Re: help in a command - by Shinja - 01.09.2016, 13:06
Re: help in a command - by BrianS123 - 01.09.2016, 13:06
Re: help in a command - by BrianS123 - 01.09.2016, 13:08
Re: help in a command - by BrianS123 - 01.09.2016, 13:12

Forum Jump:


Users browsing this thread: 1 Guest(s)