Wysłany: 2013-09-13, 17:29
dany9211
Wiek: 33 Na forum: 4970 dni Posty: 10
Piwa : 1
witam postanowilem zrobic pewien kod na otwieranie i zamykanie bram za pomoca gui ale cos nie dziala ( nie ma rezultatow ) oto kod
#include <a_samp>
new sg;
new brama;
public OnGameModeInit()
{
CreateObject(3749, 2085.304199, 1593.544433, 15.671875, 0.000000, 0.000000, -90.200012, 85.000000);
CreateObject(987, 2085.530029, 1543.441406, 9.452310, 0.000000, 0.000000, 0.000000, 85.000000);
CreateObject(987, 2085.449218, 1555.233276, 9.452310, 0.000000, 0.000000, -89.015998, 85.000000);
CreateObject(987, 2085.217529, 1567.217285, 9.452310, 0.000000, 0.000000, -89.015998, 85.000000);
CreateObject(987, 2085.017822, 1579.185546, 9.452310, 0.000000, 0.000000, -89.015998, 85.000000);
CreateObject(987, 2084.962158, 1585.201660, 9.452310, 0.000000, 0.000000, -89.015998, 85.000000);
CreateObject(987, 2084.506347, 1635.995971, 9.548310, 0.000000, 0.000000, -89.015998, 85.000000);
CreateObject(987, 2084.642333, 1626.915405, 9.548310, 0.000000, 0.000000, -89.015998, 85.000000);
CreateObject(987, 2084.874511, 1614.930908, 9.548310, 0.000000, 0.000000, -89.015998, 85.000000);
CreateObject(987, 2096.380126, 1635.854614, 9.596316, 0.000000, 0.000000, -180.304122, 85.000000);
CreateObject(987, 2108.356445, 1635.854614, 9.596316, 0.000000, 0.000000, -180.304122, 85.000000);
CreateObject(987, 2120.332763, 1635.822631, 9.596316, 0.000000, 0.000000, -180.304122, 85.000000);
CreateObject(987, 2132.292236, 1635.726684, 9.596316, 0.000000, 0.000000, -180.304122, 85.000000);
CreateObject(11490, 2104.815917, 1618.674804, 9.844309, 0.000000, 0.000000, 0.000000, 85.000000);
CreateObject(11491, 2104.805908, 1607.651123, 11.332304, 0.000000, 0.000000, 0.000000, 85.000000);
CreateObject(980, 2121.056640, 1614.426757, 14.396311, 88.367996, 0.000000, 0.000000, 85.000000);
sg = CreatePickup(1314, 1, 2089.4607, 1586.0435, 10.8203, -1);
brama = CreateObject(980, 2084.638916, 1593.651123, 12.668309, 0.000000, 0.000000, 89.536003, 85.000000);
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == sg)
ShowPlayerDialog(playerid,0, DIALOG_STYLE_LIST, "Baza_SG", "Otworz Brame\nZamknij Brame\nCMD_SG\nNabor graczy", "Wybierz", "Zamknij!");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 123)
{
if(response)
{
switch(listitem)
{
case 0:
{
MoveObject(brama,2084.638916, 1593.651123, 7.068309,3);
}
case 1:
{
MoveObject(brama,2084.638916, 1593.651123, 12.668309,3);
}
case 2:
{
new string[512];
strcat(string,"ble ble ble\n");
strcat(string,"ble ble ble\n");
ShowPlayerDialog(playerid,22,0,"Lista 10 ostatnich zmian na serwerze:",string,"Wybierz","Zamknij");
}
}
}
}
return 1;
}
dla os ktora rozwiaze moj problem czeka zimne piwko
Wysłany: 2013-09-13, 18:01
Rumun
Wiek: 30 Na forum: 5235 dni Posty: 316
Nick w MP: Rumun
Piwa : 25
Mo?e by? tak wsz?dzie ustawi? takie samo id dialog?w ?
Wysłany: 2013-09-13, 18:08
Sillence
Wiek: 26 Na forum: 5157 dni Posty: 1514
Nick w MP: Sillence
Piwa : 1517
dany9211 ,
Kod: #include <a_samp>
new sg;
new brama;
public OnGameModeInit()
{
CreateObject(3749, 2085.304199, 1593.544433, 15.671875, 0.000000, 0.000000, -90.200012, 85.000000);
CreateObject(987, 2085.530029, 1543.441406, 9.452310, 0.000000, 0.000000, 0.000000, 85.000000);
CreateObject(987, 2085.449218, 1555.233276, 9.452310, 0.000000, 0.000000, -89.015998, 85.000000);
CreateObject(987, 2085.217529, 1567.217285, 9.452310, 0.000000, 0.000000, -89.015998, 85.000000);
CreateObject(987, 2085.017822, 1579.185546, 9.452310, 0.000000, 0.000000, -89.015998, 85.000000);
CreateObject(987, 2084.962158, 1585.201660, 9.452310, 0.000000, 0.000000, -89.015998, 85.000000);
CreateObject(987, 2084.506347, 1635.995971, 9.548310, 0.000000, 0.000000, -89.015998, 85.000000);
CreateObject(987, 2084.642333, 1626.915405, 9.548310, 0.000000, 0.000000, -89.015998, 85.000000);
CreateObject(987, 2084.874511, 1614.930908, 9.548310, 0.000000, 0.000000, -89.015998, 85.000000);
CreateObject(987, 2096.380126, 1635.854614, 9.596316, 0.000000, 0.000000, -180.304122, 85.000000);
CreateObject(987, 2108.356445, 1635.854614, 9.596316, 0.000000, 0.000000, -180.304122, 85.000000);
CreateObject(987, 2120.332763, 1635.822631, 9.596316, 0.000000, 0.000000, -180.304122, 85.000000);
CreateObject(987, 2132.292236, 1635.726684, 9.596316, 0.000000, 0.000000, -180.304122, 85.000000);
CreateObject(11490, 2104.815917, 1618.674804, 9.844309, 0.000000, 0.000000, 0.000000, 85.000000);
CreateObject(11491, 2104.805908, 1607.651123, 11.332304, 0.000000, 0.000000, 0.000000, 85.000000);
CreateObject(980, 2121.056640, 1614.426757, 14.396311, 88.367996, 0.000000, 0.000000, 85.000000);
sg = CreatePickup(1314, 1, 2089.4607, 1586.0435, 10.8203, -1);
brama = CreateObject(980, 2084.638916, 1593.651123, 12.668309, 0.000000, 0.000000, 89.536003, 85.000000);
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == sg)
ShowPlayerDialog(playerid,0, DIALOG_STYLE_LIST, "Baza_SG", "Otworz Brame\nZamknij Brame\nCMD_SG\nNabor graczy", "Wybierz", "Zamknij!");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 0)
{
if(response)
{
switch(listitem)
{
case 0:
{
MoveObject(brama,2084.638916, 1593.651123, 7.068309,3);
}
case 1:
{
MoveObject(brama,2084.638916, 1593.651123, 12.668309,3);
}
case 2:
{
new string[512];
strcat(string,"ble ble ble\n");
strcat(string,"ble ble ble\n");
ShowPlayerDialog(playerid,22,0,"Lista 10 ostatnich zmian na serwerze:",string,"Wybierz","Zamknij");
}
}
}
}
return 1;
}
Zobacz tak.
Wysłany: 2013-09-13, 19:01
Rumun
Wiek: 30 Na forum: 5235 dni Posty: 316
Nick w MP: Rumun
Piwa : 25
A nie powinno by?
Kod: ShowPlayerDialog(playerid,0,0,"Lista 10 ostatnich zmian na serwerze:",string,"Wybierz","Zamknij");
?
Wysłany: 2013-09-13, 19:17
IgrexolonO
Wiek: 34 Na forum: 6809 dni Posty: 1386
Piwa : 1062
"Rumun" napisał/a :A nie powinno by?
Kod: ShowPlayerDialog(playerid,0,0,"Lista 10 ostatnich zmian na serwerze:",string,"Wybierz","Zamknij");
?
Nie. Ten dialog nie jest w og?le supportowany przez jego skrypt.
Kod szczypiornisty jest poprawny.
Wysłany: 2013-09-13, 23:44
dany9211
Wiek: 33 Na forum: 4970 dni Posty: 10
Piwa : 1
Kod dziala.. i pomyslec ze string zrobil bybla ktorego nie dopatrzylem.
dzieki ci Sillence i IgrexolonO stawiam po piwku!
Tagi: pickup :: respone :: nie :: dziala
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: