Jump to content

Nu merge sa dau click pe textdraw !


GamerulFOX

Recommended Posts

public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(clickedid == Rent_TDE)
    {
        TextDrawDestroy(Rent_TDE);
        TextDrawDestroy(Rent_TD[3]);
        TextDrawDestroy(Rent_TD[4]);
        GivePlayerMoney(playerid, -100);
        CreateVehicle(509, 2275.7969,-84.5570,26.5145, 0, 1, 1, 0, 0);
        return 1;
    }
    return 0;
}
new Text:Rent_TD[5];
new Text:Rent_TDE;



    Rent_TDE = TextDrawCreate(221.666641, 245.585189, "RENT");
    TextDrawLetterSize(Rent_TDE, 0.400000, 1.600000);
    TextDrawAlignment(Rent_TDE, 1);
    TextDrawColor(Rent_TDE, -1);
    TextDrawSetShadow(Rent_TDE, 0);
    TextDrawBackgroundColor(Rent_TDE, 255);
    TextDrawFont(Rent_TDE, 1);
    TextDrawSetProportional(Rent_TDE, 1);

    Rent_TD[3] = TextDrawCreate(182.333404, 147.688873, "box");
    TextDrawLetterSize(Rent_TD[3], 0.000000, 13.933335);
    TextDrawTextSize(Rent_TD[3], 293.000000, 0.000000);
    TextDrawAlignment(Rent_TD[3], 1);
    TextDrawColor(Rent_TD[3], -1);
    TextDrawUseBox(Rent_TD[3], 1);
    TextDrawBoxColor(Rent_TD[3], 255);
    TextDrawSetShadow(Rent_TD[3], 0);
    TextDrawBackgroundColor(Rent_TD[3], 255);
    TextDrawFont(Rent_TD[3], 1);
    TextDrawSetProportional(Rent_TD[3], 1);

    Rent_TD[4] = TextDrawCreate(183.333374, 152.251876, "Apasa_pe_buto-~n~nul_RENT_pentru_a~n~inchiria_o_bicicleta~n~~n~_______PRET_100$");
    TextDrawLetterSize(Rent_TD[4], 0.400000, 1.600000);
    TextDrawAlignment(Rent_TD[4], 1);
    TextDrawColor(Rent_TD[4], -1);
    TextDrawSetShadow(Rent_TD[4], 0);
    TextDrawBackgroundColor(Rent_TD[4], 255);
    TextDrawFont(Rent_TD[4], 1);
    TextDrawSetProportional(Rent_TD[4], 1);


CMD:rent(playerid, params[])
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    if(!IsPlayerInRangeOfPoint(playerid, 2.0, 2275.7969,-84.5570,26.5145)){
        SendClientMessage(playerid, 0xff0000FF, "Nu esti la locatia potrivita !");
        DisablePlayerCheckpoint(playerid);
        SetPlayerCheckpoint(playerid, 2275.7969,-84.5570,26.5145, 3.0);
        return 1;
    }
    TextDrawShowForPlayer(playerid, Rent_TD[2]);
    TextDrawShowForPlayer(playerid, Rent_TD[3]);
    TextDrawShowForPlayer(playerid, Rent_TD[4]);
    SelectTextDraw(playerid, COLOR_YELLOW);
    return 1;
}

Adica vreau ca playerul sa scrie /rent si sa apara mousul si sa de-a click pe RENT ! Dar nu merge sa de-a click pe textdraw-ul RENT

Edited by GamerulFOX
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.