Jump to content

Recommended Posts

Posted (edited)
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.