Jump to content

Comanda /destroybike problems


Zen TriX

Recommended Posts

Salut, la spawn am facut un fel de /getbike ca pe ruby, doar ca am nevoie de comanda /destroycar, am incercat sa adaug una dar nu imi merge.

Daca ma puteti ajuta, sa aiba si un Timer maxim cat sa o poata folosi.

Asta e comanda /getbike.

105504021_getbike.thumb.png.35d84a0d6291604fbda7f9b67147932a.png

Link to comment
Share on other sites

image.png.a4fbaa49abc2e02a07a5a69af035baec.png

ai raspunsu aici de nu iti merge /destroybike.

Sterge Carspawn[playerid] = 1; deaorece tu practic ii schimbi id-ul masinii pe care l-ai creat cu bike-ul.
Si tu poate cand dadeai /destroybike iti stergea masina cu ID 1. cu cat l-ai setat acolo.

Cheers!

Link to comment
Share on other sites

Acum 14 minute, iSorin[] a spus:

image.png.a4fbaa49abc2e02a07a5a69af035baec.png

ai raspunsu aici de nu iti merge /destroybike.

Sterge Carspawn[playerid] = 1; deaorece tu practic ii schimbi id-ul masinii pe care l-ai creat cu bike-ul.
Si tu poate cand dadeai /destroybike iti stergea masina cu ID 1. cu cat l-ai setat acolo.

Cheers!

Am primit cateva errori la inceput, sa definesc #define stop si #define mtbTimer, le am definit, dar mai primesc errori.bijeerrorr.thumb.png.7b5c3f6c056999ab1d25a3c9ebe99e11.png

Link to comment
Share on other sites

  • 2 years later...

CMD:getbike(playerid, params[]) {

    if (!IsPlayerConnected(playerid)) return 0;

 

    new Float:x, Float:y, Float:z, Float:angle;

    x = 123.45;

    y = 67.89;

    z = 3.0;

    angle = 0.0;

 

    new vehicleid = CreateVehicle(481, x, y, z, angle, -1, -1, 10000);

    if (vehicleid != INVALID_VEHICLE_ID) {

        PutPlayerInVehicle(playerid, vehicleid, 0);

        SendClientMessage(playerid, COLOR_GREEN, "You've received a bike.");

    } else {

        SendClientMessage(playerid, COLOR_RED, "Failed to spawn the bike.");

    }

 

    return 1;

}

 

CMD:despawnbike(playerid, params[]) {

    if (!IsPlayerConnected(playerid)) return 0;

 

    new vehicleid = GetPlayerVehicleID(playerid);

    if (vehicleid != INVALID_VEHICLE_ID) {

        DestroyVehicle(vehicleid);

        SendClientMessage(playerid, COLOR_GREEN, "Your bike has been despawned.");

    } else {

        SendClientMessage(playerid, COLOR_RED, "You don't have a bike to despawn.");

    }

 

    return 1;

}

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.