Wysłany: 2012-10-01, 15:56
__.A.__
Wiek: 30 Na forum: 5170 dni Posty: 151
Piwa : 855
Witam , posiadam mape PP i pr?buje ju? od d?u?ego czasu zmieni? idzdo ,
poniewa? gdy wpisuje /idzdo id to wysy?am graczowi zaproszenie co mu wyskakuje w gugi wiadomo?? czy chce zakceptowa? zaproszenie a ja chce zmieni? na to ?e wiadomo?c graczowi wy?wietli sie na czacie i gracz musi wpisa? /akceptp i zaproszenie zostaje przyj?te.
za pomoc oczywi?cie piwo , respekt..
Wysłany: 2012-10-01, 16:13
ToxiC.
Wiek: 28 Na forum: 5246 dni Posty: 3792
Piwa : 8590
Daj Komnede /IdzDo i OnDialogResponse
Wysłany: 2012-10-01, 18:24
__.A.__
Wiek: 30 Na forum: 5170 dni Posty: 151
Piwa : 855
Kod: if(dialogid == DIALOG_TP)
{
new PlayerTP;
for(new PlayerId = 0; PlayerId < MAX_PLAYERS; PlayerId++)
{
if(IsPlayerConnected(PlayerId) && Player[PlayerId][TPTo] == playerid)
{
PlayerTP = PlayerId;
break;
}
}
if(response)
{
TeleportPlayer(PlayerTP, playerid);
SendClientMessage(PlayerTP, COLOR_Fioletowy, " (info) Gracz zaakceptowa? zaproszenie.");
}
else
{
Player[playerid][TPRefused][PlayerTP] = true;
SendClientMessage(PlayerTP, COLOR_ERROR, " (info) Gracz odrzuci? zaproszenie.");
}
Player[PlayerTP][TPTo] = INVALID_PLAYER_ID;
return 1;
}
Kod: COMMAND:idzdo(playerid, params[])
{
new PlayerId;
if(sscanf(params, "u", PlayerId))
{
SendClientMessage(playerid, COLOR_ERROR, " (b??d) U?yj: /idzdo [id gracza]");
return 1;
}
if(PlayerId == INVALID_PLAYER_ID)
{
SendClientMessage(playerid, COLOR_ERROR, " (b??d) Nie ma gracza o podanym ID.");
return 1;
}
if(playerid == PlayerId)
{
SendClientMessage(playerid, COLOR_ERROR, " (b??d) Poda?e?/a? swoje id!");
return 1;
}
if(Player[PlayerId][TPRefused][playerid])
{
SendClientMessage(playerid, COLOR_ERROR, " (b??d) Ten gracz odrzuci? zaproszenie.");
return 1;
}
if(EventPlayers[PlayerId])
{
SendClientMessage(playerid, COLOR_ERROR, " (b??d) Ten gracz jest na evencie.");
return 1;
}
GoTo(playerid, PlayerId);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
GoTo(PlayerId, ToPlayerId)
{
Player[PlayerId][TPTo] = ToPlayerId;
new String[255];
format(String, sizeof(String), "Gracz %s (%d) chce si? do ciebie teleportowa?\nWyra?asz na to zgod??", Player[PlayerId][Name], PlayerId);
ShowPlayerDialog(ToPlayerId, DIALOG_TP, DIALOG_STYLE_MSGBOX, "Teleport", String, "Akceptuj", "Odrzu?");
SendClientMessage(PlayerId, COLOR_Fioletowy, " (info) Zaproszenie zosta?o wys?ane.");
Player[PlayerId][ClickedPlayer] = -1;
}
Wysłany: 2012-10-01, 20:35
Bartek23071993
WiceWersa
Wiek: 29 Na forum: 5223 dni Posty: 250
Nick w MP: WiceWersa
Piwa : 2429
Usu?
Kod: if(dialogid == DIALOG_TP)
{
new PlayerTP;
for(new PlayerId = 0; PlayerId < MAX_PLAYERS; PlayerId++)
{
if(IsPlayerConnected(PlayerId) && Player[PlayerId][TPTo] == playerid)
{
PlayerTP = PlayerId;
break;
}
}
if(response)
{
TeleportPlayer(PlayerTP, playerid);
SendClientMessage(PlayerTP, COLOR_GREEN, " [PES info] Gracz zaakceptowa? zaproszenie.");
}
else
{
Player[playerid][TPRefused][PlayerTP] = true;
SendClientMessage(PlayerTP, COLOR_ERROR, " [PES info] Gracz odrzuci? zaproszenie.");
}
Player[PlayerTP][TPTo] = INVALID_PLAYER_ID;
return 1;
}
I dodaj komende
Kod: COMMAND:akcept(playerid) {
new PlayerTP;
for(new PlayerId = 0; PlayerId < MAX_PLAYERS; PlayerId++) {
if(IsPlayerConnected(PlayerId) && Player[PlayerId][TPTo] == playerid) {
PlayerTP = PlayerId;
break;
}
TeleportPlayer(PlayerTP, playerid);
SendClientMessage(PlayerTP, COLOR_GREEN, " [PES info] Gracz zaakceptowa? zaproszenie.");
Player[PlayerTP][TPTo] = INVALID_PLAYER_ID;
return 1;
}
return 1;
}
I popraw funkcje GoTo
Kod: GoTo(PlayerId, ToPlayerId) {
Player[PlayerId][TPTo] = ToPlayerId;
new String[255];
format(String, sizeof(String), "{FFFFFF}Gracz {0080F0}%s |%d| {FFFFFF}chce si? do ciebie teleportowa?\nWyra?asz na to zgod?? Je?li tak to wpisz /akceptp", Player[PlayerId][Name], PlayerId);
SendClientMessage(ToPlayerId, COLOR_GREEN, String);
SendClientMessage(PlayerId, COLOR_GREEN, "›› |info| Zaproszenie zosta?o wys?ane.");
Player[PlayerId][ClickedPlayer] = -1;
}
Mog?em si? pomyli? wi?c w razie problem?w pisz. Oldschool posty nabijasz ?!
Wysłany: 2012-10-02, 07:40
__.A.__
Wiek: 30 Na forum: 5170 dni Posty: 151
Piwa : 855
Nie dzia?? ci?gle tereportuje id 0 nawet gdy nie wys?a?em do danej osoby zaproszenia.
Wysłany: 2012-10-02, 16:16
P.Devil
Wiek: 29 Na forum: 5930 dni Posty: 104
Piwa : 603
Zmie? komend? akcept na t?. Powinno dzia?a?.
Kod: COMMAND:akcept(playerid) {
new PlayerTP = -1;
for(new PlayerId = 0; PlayerId < MAX_PLAYERS; PlayerId++) {
if(IsPlayerConnected(PlayerId) && Player[PlayerId][TPTo] == playerid) {
PlayerTP = PlayerId;
break;
}
if(PlayerTP == -1)
return SendClientMessage(PlayerTP, COLOR_GREEN, " [PES info] Nikt nie chce si? do Ciebie teleportowa?.");
TeleportPlayer(PlayerTP, playerid);
SendClientMessage(PlayerTP, COLOR_GREEN, " [PES info] Gracz zaakceptowa? zaproszenie.");
Player[PlayerTP][TPTo] = INVALID_PLAYER_ID;
return 1;
}
return 1;
}
Wysłany: 2012-10-02, 19:59
Bartek23071993
WiceWersa
Wiek: 29 Na forum: 5223 dni Posty: 250
Nick w MP: WiceWersa
Piwa : 2429
__.A.__ , bardzo dziwne ?e nie dzia?a. Specjalnie sprawdzi?em i by?o wszystko ok.
Wysłany: 2012-10-03, 07:22
__.A.__
Wiek: 30 Na forum: 5170 dni Posty: 151
Piwa : 855
sprawdza??? to z jedn? osob? zapewne co mia?a id 0 bo zawsze teleportuje to id
P.Devil , dzi?ki
Podpis
new map test beta:
ip serwera: 80.72.36.203:4056
Tagi: idzdo
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: