Jump to content

[Tutorial] Double Respect Points


Recommended Posts

Salutare SA-MP.Ro , am facut acest tutorial la cererea lui @Allaway. .

Sa incepem :

Mergem la functia "public PayDay" iar dupa mesajul cu informatiile despre payday-ul primit adaugam asa :

new h,m,s; // variabile de care ne vom folosi sa aflam ce ora este
gettime(h,m,s); // obtinem si stocam timpul in variabilele definite mai sus

Acum, dupa ce am aflat timpul, punem niste conditii si un mesaj daca este nevoie :

if(h == oradorita && m == 0)
    PlayerInfo[playerid][pExp] ++; // inlocuiesti cu variabila ta prin care citesti punctele de respect
    SendClientMessage(playerid, -1, "Ai primit doua puncte de respect ora aceatsa . Felicitari !"); // mesajul trimis player-ului la acea ora
    return 1;

Asta este tot . Pentru a pune mai multe ore pui mai multe conditii , de exemplu :

if(h == oradorita && m == 0 || h == adouaoradorita && m == aldoileaminutdorit) // si tot asa

Dar atentie, nu face linia prea mare pentru ca nu va fi suportata si iti va face probleme , daca vrei sa pui multe ore , o faci pe doua linii , daca vrei sa pui 5/6 ore e ok pe o linie , in fine, cred ca ai inteles .


ATENTIE : In loc de oradorita vei pune ora la care vrei sa se dea doua puncte . Daca de exemplu vre la 8:00 PM vei pune 20 , daca vrei la 8:00 AM vei pune 8 .

Edited by NoNamed
  • Sad 1
  • Upvote 2
Link to comment
Share on other sites

  • 2 years later...

imi zice ca nu e definit simbolul "playerid"  dar e..

C:\Users\Dell\Desktop\gn\gamemodes\astaeGM.pwn(23582) : error 017: undefined symbol "playerid"
C:\Users\Dell\Desktop\gn\gamemodes\astaeGM.pwn(23583) : error 017: undefined symbol "playerid"

Edited by Apexx
Link to comment
Share on other sites

  • WopsS unfeatured this topic

Join the conversation

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

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.