Cosma Claudiu Posted April 17, 2014 Share Posted April 17, 2014 (edited) Salutare tuturor scripterilor, astazi o sa va arat cum se face o comanda /stats folosind un dialog : Rezultatul : http://i61.tinypic.com/fcsle9.png Sa incepem cu inceputul : Pasul 1 : Vom scrie la inceput : #include <a_samp> (esential) #include <zcmd> (ca sa putem face o comanda folosind CMD:...) Pasul 2 : Ne gandim ce sa apara cand tastam /stats. Eu ma gandesc sa arate daca ai Admin, Helper, Premium si cate Puncte premium ai, deci vom defini "Admin", "Helper", "Premium" si "PremiumPoints" folosind sistemul vostru de save/load. Pasul 3 : Vom incepe sa facem comanda : CMD:stats(playerid) { new Admin = PlayerInfo[playerid][pAdmin]; (Exact ce am spus mai sus la Pasul 2, vom defini Admin, Heleper, etc... folosind ceea ce avem in save/load daca aveti, daca nu, nu puteti face ceea ce vreau eu sa fac) new Helper = PlayerInfo[playerid][pHelper]; new Premium = PlayerInfo[playerid][pPremium]; new PremiumPoints = PlayerInfo[playerid][pPremiumPoints]; (Vom folosi 1 pentru adevarat si 0 pentru fals) new String[250]; (Uitati-va pe wiki daca nu stiti ce cauta String-ul pe aici) new String2[250]; new String3[250]; new String4[250]; if(Admin == 1) { format(String2,(sizeof(String2)), "{FFFFFF}Yes"); } else { format(String2,(sizeof(String2)), "{FFFFFF}No"); } if(Helper == 1) { format(String2,(sizeof(String2)), "{FFFFFF}Yes"); } else { format(String2,(sizeof(String2)), "{FFFFFF}No"); } if(Premium == 1) { format(String2,(sizeof(String2)), "{FFFFFF}Yes"); } else { format(String2,(sizeof(String2)), "{FFFFFF}No"); } format(String,(sizeof(String)), "{00FF00}Admin : %s\n{00FF00}Helper : %s\n{00FF00}Premium : %s\n{00FF00}Premium Points : {FFFFFF}%d", String2, String3, String4, PremiumPoints); (sursa wiki : format) ShowPlayerDialog(playerid, DIALOG_STATS, DIALOG_STYLE_MSGBOX, "{00FF00}Statistics : ", String, "OK", "Cancel"); (sursa wiki : DIALOG) return 1; } Pasul 4 : Testam comanda! Pasul 5 : Ne spunem parerea despre munca lui Efreed! Pasul 6 : Verificam daca chiar este munca lui Efreed : http://i.minus.com/iBDPQ2LHxABn6.bmp Edited April 17, 2014 by Efreed 1 Quote Link to comment Share on other sites More sharing options...
H o f f n e r Posted April 17, 2014 Share Posted April 17, 2014 Omg nu am inteles nimic! Dar cred că e ceva interesant :lol: ;) Quote Link to comment Share on other sites More sharing options...
ThisIsSparta Posted April 17, 2014 Share Posted April 17, 2014 Luata dintr-un gm. clar. Quote Link to comment Share on other sites More sharing options...
GeoRg3 Posted April 17, 2014 Share Posted April 17, 2014 Un tutorial cu stats 100% nu exista, ca toate serverele au alte PlayerInfo. Quote Link to comment Share on other sites More sharing options...
KeenStep Posted April 17, 2014 Share Posted April 17, 2014 cam slab tutorialul debea daca am inteles ceva Quote Link to comment Share on other sites More sharing options...
Cosma Claudiu Posted April 17, 2014 Author Share Posted April 17, 2014 O sa fac un edit cu poze, mai clar si @Generaltwo., nu este luat dintr-un gm, este o creatie proprie! Quote Link to comment Share on other sites More sharing options...
StefanStef Posted May 16, 2014 Share Posted May 16, 2014 daca ai putea face mai multe tutoriale gen: set sawn, sistem register/login, factiuni.........oricum ai +1. Quote Link to comment Share on other sites More sharing options...
DanielBroather Posted May 16, 2014 Share Posted May 16, 2014 aiurea. Quote Link to comment Share on other sites More sharing options...
Edi Posted May 25, 2014 Share Posted May 25, 2014 Un tutorial foarte simplu. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.