Wysłany: 2012-09-02, 12:40
punek123
Wiek: 46 Na forum: 5026 dni Posty: 7
Nick w MP: [SRL]Punki
Siema chcia?em napisa? prosty skrypt kt?ry wygl?da? by podobnie do tego Kod: http://m.gtaonline.pl/67615.htm
Kod kt?ry napisa?em po przeczytaniu jaki? poradnik?w, wzorowaniu si? na innych botach kt?re znalaz?em w .pwn Kod: #include <a_samp>
new glob0[500];
new glob7D0[500];
new globFA0;
new globFA4[500];
new glob1774[500];
new glob1F44;
new glob1F48;
new glob1F4C;
new glob1F50;
new glob1F54;
new glob1F58;
function8(arg0, &arg1)
{
new var0 = strlen(arg0);
while(arg1 < var0 && arg0[arg1] <= 32)
{
arg1++;
}
new var1 = arg1;
new var2[20];
while(arg1 < var0 && arg0[arg1] > 32 && arg1 - var1 < 19)
{
var2[arg1 - var1] = arg0[arg1];
arg1++;
}
var2[arg1 - var1] = 0;
return var2;
}
public OnFilterScriptInit()
{
SetTimer("PingWeaponDetector", 200, true);
SendClientMessageToAll(0x9955DEEE, "Leszczu; Wr?ci?em do domu");
printf("William wlaczony.");
SendClientMessageToAll(0xABCDEF97, "Leszczu: Siema wszystkim");
for(new var0 = 0; var0 <= 500; var0++)
{
glob0[var0] = 0;
}
return 1;
}
public OnFilterScriptExit()
{
SendClientMessageToAll(0xABCDEF97, "Leszczu: Nara wszystkim:(");
SendClientMessageToAll(0x9955DEEE, "Leszczu idzie spa?");
printf("Leszczu poszed? spa?");
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
glob0[playerid] = 0;
glob7D0[playerid] = 0;
globFA4[playerid] = 0;
glob1774[playerid] = 0;
return 1;
}
public OnPlayerText(playerid, text)
{
for(new var0 = 0; var0 < 256; var0++)
{
if(!strfind(text, "Leszczu", true, 0) || !strfind(text, "Leszcza", true, 0))
{
if(!globFA0)
{
if(!glob7D0[playerid])
{
SendPlayerMessageToAll(playerid, text);
WilliamUruchomiony(playerid);
glob0[playerid] = 1;
globFA0 = 1;
glob1F44 = SetTimer("AutoZakonczenie", 30000, false);
return 0;
}
SendPlayerMessageToAll(playerid, text);
WilliamJestObrazony(playerid);
return 0;
}
SendPlayerMessageToAll(playerid, text);
return 0;
}
}
if(glob0[playerid] == 1)
{
new var0 = 0;
while(++var0 < 256)
{
if(!strfind(text, "kto ty", true, 0) || !strfind(text, "kim jeste??", true, 0) || !strfind(text, "kim jestes?", true, 0) || !strfind(text, "przedstaw sie", true, 0) || !strfind(text, "kto cie zrobil", true, 0) || !strfind(text, "kto jest twoim", true, 0))
{
SendPlayerMessageToAll(playerid, text);
SendClientMessageToAll(0xABCDEF97, "Leszczu: Jestem Leszczu, najwiekszy kozak wsrod imprezowiczow.");
return 0;
}
}
}
if(glob0[playerid] == 1)
{
new var0 = 0;
while(++var0 < 256)
{
if(!strfind(text, "co umiesz", true, 0) || !strfind(text, "co potrafisz", true, 0) || !strfind(text, "nauczy?e?", true, 0) || !strfind(text, "nauczyles", true, 0))
{
SendPlayerMessageToAll(playerid, text);
SendClientMessageToAll(0xABCDEF97, "Leszczu: Chla? k**** umiem");
SendClientMessageToAll(0xABCDEF97, "Leszczu: Niech dziwki siadaj? nie b?d? przeciez sta?y");
SendClientMessageToAll(0xABCDEF97, "Leszczu: Dziwka ***** na **** mi gwizda.");
return 0;
}
}
}
if(glob0[playerid] == 1)
{
new var0 = 0;
while(++var0 < 256)
{
if(!strfind(text, "lubisz mnie", true, 0) || !strfind(text, "lubisz mnie?", true, 0) || !strfind(text, "kochasz mnie?", true, 0) || !strfind(text, "kochasz mnie", true, 0))
{
SendPlayerMessageToAll(playerid, text);
SendClientMessageToAll(0xABCDEF97, "Leszczu: Daj browara");
return 0;
}
}
}
public AutoZakonczenie()
{
for(new var0 = 0; var0 < 500; var0++)
{
if(glob0[var0] == 1)
{
glob0[var0] = 0;
}
}
globFA0 = 0;
return 1;
}
a tutaj errory
Kod: C:\Users\Real Madrid\Desktop\tralala.pwn(81) : error 025: function heading differs from prototype
C:\Users\Real Madrid\Desktop\tralala.pwn(85) : error 035: argument type mismatch (argument 1)
C:\Users\Real Madrid\Desktop\tralala.pwn(91) : error 035: argument type mismatch (argument 2)
C:\Users\Real Madrid\Desktop\tralala.pwn(92) : error 017: undefined symbol "WilliamUruchomiony"
C:\Users\Real Madrid\Desktop\tralala.pwn(98) : error 035: argument type mismatch (argument 2)
C:\Users\Real Madrid\Desktop\tralala.pwn(99) : error 017: undefined symbol "WilliamJestObrazony"
C:\Users\Real Madrid\Desktop\tralala.pwn(102) : error 035: argument type mismatch (argument 2)
C:\Users\Real Madrid\Desktop\tralala.pwn(111) : error 035: argument type mismatch (argument 1)
C:\Users\Real Madrid\Desktop\tralala.pwn(113) : error 035: argument type mismatch (argument 2)
C:\Users\Real Madrid\Desktop\tralala.pwn(120) : warning 217: loose indentation
C:\Users\Real Madrid\Desktop\tralala.pwn(125) : error 035: argument type mismatch (argument 1)
C:\Users\Real Madrid\Desktop\tralala.pwn(127) : error 035: argument type mismatch (argument 2)
C:\Users\Real Madrid\Desktop\tralala.pwn(141) : error 035: argument type mismatch (argument 1)
C:\Users\Real Madrid\Desktop\tralala.pwn(143) : error 035: argument type mismatch (argument 2)
C:\Users\Real Madrid\Desktop\tralala.pwn(150) : warning 217: loose indentation
C:\Users\Real Madrid\Desktop\tralala.pwn(150) : error 029: invalid expression, assumed zero
C:\Users\Real Madrid\Desktop\tralala.pwn(150) : error 017: undefined symbol "AutoZakonczenie"
C:\Users\Real Madrid\Desktop\tralala.pwn(151) : warning 217: loose indentation
Ostatnio zmieniony przez punek123 2012-09-02, 12:48, w całości zmieniany 1 raz
Wysłany: 2012-09-02, 12:46
Michalec
Dokładnie.
Wiek: 30 Na forum: 6405 dni Posty: 163
Nick w MP: []Damianos[]
Piwa : 99
Tak to jest jak si? u?ywa DeAmx. Ja nie b?d? pomaga?, bo za takie co? to ZP powinno by?.
Wysłany: 2012-09-02, 12:49
punek123
Wiek: 46 Na forum: 5026 dni Posty: 7
Nick w MP: [SRL]Punki
"Michalec" napisał/a :Tak to jest jak si? u?ywa DeAmx. Ja nie b?d? pomaga?, bo za takie co? to ZP powinno by?.
na czym? si? musz? wzorowa? skoro jestem lajkiem, a temat?w odno?nie bota czatowego jest 1 kt?ry i tak nic nie pomaga
Wysłany: 2012-09-02, 13:22
Combacior
Wiek: 29 Na forum: 5795 dni Posty: 1516
Piwa : 2161
Kod: public OnPlayerText(playerid, text)
{
if(!strfind(text, "Leszcz", true, 0) || !strfind(text, "Leszczu", true, 0))
{
SendClientMessageToAll(-1, "Leszczu: Jestem Leszczu");
}
return 1;
Wiadomo?? zostanie wys?ana, je?eli gracz na czacie wpisze wyraz Leszcz, lub Leszczu
Wysłany: 2012-09-02, 13:27
punek123
Wiek: 46 Na forum: 5026 dni Posty: 7
Nick w MP: [SRL]Punki
hmm mo?e inaczej zdefiniuje swoje pytanie, jakich includ?w powinienem u?y? oraz do czego s?u?? Kod: new glob0[500];
new glob7D0[500];
new globFA0;
new globFA4[500];
new glob1774[500];
new glob1F44;
new glob1F48;
new glob1F4C;
new glob1F50;
new glob1F54;
new glob1F58;
Wysłany: 2012-09-02, 15:37
MG303
Wiek: 30 Na forum: 6418 dni Posty: 654
Piwa : 2990
punek123 , takie co? si? wy?wietla, bo u?y?e? DeAMX. Z tym Ci nie pomo?emy.
Wysłany: 2012-09-02, 15:51
punek123
Wiek: 46 Na forum: 5026 dni Posty: 7
Nick w MP: [SRL]Punki
ok, w takim razie prosz? o usuni?cie tematu.
Tagi: bot :: czacie
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: