InceMan Posted September 9, 2018 Posted September 9, 2018 Tutorial/Ghid: Anti Dialog Hider Dupa cum stiti, nu am mai postat de ceva timp aici, si am decis sa imi reiau activitatea, cu ceva nu foarte greu, dar folositor. Multi isi pun intrebarea, cum rezolv Dialog Hider-ul, ei bine, eu v-am facut un tutorial in cateva linii ce va ajuta in gamemode-ul vostru. Citat #define function%0(%1) forward%0(%1);public%0(%1) new dialogID[MAX_PLAYERS], kickWarnings[MAX_PLAYERS]; stock GetName(playerid) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, MAX_PLAYER_NAME); return name; } public OnPlayerConnect(playerid) { dialogID[playerid] = -1; kickWarnings[playerid] = 0; return true; } public OnPlayerDisconnect(playerid, reason) { dialogID[playerid] = -1; kickWarnings[playerid] = 0; return true; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogID[playerid] == -1) { new string[128]; kickWarnings[playerid] ++; if(kickWarnings[playerid] < 3) { format(string, sizeof string, "%s may be using Dialog Hider (%d warnings).", GetName(playerid), kickWarnings[playerid]); SendClientMessageToAll(-1, string); } else { format(string, sizeof string, "%s has been kicked for Dialog Hider (3 warnings).", GetName(playerid)); SendClientMessageToAll(-1, string); Kick(playerid); } return true; } dialogID[playerid] = -1; switch(dialogid) { // restul } return true; } function ShowPlayerDialogEx(playerid, dialogid, dialogtype, title[], string[], btn1[], btn2[]) { dialogID[playerid] = dialogid; return ShowPlayerDialog(playerid, dialogid, dialogtype, title, string, btn1, btn2); } Sper ca v-a fost de ajutor, nu ezitati un +1 daca v-a placut. 1 FiveGame Lands Pawno Developer, Mapping , Scripter Since 2016
InceMan Posted February 28, 2019 Author Posted February 28, 2019 Acum 1 oră, Alex Alexandru a spus: // restul adica ce? :D restul la ce ai tu in OnDialogResponse FiveGame Lands Pawno Developer, Mapping , Scripter Since 2016
Alex Alexandru Posted February 28, 2019 Posted February 28, 2019 (edited) 4 hours ago, Geani said: restul la ce ai tu in OnDialogResponse Adica trebuie sa adaug absout toate dialog-urile acolo? Si cum trebuiesc adaugate frate? Gen asa: //restul case DIALOG_SKIN: { if(PlayerInfo[playerid][pSkins][id] == -1) // blablabla } Cat despre functia asta function ShowPlayerDialogEx Eu in GM folosesc doar ShowPlayerDialog, trebuie sa le trec toate pe Ex? Edited February 28, 2019 by Alex Alexandru
InceMan Posted March 16, 2019 Author Posted March 16, 2019 La 28.02.2019 la 14:05, Alex Alexandru a spus: Adica trebuie sa adaug absout toate dialog-urile acolo? Si cum trebuiesc adaugate frate? Gen asa: //restul case DIALOG_SKIN: { if(PlayerInfo[playerid][pSkins][id] == -1) // blablabla } Cat despre functia asta function ShowPlayerDialogEx Eu in GM folosesc doar ShowPlayerDialog, trebuie sa le trec toate pe Ex? poti sa scoti acel Ex FiveGame Lands Pawno Developer, Mapping , Scripter Since 2016
nobilzeusAdv Posted January 2, 2020 Posted January 2, 2020 acest tutorial este facut de ERA, copy paste.. macar pune credite
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now