User
Pass
2FA
 
 

[PLUGIN] ZP Points System with Shop [Final Version + All Code Rewritten] [EDIT4]
Go to page 1, 2  Next    
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Plugins
Author Message12240
Legendary.
[Banned user]


Banned


Status: Offline
(since 11-01-2017 15:00)
Joined: 04 Aug 2016
Posts: 110, Topics: 18
Location: Bermudes Triangle

Reputation: 6.3
Votes: 6

 
Post Posted: 10-09-2016, 22:46:39 | Translate post to: ... (Click for more languages)

EDIT: Codul a fost putin modificat cu ce mi-a sugerat destroi sa modific.
EDIT2: Am adaugat salvare de tipul nValut in loc de fValut.
EDIT3: Am modificat comenzile de dat si luat puncte, acum nu poti sa ii iei unui jucator o suma mai mare de puncte decat atat cat are, acum se pot seta punctele pe 0 (zp_points <nume> 0), codul a fost optimizat, etc..
EDIT4: Am adaugat MySql la cerere, am nevoie de cineva sa-l testeze.

Descriere*: Plugin de Puncte pentru Zombie Plague
Descarcare*:
Spoiler:

Info*: Punctele sunt salvate pe sistem fvault.
Are comenzi de dat si luat puncte
Are meniu (/shop) pentru cumparare iteme cu puncte
Mesaje colorate
Am adaugat virgula la numerele mai mari de 1,000
Am adaugat functia de loguri si cvar de dezactivat/activat

Instalare*:
* Dati copy la cod, apoi creeati un fisier .txt in care dati paste la cod
* Dupa ce ati dat paste salvati fisierul in format.sma
* Dupa ce l-ati salvat compilati fisierul
* Dupa ce il compilati adaugati pluginul in folderul plugins si adaugati in plugins-zplague, imediat dupa addons numele pe care l-ati pus la plugin cu extensia sa (.amxx)

Module: cstrike, fakemeta, hamsandwich, fun
Cvar: zp_logpoints (daca creeaza loguri in care scrie cine,cui si cate puncte a trimis)| 1= on | 0=off
Comenzi:
> Dat puncte: zp_points <numele> <cantitatea>
> Luat puncte: zp_take_points <numele> <cantitatea>

Poze:




Altele*: Nu luati in seama "credite zombie", eu pe server am pluginul incorporat in addons si am facut un sistem de credite pentru zombie care se dau cand un zombie/nemesis/asasin fac dmg unui human/sniper/nemesis. itemele la zombie sunt pe credite zombie si itemele la human pe credite human. in plugin-ul de sus se dau doar doar credite normale.

IMPORTANT: Daca vreunul dintre voi sa gaseste sa spuna ca asta e plagiat sau ca nu-mi apartine sa vina cu dovezi sau mai bine sa nu-si raceasca gura degeaba. Ofer suport pentru plugin, daca ai gasit un bug lasa-ma sa stiu si eu!
* Acest sistem de puncte nu ar fi de folos fara un plugin de rewards. Am facut unul special pentru plugin pe care o sa-l pun in urmatorul post daca sunteti interesati de plugin-ul asta.



Zombie Plague Legendary 8.1
Server original, unicat in Romania.



Last edited by Legendary. on 02-10-2016, 13:49:59; edited 9 times in total
1 0
  
Back to top
View user's profile Send private message
destroi112

[DEV]



Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042, Topics: 119
Location: ---------

Reputation: 515.9
Votes: 118

   
Post Posted: 11-09-2016, 08:47:29 | Translate post to: ... (Click for more languages)

Nu folosi 10 mesaje odatã chiar dacã le afișezi în consolã.
La client disconect dupã ce salvezi datele setezi punctele pe 0 pentru a nu rãmânã când intrã cu alt nume.
În publicul point system verifici daca e slot doar ca orice grad are flagul b.
Lasã gpassword true în case-ul în care cumperi slot.Și verifici în points system dacã gpassword nu e true sã dea return altfel se poate pune hook pe comanda cu bind ,ex. bind c "messagemod enterpasd" si dp ce îi dai slot treci gpassword pe false si poți scrie ainul în fișier direct si nu uit de server_cmd("amx_reloadadmins").O sã mã mai uit prin el mai încolo.



Retired from Amxmodx



Last edited by destroi112 on 18-09-2016, 11:00:41; edited 1 time in total
0 0
  
Back to top
View user's profile Send private message
Legendary.
[Banned user]


Banned


Status: Offline
(since 11-01-2017 15:00)
Joined: 04 Aug 2016
Posts: 110, Topics: 18
Location: Bermudes Triangle

Reputation: 6.3
Votes: 6

 
Post Posted: 12-09-2016, 17:13:41 | Translate post to: ... (Click for more languages)

Nu vreau sa reseteze punctele la deconectarea clientului, punctele trebuie salvate.
O sa adaug salvarea pe nick si ip, daca jucatorul care isi schimba numele nu isi schimba si ip-ul o sa ii ramana punctele, daca vrea cineva sa intre pe numele alui jucatoru nu o sa aibe punctele lui deoarece are alt ip.
Flagul "b" este flagul default pentru nume rezervat, "AMX_RESERVATION", daca jucatorul are flagul asta inseamna ca are deja slot rezervat pe server deci are slot, corect?
Pusesem sa dea automat comanda amx_reloadadmins dar am observat ca se da automat de la amx mod x cand isi cumpara slot, dar de precautie o sa adaug.
O sa ma ocup de el, dar probabil in weekend ca sunt ocupat cu scoala
Daca are cineva nevoie de el sa lase reply si il fac mai devreme.



Zombie Plague Legendary 8.1
Server original, unicat in Romania.

0 0
  
Back to top
View user's profile Send private message
destroi112

[DEV]



Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042, Topics: 119
Location: ---------

Reputation: 515.9
Votes: 118

   
Post Posted: 12-09-2016, 21:31:58 | Translate post to: ... (Click for more languages)

server_cmd("amx_addadmin ^"%s^" ^"b^" ^"%s^" ^"name^"", name, password);

->

server_cmd("amx_addadmin ^"%s^" ^"b^" ^"%s^" ^"a^"", name, password);

Si ii resetezi punctele dupa ce i le salvezi pentru ca asa daca da reconect cu alt nume ii ramane si pe numele ala punctele de dinainte
ex.
public client_disconnect(id)
{
//save
//setezi pcte pe 0
}
asa el o sa aiba salvate punctele lui dar si in acelasi timp nu o sa poata intra x sau y sa le fure.
Also ->
Spoiler:

Overflood o sa iti dea de la prea multe mesaje in chat trimise in acelasi timp.
Variabila asta e degeaba -> new bool:g_Damage2[33]
ai deja new bool:g_Damage[33] cu care verifici daca are sau nu x2 dmg nu e nevoie de 2 valori.Mai ai de modificat la el pana sa fie terminat.
Iar inc--ul asta .. -> #include <zombieplaguelegendary> ?



Retired from Amxmodx



Last edited by destroi112 on 13-09-2016, 12:59:15; edited 1 time in total
0 0
  
Back to top
View user's profile Send private message
Legendary.
[Banned user]


Banned


Status: Offline
(since 11-01-2017 15:00)
Joined: 04 Aug 2016
Posts: 110, Topics: 18
Location: Bermudes Triangle

Reputation: 6.3
Votes: 6

 
Post Posted: 13-09-2016, 10:03:05 | Translate post to: ... (Click for more languages)

Nu mai stiu de ce aveam bool:g_damage de 2 ori, nici nu am observat.. Pluginul îl făcusem direct pe add-on și după l-am făcut plugin separat.. O sa rezolv și cu overflood-ul, ai dreptate. Sâmbăta ma ocup de el, mersi pentru ajutor.


Zombie Plague Legendary 8.1
Server original, unicat in Romania.

0 0
  
Back to top
View user's profile Send private message
destroi112

[DEV]



Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042, Topics: 119
Location: ---------

Reputation: 515.9
Votes: 118

   
Post Posted: 13-09-2016, 13:00:12 | Translate post to: ... (Click for more languages)

Btw amxmodx, amxmisc nu sunt module , verifica in modules.ini alea sunt module.(ex. fakemeta,hamsandwich ,sql,nvault,etc)


Retired from Amxmodx

0 0
  
Back to top
View user's profile Send private message
Legendary.
[Banned user]


Banned


Status: Offline
(since 11-01-2017 15:00)
Joined: 04 Aug 2016
Posts: 110, Topics: 18
Location: Bermudes Triangle

Reputation: 6.3
Votes: 6

 
Post Posted: 13-09-2016, 15:10:26 | Translate post to: ... (Click for more languages)

Am inteles gresit,stiu care sunt modulele, dar am postat aia pe la 12 noaptea si eram prea obosit, am incurcat modulele cu librariile -


Zombie Plague Legendary 8.1
Server original, unicat in Romania.

0 0
  
Back to top
View user's profile Send private message
Legendary.
[Banned user]


Banned


Status: Offline
(since 11-01-2017 15:00)
Joined: 04 Aug 2016
Posts: 110, Topics: 18
Location: Bermudes Triangle

Reputation: 6.3
Votes: 6

 
Post Posted: 18-09-2016, 10:55:37 | Translate post to: ... (Click for more languages)

Am facut ce ai zis tu, dar nu inteleg asta "verifici în points system dacă g gpassword ni e trie să dea retirn". Poti sa-mi explici te rog?


Zombie Plague Legendary 8.1
Server original, unicat in Romania.

0 0
  
Back to top
View user's profile Send private message
destroi112

[DEV]



Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042, Topics: 119
Location: ---------

Reputation: 515.9
Votes: 118

   
Post Posted: 18-09-2016, 11:04:13 | Translate post to: ... (Click for more languages)

Am scris de pe telefon si mi-a facut cuvintele praf.Mai pe romaneste el poate pune asa [ bind c "messagemod INTRODUCETI_PAROLA" ] atunci cand apasa c o sa i dea sa bage parola pentru slot chiar daca el nu l-a cumparat si asa il cumpara free.De acea ar trebui sa verifici ca el a trecut prin meniu si sa fi cumparat slot.


Retired from Amxmodx

0 0
  
Back to top
View user's profile Send private message
Legendary.
[Banned user]


Banned


Status: Offline
(since 11-01-2017 15:00)
Joined: 04 Aug 2016
Posts: 110, Topics: 18
Location: Bermudes Triangle

Reputation: 6.3
Votes: 6

 
Post Posted: 18-09-2016, 12:51:29 | Translate post to: ... (Click for more languages)

Hmm.. Cum verific daca a trecut prin meniu si sa-i dea doar daca a facut-o?


Zombie Plague Legendary 8.1
Server original, unicat in Romania.

0 0
  
Back to top
View user's profile Send private message
destroi112

[DEV]



Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042, Topics: 119
Location: ---------

Reputation: 515.9
Votes: 118

   
Post Posted: 18-09-2016, 17:41:13 | Translate post to: ... (Click for more languages)

In points_sistem sau cum ai tu publicul care seteaza parola pui.
if(g_Password[id])
return PLUGIN_HANDLED;
si din handler-ul de la shop unde cumperi slotul
scoti // din fata //g_Password[id] = true;



Retired from Amxmodx

0 0
  
Back to top
View user's profile Send private message
Legendary.
[Banned user]


Banned


Status: Offline
(since 11-01-2017 15:00)
Joined: 04 Aug 2016
Posts: 110, Topics: 18
Location: Bermudes Triangle

Reputation: 6.3
Votes: 6

 
Post Posted: 19-09-2016, 18:08:40 | Translate post to: ... (Click for more languages)

Am facut ce ai zis tu si mi-am facut timp sa si probez.
Daca imi schimb numele cand sunt pe server imi raman punctele de pe primul nume chiar si daca dau reconnect
Daca scriu messagemode INTRODUCETI_PAROLA in consola merge sa iau slot free.
Cum rezolv?



Zombie Plague Legendary 8.1
Server original, unicat in Romania.

0 0
  
Back to top
View user's profile Send private message
destroi112

[DEV]



Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042, Topics: 119
Location: ---------

Reputation: 515.9
Votes: 118

   
Post Posted: 19-09-2016, 18:33:16 | Translate post to: ... (Click for more languages)

Ti-am spus inainte de ce raman trebuie in client_disconect sa setezi punctele pe 0 dupa ce le salvezi sa nu ramana la alt client - Si cu messagemod ti-am explicat mai sus.


Retired from Amxmodx

0 0
  
Back to top
View user's profile Send private message
Legendary.
[Banned user]


Banned


Status: Offline
(since 11-01-2017 15:00)
Joined: 04 Aug 2016
Posts: 110, Topics: 18
Location: Bermudes Triangle

Reputation: 6.3
Votes: 6

 
Post Posted: 20-09-2016, 12:39:49 | Translate post to: ... (Click for more languages)

Păi îți zisăi ca am făcut deja tot ce ai zis. Cat despre statul punctelor pe 0 e o problemă. Nativul set user points doar adaugă puncte la jucători (points[id] += suma), am încercat points[id] = 0 dar se pare ca nu merge. Cum setez pe 0?


Zombie Plague Legendary 8.1
Server original, unicat in Romania.

0 0
  
Back to top
View user's profile Send private message
destroi112

[DEV]



Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042, Topics: 119
Location: ---------

Reputation: 515.9
Votes: 118

   
Post Posted: 20-09-2016, 14:07:46 | Translate post to: ... (Click for more languages)

Modifici ->
Code:

public client_disconnect(id)
{
   if (g_GodMode[id]) g_GodMode[id] = false;
   if (g_Damage[id]) g_Damage[id] = false;
   if (g_Damage2[id]) g_Damage2[id] = false;
   if (g_Password[id]) g_Password[id] = false;

   get_user_name(id, g_playername[id], charsmax(g_playername[]))
   salveaza_datele2(id)
}

in
Code:

public client_disconnect(id)
{
   if (g_GodMode[id]) g_GodMode[id] = false;
   if (g_Damage[id]) g_Damage[id] = false;
   if (g_Damage2[id]) g_Damage2[id] = false;
   if (g_Password[id]) g_Password[id] = false;

   get_user_name(id, g_playername[id], charsmax(g_playername[id]))
   salveaza_datele2(id) //salvezi datele
   Points[id] = 0;//dupa ce am salvat datele userului ii setam pe 0 datele pentru a nu ramane cand da reconect cu alt nick
}

Destul de simplu...



Retired from Amxmodx

0 0
  
Back to top
View user's profile Send private message

  Topic locked


Topic is closed, you cannot post any messages in it anymore

Locked by -P!C@-, 26 February 2017 09:55



 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Plugins  
Go to page 1, 2  Next    


The time now is 11-01-2025, 00:22:37
Copyright info

Based on phpBB ro/com
B

 
 
 







I forgot my password


This message appears only once, so
like us now until it's too late ! :D
x