Jump to content

Cine ma poate ajuta pentru comanda cu /masina un delay de un minut iar pentru comanda /comanda7368 sa poata sa o foloseaca doar odata ?


GamerulFOX

Recommended Posts

CMD:masina(playerid, params[])
{
    CreateVehicle(531, 217.3956, 1867.7419, 12.8884, 0, 1, 1, 0, 0);
    SendClientMessage(playerid, 0x0077ffFF, "Masina ta a fost spawnata cu succes in baza militara !");
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid, 217.3956, 1867.7419, 12.8884, 3.0);
    SendClientMessageToAll(0x48452eFF, "Un player a spawnat o masina!");
    return 1;
}






CMD:comanda7368(playerid, params[])
{
    SendClientMessage(playerid, 0x0077ffFF, "Pentru ca ai folosit comanda aceasta ai primit 10 000 de lei!");
    GivePlayerMoney(playerid, 10000);
    return 1;
}


 

Link to comment
Share on other sites

La comanda7368 ai putea sa o faci simplu ca un bonus gen dupa un anumit level sa nu o mai poata lua , daca in caz ca vrei sa faci dupa cum ti am zis adaugi asa

 

    if(PlayerInfo[playerid][pLevel] != 1) return SCM(playerid, -1, "Ai luat deja acest bonus de inceput");

Link to comment
Share on other sites

3 minutes ago, Tefyuu said:

Si  delay adaugi UsedMasina[playerid] = 60;    acel 60 semnifica secundele 60 secunde = 1 minut    (Atentie NU STIU SIGUR DACA E ASA SI EU INVAT !!! )

am uitat sa precizez aceea comanda trb adaugata la onplayerconnect

 

 

Link to comment
Share on other sites

13 minutes ago, Tefyuu said:

La comanda7368 ai putea sa o faci simplu ca un bonus gen dupa un anumit level sa nu o mai poata lua , daca in caz ca vrei sa faci dupa cum ti am zis adaugi asa

 

    if(PlayerInfo[playerid][pLevel] != 1) return SCM(playerid, -1, "Ai luat deja acest bonus de inceput");

bro este un server de la zero iar aia era printre primele comenzi ! Nu am de unde sa am PlayerInfo si pLevel!

Link to comment
Share on other sites

  • 1 year later...
On 10/28/2021 at 7:56 PM, GamerulFOX said:

bro este un server de la zero iar aia era printre primele comenzi ! Nu am de unde sa am PlayerInfo si pLevel!

Iti recomand sa-ti faci un enum, cu PlayerInfo, sau P_info deoarece este foarte folositor, si te va ajuta la sistemul de stocare in baza de date, si/sau la sistemul de inregistrare/logare. Mai pe scurt la tot ce faci in GM aproape.

Edited by DonErik
Link to comment
Share on other sites

pentru deelay exista mai multe metode

poti sa faci in felul urmator

unde ai variabilele pui new deelayTimer[MAX_PLAYERS];

la comanda masina deasupra la  CreateVehicle(531, 217.3956, 1867.7419, 12.8884, 0, 1, 1, 0, 0);
pui if(deelayTimer[playerid] > gettime()) return SendClientMessage(playerid, -1, "Asteapta 1 minut inainte sa folosesti din nou comanda");

deelayTimer[playerid] = gettime()+60;

maxresdefault.jpg

 

 

 

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.