Is there a way to detect play leaving a pickup?
#1

Hi I am wondering if there's a way to detect if a player leave's, I am editing a house system by antionx or something for my server and was wondering if you could detect if a player leave's a pickup with out isplayerinrangeofpoint.

For example when he enter's the pick up this code function's.
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(GetHouseID(playerid) != -255) GetHouseStats(playerid, GetHouseID(playerid));
    return 1;
}


stock GetHouseStats(playerid, hid)
{
    new str2[256];
    new Text:startgame;
    new Text:options;
    format(str2, sizeof(str2), "Owner: %s", hInfo[hid][Name]);
    SendClientMessage(playerid, c_y, str2);
    //text draws start menu
    startgame = TextDrawCreate(239.5 ,127 , str2);
    TextDrawFont(startgame , 3);
    TextDrawLetterSize(startgame , 1.0, 9.1);
    TextDrawColor(startgame , 0x0022ffFF);
    TextDrawSetOutline(startgame , false);
    TextDrawSetProportional(startgame , true);
    TextDrawSetShadow(startgame , 1);
    if(strcmp(hInfo[hid][Renter],"ForRent",true))
    {
        format(str2, sizeof(str2), "Rented by: %s", hInfo[hid][Renter]);
        SendClientMessage(playerid, c_y, str2);
    }
    if(PlayerInfo[playerid][AdminLevel] == 6)
    {
        format(str2, sizeof(str2), "House id: %d House vw: %d", GetHouseID(playerid), hInfo[hid][Virtualworld]);
        SendClientMessage(playerid, COLOR_ORANGE, str2);
    }
    format(str2,sizeof(str2),"Cost: %i",hInfo[hid][Cost]);
    SendClientMessage(playerid, c_y, str2);
    options = TextDrawCreate(279.5 ,207 , str2);
    TextDrawFont(options , 3);
    TextDrawLetterSize(options , 1.0, 9.1);
    TextDrawColor(options , 0x0022ffFF);
    TextDrawSetOutline(options , false);
    TextDrawSetProportional(options , true);
    TextDrawSetShadow(options , 1);
    TextDrawShowForPlayer(playerid, startgame);  // Show the SF option
    TextDrawShowForPlayer(playerid, options);  // Show the LV option
}
I want it so when the player leave's the pickup the textdraw's will hide.
Reply


Messages In This Thread
Is there a way to detect play leaving a pickup? - by jueix - 18.02.2013, 15:59
Re: Is there a way to detect play leaving a pickup? - by pasha97 - 18.02.2013, 16:29
Re: Is there a way to detect play leaving a pickup? - by jueix - 18.02.2013, 16:43

Forum Jump:


Users browsing this thread: 1 Guest(s)