Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new bool:Vedes[MAX_PLAYERS];
- new SiuloTuoktis[MAX_PLAYERS];
- #define VESTUVIU_GUI 1
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == VESTUVIU_GUI){
- new pID = SiuloTuoktis[playerid],stringas[128],Name1[24],Name2[24];
- GetPlayerName(playerid, Name1, 24);
- GetPlayerName(pID, Name2, 24);
- if(response)
- {
- format(stringas, 128, "%s ir %s Ką tik susituokė! :)", Name1,Name2);
- SendClientMessageToAll(-1, stringas);
- Vedes[pID] = true;
- Vedes[playerid] = true;
- return 1;
- }
- if(!response)
- {
- format(stringas, 128, "%s nesutiko su jūsų pasiūlymu", Name1);
- SendClientMessage(pID, -1, stringas);
- SendClientMessage(playerid, -1, "Nesutikote");
- return 1;
- }
- }
- return 1;
- }
- CMD:vesti(playerid,string[]){
- new pID, stringas[128],Name1[24],Name2[24];
- if(sscanf(string,"u",pID)) return SendClientMessage(playerid, -1, "Komandos naudojimas: /vesti <<žaidėjo vardas/ID");
- if(IsPlayerConnected(pID)) return SendClientMessage(playerid, -1, "Klaida: Tokio žaidėjo nėra, arba žaidėjas neprisijungęs");
- if(pID == playerid) return SendClientMessage(playerid, -1, "Klaida: Savęs vesti negalite");
- if(Vedes[pID]) return SendClientMessage(playerid, -1, "Žaidėjas jau susituokęs");
- SiuloTuoktis[pID] = playerid;
- GetPlayerName(playerid, Name1, 24);
- GetPlayerName(pID, Name2, 24);
- format(stringas, 128, "Pasipiršote %s", Name2);
- SendClientMessage(playerid, -1, stringas);
- format(stringas, 128, "Žaidėjas %s jums pasipiršo :)", Name1);
- ShowPlayerDialog(pID, VESTUVIU_GUI, DIALOG_STYLE_MSGBOX, "Vestuvės :)", stringas, "Taip :)", "Ne :(");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement