Wysłany: 2013-05-31, 16:14
panmajster
Wiek: 42 Na forum: 4787 dni Posty: 154
Nick w MP: NieWazne
Piwa : 124
Witajcie
Nie wiem dlaczego ale nie da si? za?adowa? towaru +10 ton [od 10 do 30], poniewa? wy?wietla informacja ?e nie mo?na a powinno by? tak ?e jak jestem na koncie vip to si? da. Zrobi?em taki kod :
Kod:
if(dialogid == T_DIALOG+1)
{
if(response)
{
SetPVarInt(playerid, "T_Block", 0);
if(!IsNumeric(inputtext))
{
ShowPlayerDialog(playerid, T_DIALOG+1, DIALOG_STYLE_INPUT, "?adowanie towaru", "Wpisz ile ton chcesz przetransportowa? (max. 10 [vip max. 30]):", "OK", "Anuluj");
return 1;
}
if(1 > strval(inputtext) || strval(inputtext) > 10 || !strlen(inputtext))
{
SendClientMessage(playerid, KOLOR, "Nie mo?esz za?adowa? wi?cej ni? 10 ton");
ShowPlayerDialog(playerid, T_DIALOG+1, DIALOG_STYLE_INPUT, "?adowanie towaru", "Wpisz ile ton chcesz przetransportowa? (max. 10 [vip max. 30]):", "OK", "Anuluj");
return 1;
}
else
{
if(PlayerInfo[playerid][gPremium]==1)
if(10 > strval(inputtext) || strval(inputtext) > 30 || !strlen(inputtext))
SendClientMessage(playerid, KOLOR, "Czekaj trwa ?adowanie towaru...");
SetPVarInt(playerid, "T_Block", 1);
SetPVarInt(playerid, "T_Ton", strval(inputtext));
SetPVarInt(playerid, "T_Timer", SetTimerEx("T_Laduj", 1000, 1, "dd", playerid, GetPlayerVehicleID(playerid)));
return 1;
}
Ale wy?wietla info :
Kod:
Nie mo?esz za?adowa? wi?cej ni? 10 ton
Co tu jest nie tak ?
Daje piwka
Pozdrawiam
Wysłany: 2013-05-31, 16:55
Sillence
Wiek: 26 Na forum: 5157 dni Posty: 1514
Nick w MP: Sillence
Piwa : 1517
panmajster , Zobacz tak:
Kod: if(dialogid == T_DIALOG+1)
{
if(response)
{
SetPVarInt(playerid, "T_Block", 0);
if(!IsNumeric(inputtext))
{
ShowPlayerDialog(playerid, T_DIALOG+1, DIALOG_STYLE_INPUT, "?adowanie towaru", "Wpisz ile ton chcesz przetransportowa? (max. 10 [vip max. 30]):", "OK", "Anuluj");
return 1;
}
if(1 > strval(inputtext) || strval(inputtext) > 10 || !strlen(inputtext))
{
SendClientMessage(playerid, KOLOR, "Nie mo?esz za?adowa? wi?cej ni? 10 ton");
ShowPlayerDialog(playerid, T_DIALOG+1, DIALOG_STYLE_INPUT, "?adowanie towaru", "Wpisz ile ton chcesz przetransportowa? (max. 10 [vip max. 30]):", "OK", "Anuluj");
return 1;
}
if(PlayerInfo[playerid][gPremium]==1){
if(10 > strval(inputtext) || strval(inputtext) > 30 || !strlen(inputtext)){
SendClientMessage(playerid, KOLOR, "Czekaj trwa ?adowanie towaru...");
SetPVarInt(playerid, "T_Block", 1);
SetPVarInt(playerid, "T_Ton", strval(inputtext));
SetPVarInt(playerid, "T_Timer", SetTimerEx("T_Laduj", 1000, 1, "dd", playerid, GetPlayerVehicleID(playerid)));
}
}
return 1;
}
Wysłany: 2013-05-31, 17:05
panmajster
Wiek: 42 Na forum: 4787 dni Posty: 154
Nick w MP: NieWazne
Piwa : 124
Dalej to samo
Wysłany: 2013-05-31, 18:53
xqz
otaku desu!
Wiek: 32 Na forum: 6406 dni Posty: 723
Nick w MP: xqz
Piwa : 5465
panmajster , osoby ktore nie pomagaly Ci w robieniu "czasowego" vipa nie beda w stanie Ci pomoc.
Kod: PlayerInfo[playerid][gPremium]
Wiedz, ze do tej zmiennej sa przypisane sekundy naliczane od 1 stycznia 1970roku.
Dlatego teraz zmienna wynosi: 1370019127sekund + czas vipa a nie jak ty porownujesz "1".
Kod: PlayerInfo[playerid][gPremium]
w tym warunku zamiast == 1 daj > 0
czyli
Kod: if(PlayerInfo[playerid][gPremium] > 0)
Wysłany: 2013-05-31, 19:07
panmajster
Wiek: 42 Na forum: 4787 dni Posty: 154
Nick w MP: NieWazne
Piwa : 124
Kod:
if(dialogid == T_DIALOG+1)
{
if(response)
{
SetPVarInt(playerid, "T_Block", 0);
if(!IsNumeric(inputtext))
{
ShowPlayerDialog(playerid, T_DIALOG+1, DIALOG_STYLE_INPUT, "?adowanie towaru", "Wpisz ile ton chcesz przetransportowa? (max. 10 [vip max. 30]):", "OK", "Anuluj");
return 1;
}
if(1 > strval(inputtext) || strval(inputtext) > 10 || !strlen(inputtext))
{
SendClientMessage(playerid, KOLOR, "Nie mo?esz za?adowa? wi?cej ni? 10 ton");
ShowPlayerDialog(playerid, T_DIALOG+1, DIALOG_STYLE_INPUT, "?adowanie towaru", "Wpisz ile ton chcesz przetransportowa? (max. 10 [vip max. 30]):", "OK", "Anuluj");
return 1;
}
else
{
if(PlayerInfo[playerid][gPremium] > 0)
if(10 > strval(inputtext) || strval(inputtext) > 30 || !strlen(inputtext))
SendClientMessage(playerid, KOLOR, "Czekaj trwa ?adowanie towaru...");
SetPVarInt(playerid, "T_Block", 1);
SetPVarInt(playerid, "T_Ton", strval(inputtext));
SetPVarInt(playerid, "T_Timer", SetTimerEx("T_Laduj", 1000, 1, "dd", playerid, GetPlayerVehicleID(playerid)));
return 1;
}
}
Co? takiego zrobi?em, to teraz nie mog? wybra? zlecenia z listy po wpisaniu /zlecenie
Wysłany: 2013-05-31, 19:16
xqz
otaku desu!
Wiek: 32 Na forum: 6406 dni Posty: 723
Nick w MP: xqz
Piwa : 5465
panmajster , przeciez jak wczesniej dzialal to po glupim zmienieniu znaku z == na > nie powinno robic roznicy dla dzialania
Cos innego popsules moze?
Wysłany: 2013-05-31, 19:33
panmajster
Wiek: 42 Na forum: 4787 dni Posty: 154
Nick w MP: NieWazne
Piwa : 124
Tylko to doda?em i to wszystko. Nie wiem co si? sta?o ?e nie trybi.
Wysłany: 2013-05-31, 19:37
xqz
otaku desu!
Wiek: 32 Na forum: 6406 dni Posty: 723
Nick w MP: xqz
Piwa : 5465
panmajster , wiec z ciekawosci zmien na ==1 i powiedz czy dziala. Dowiemy sie czy to naprawde to
Wysłany: 2013-05-31, 19:48
panmajster
Wiek: 42 Na forum: 4787 dni Posty: 154
Nick w MP: NieWazne
Piwa : 124
Dobra za?apa?o, ale dalej dla vip'a nie darady bra? powy?ej 10 ton.
kodzik :
Kod:
if(dialogid == T_DIALOG+1)
{
if(response)
{
SetPVarInt(playerid, "T_Block", 0);
if(!IsNumeric(inputtext))
{
ShowPlayerDialog(playerid, T_DIALOG+1, DIALOG_STYLE_INPUT, "?adowanie towaru", "Wpisz ile ton chcesz przetransportowa? (max. 10 [vip max. 30]):", "OK", "Anuluj");
return 1;
}
if(1 > strval(inputtext) || strval(inputtext) > 10 || !strlen(inputtext))
{
SendClientMessage(playerid, KOLOR, "Nie mo?esz za?adowa? wi?cej ni? 10 ton");
ShowPlayerDialog(playerid, T_DIALOG+1, DIALOG_STYLE_INPUT, "?adowanie towaru", "Wpisz ile ton chcesz przetransportowa? (max. 10 [vip max. 30]):", "OK", "Anuluj");
return 1;
}
else
{
if(PlayerInfo[playerid][gPremium] > 0)
if(10 > strval(inputtext) || strval(inputtext) > 30 || !strlen(inputtext))
SendClientMessage(playerid, KOLOR, "Czekaj trwa ?adowanie towaru...");
SetPVarInt(playerid, "T_Block", 1);
SetPVarInt(playerid, "T_Ton", strval(inputtext));
SetPVarInt(playerid, "T_Timer", SetTimerEx("T_Laduj", 1000, 1, "dd", playerid, GetPlayerVehicleID(playerid)));
return 1;
}
}
Wysłany: 2013-05-31, 20:00
xqz
otaku desu!
Wiek: 32 Na forum: 6406 dni Posty: 723
Nick w MP: xqz
Piwa : 5465
Jakas wiadomosc dostajesz?
Kod: if(10 > strval(inputtext) || strval(inputtext) > 30 || !strlen(inputtext))
tutaj powinno byc chyba
Kod: if(10 < strval(inputtext) || strval(inputtext) < 30 || !strlen(inputtext))
Wysłany: 2013-05-31, 20:07
panmajster
Wiek: 42 Na forum: 4787 dni Posty: 154
Nick w MP: NieWazne
Piwa : 124
Kod:
Nie mo?esz za?adowa? wi?cej ni? 10 ton
To wy?wietla...
A tw?j kod nie dzia?a.
Wysłany: 2013-05-31, 20:45
Gargulc
Wiek: 34 Na forum: 5196 dni Posty: 38
Nick w MP: Gargulc
Piwa : 12
Sprawd? to
Kod: if(dialogid == T_DIALOG+1)
{
if(response)
{
SetPVarInt(playerid, "T_Block", 0);
if(!IsNumeric(inputtext))
{
ShowPlayerDialog(playerid, T_DIALOG+1, DIALOG_STYLE_INPUT, "?adowanie towaru", "Wpisz ile ton chcesz przetransportowa? (max. 10 [vip max. 30]):", "OK", "Anuluj");
return 1;
}
if(PlayerInfo[playerid][gPremium] > 0){
if(1 <= strval(inputtext) && strval(inputtext) <= 30){
SendClientMessage(playerid, KOLOR, "Czekaj trwa ?adowanie towaru...");
SetPVarInt(playerid, "T_Block", 1);
SetPVarInt(playerid, "T_Ton", strval(inputtext));
SetPVarInt(playerid, "T_Timer", SetTimerEx("T_Laduj", 1000, 1, "dd", playerid, GetPlayerVehicleID(playerid)));
return 1;
}else{
SendClientMessage(playerid, KOLOR, "Nie mo?esz za?adowa? wi?cej ni? 30 ton");
ShowPlayerDialog(playerid, T_DIALOG+1, DIALOG_STYLE_INPUT, "?adowanie towaru", "Wpisz ile ton chcesz przetransportowa? (max. 10 [vip max. 30]):", "OK", "Anuluj");
return 1;
}
}else{
if(1 <= strval(inputtext) && strval(inputtext) <= 10){
SendClientMessage(playerid, KOLOR, "Czekaj trwa ?adowanie towaru...");
SetPVarInt(playerid, "T_Block", 1);
SetPVarInt(playerid, "T_Ton", strval(inputtext));
SetPVarInt(playerid, "T_Timer", SetTimerEx("T_Laduj", 1000, 1, "dd", playerid, GetPlayerVehicleID(playerid)));
return 1;
}else{
SendClientMessage(playerid, KOLOR, "Nie mo?esz za?adowa? wi?cej ni? 10 ton");
ShowPlayerDialog(playerid, T_DIALOG+1, DIALOG_STYLE_INPUT, "?adowanie towaru", "Wpisz ile ton chcesz przetransportowa? (max. 10 [vip max. 30]):", "OK", "Anuluj");
return 1;
}
}
}
Wysłany: 2013-05-31, 21:53
panmajster
Wiek: 42 Na forum: 4787 dni Posty: 154
Nick w MP: NieWazne
Piwa : 124
Ca?kiem ten tw?j nie dzia?a.
Wysłany: 2013-05-31, 22:21
Gargulc
Wiek: 34 Na forum: 5196 dni Posty: 38
Nick w MP: Gargulc
Piwa : 12
Jakie? errory lub info? cokolwiek?
Wysłany: 2013-05-31, 22:30
xqz
otaku desu!
Wiek: 32 Na forum: 6406 dni Posty: 723
Nick w MP: xqz
Piwa : 5465
Kod: if(dialogid == T_DIALOG+1)
{
if(response)
{
SetPVarInt(playerid, "T_Block", 0);
if(!IsNumeric(inputtext))
{
ShowPlayerDialog(playerid, T_DIALOG+1, DIALOG_STYLE_INPUT, "?adowanie towaru", "Wpisz ile ton chcesz przetransportowa? (max. 10 [vip max. 30]):", "OK", "Anuluj");
return 1;
}
if((strval(inputtext) < 1 || strval(inputtext) > 10 || !strlen(inputtext))&&PlayerInfo[playerid][gPremium] == 0)
{
SendClientMessage(playerid, KOLOR, "Nie mo?esz za?adowa? wi?cej ni? 10 ton");
ShowPlayerDialog(playerid, T_DIALOG+1, DIALOG_STYLE_INPUT, "?adowanie towaru", "Wpisz ile ton chcesz przetransportowa? (max. 10 [vip max. 30]):", "OK", "Anuluj");
return 1;
}
else if(strval(inputtext) <= 30 && strval(inputtext) > 1)
{
if(PlayerInfo[playerid][gPremium] > 0)
{
SendClientMessage(playerid, KOLOR, "Czekaj trwa ?adowanie towaru...");
SetPVarInt(playerid, "T_Block", 1);
SetPVarInt(playerid, "T_Ton", strval(inputtext));
SetPVarInt(playerid, "T_Timer", SetTimerEx("T_Laduj", 1000, 1, "dd", playerid, GetPlayerVehicleID(playerid)));
}
return 1;
}
}
moze be3dzie dziaulac dwiec sorawdzmczy dziala i naoisz czyyyyyy dzuiala
Tagi: nie :: dzialajacy :: zaladunek :: vip
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: