Helpe me
#1

Hi guys, I wonder, how do I create an invitation system. / Bring id, then the player has the option to accept or not! I'm asking you for help, because you handle more!
Reply
#2

Invitation, so do you mean teleporting the player invited to your position or what do you mean?
Reply
#3

/ Bring id, the player = id has the option to accept if he wants to be pulled or not, and if so, he is taken to the player that used the command.
Reply
#4

Helpe me someone?
Reply
#5

Well, why won't you try to write it yourself? Then if you encounter some problems ask here for help, showing your code.
Reply
#6

alright
Reply
#7

That's how I want it

trazer = pull

CMD:trazer(playerid,params[])
{
new id;
if(sscanf(params, "d", id)) return SendClientMessage(playerid, -1, "[ ERRO ] /trazer [id]");
/*
And here, it sends a dialog pro id, and the id has the option to accept or not, if it accepts, it is taken to
the player who used the command!
*/
new nome[MAX_PLAYER_NAME] GetPlayerName(playerid, nome, sizeof(nome));
new str[128];
format(str, sizeof(str), "O jogador %s estб pedindo autorizaзгo para te puxa\nVocк aceita?, nome);
ShowPlayerDialog(id, DIALOG_PULL, DIALOG_STYLE_MSGBOX, "", str, "Sim","nгo");
return 1;
}


There in the dialogue, if he press yes, he is taken to the guy who sent the invitation, if not, he stays in place!

sorry for my english,
I'm going to take a course, I have to learn the most used language
Reply
#8

I have in mind a system where everybody can invite player and then he selects from a dialog or something which ones to accept, but that'd take a lot of time so we'll do version lite. It's lite - lite as we don't have y_dialog with y_inline.

1. Create a global array for all players, say: Invites[MAX_PLAYERS] = { -1, ... }
2. On /trazer set "Invites" for target player to inviter id
3. Show player "id" a dialog
4. OnDialogResponse if accepted teleport playerid to inviter id
5. Reset Invites on accept and on cancel

Of course it can be abused, because you can spam the other user with dialogs so I would not recommend it.
Reply
#9

no bro.


So: you and the id, I am the playerid, I sent an invitation to you asking if you accept I came to where I am, if you accept you come, otherwise it will not come!
Reply
#10

Thiago, kk vocк veio pedir ajuda aqui nos gringo pф?
kkasdasdkajsd

Mano usa uma variбvel global. isso й tudo, tipo tu precisa saber manipular as variбveis
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)