General. Posted June 28, 2013 Posted June 28, 2013 Salut, astazi va voi prezenta un tutorial pentru serverele de stunt care va da arme printr-o simpla comanda! [PS : N-am poze, nu mai am pawno sau SA:MP in PC] [#1] Deschidem pawno.exe localizat in server\pawno! [#2] Creeam un nou document, apasand pe un buton localizat in stanga sus! [#3] Dupa ce am facut noul document, cautam "public OnPlayerCommandText" [#4] Dupa ce am gasit OnPlayerCommandText, creeam o noua comanda(puteti s-o copiati pe cea care am facut-o eu) public OnPlayerCommandText { if(strcmp("/tutorialarme", cmdtext, true, 5) == 0) { ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Arme pentru tutorial", "1. Deagle\n2.M4\n3.AK-47", "Alege", "Inchide"); return 1; } } Aceasta comanda o sa va arate un dialog similar cu /help de pe samp.bugged.ro! [#5] Apasam pe CTRL+F si cautam "OnDialogResponse". [#6] Sub el copiati urmatoarea comanda : if(dialogid==1 && response==1) { switch(listitem) { case 0: { GivePlayerWeapon(playerid, 24, 999); SendClientMessage(playerid, COLOR_PURPLE, "Ai primit un Desert Eagle"); } case 1: { GivePlayerWeapon(playerid, 31, 999); SendClientMessage(playerid, COLOR_PURPLE, "Ai primit un M4A1"); } case 2: { GivePlayerWeapon(playerid, 30, 999); SendClientMessage(playerid, COLOR_PURPLE, "Ai primit un AK-47!"); } } return 0; } [#7] Apasam F5 si asteptam sa compileze totul, dupa ce s-a compilat, este gata totul si puteti pune asta ca un FS sau un GM! Tutorial by - General. Quote
General. Posted July 3, 2013 Author Posted July 3, 2013 @ Genial, eu sunt incepator in scripting pt. SA:MP Quote
Micheal_Scofield Posted July 3, 2013 Posted July 3, 2013 @ Genial, eu sunt incepator in scripting pt. SA:MP Persevereaza, poti ajunge "mare". Quote
AndreiRobert Posted August 16, 2013 Posted August 16, 2013 Foarte bun tutorialul ,se putea si mai bine Quote
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.