Wysłany: 2012-04-08, 16:41
BBBay
It's a Programmer
Wiek: 28 Na forum: 5428 dni Posty: 97
Nick w MP: xBBBay
Piwa : 340
Potrzebuje aby przerobic to:
Kod:
CMD:news(playerid, params[])
{
new tresc[64];
if(sscanf(params, "s[64]", tresc))
return 1;
if(an != 0)
return SendClientMessage(playerid, KOLOR_CZERWONY, "Aktualnie jest ju? jakie? og?oszenie!");
format(dstring, sizeof(dstring), "~r~%s:~w~ %s", Nick(playerid), tresc);
TextDrawSetString(AdminNews3, dstring);
TextDrawShowForAll(AdminNews1);
TextDrawShowForAll(AdminNews2);
TextDrawShowForAll(AdminNews3);
an = 1;
ogloszenietim = SetTimer("SchowajOgloszenie", 10000, true);
return 1;
}
Z zcmd na strcmp Daje
Wysłany: 2012-04-08, 17:51
__.A.__
Wiek: 30 Na forum: 5171 dni Posty: 151
Piwa : 855
Kod: if (strcmp(cmdtext, "/news", true)==0) {
{
new tresc[64];
if(sscanf(params, "s[64]", tresc))
return 1;
if(an != 0)
return SendClientMessage(playerid, KOLOR_CZERWONY, "Aktualnie jest ju? jakie? og?oszenie!");
format(dstring, sizeof(dstring), "~r~%s:~w~ %s", Nick(playerid), tresc);
TextDrawSetString(AdminNews3, dstring);
TextDrawShowForAll(AdminNews1);
TextDrawShowForAll(AdminNews2);
TextDrawShowForAll(AdminNews3);
an = 1;
ogloszenietim = SetTimer("SchowajOgloszenie", 10000, true);
}
return 1;
}
Powinno dzia?a?.
Podpis
new map test beta:
ip serwera: 80.72.36.203:4056
Wysłany: 2012-04-08, 18:17
karol170396
Wiek: 33 Na forum: 5643 dni Posty: 580
Nick w MP: Journey
Piwa : 1520
"__.A.__" napisał/a : Kod: if (strcmp(cmdtext, "/news", true)==0) {
{
new tresc[64];
if(sscanf(params, "s[64]", tresc))
return 1;
if(an != 0)
return SendClientMessage(playerid, KOLOR_CZERWONY, "Aktualnie jest ju? jakie? og?oszenie!");
format(dstring, sizeof(dstring), "~r~%s:~w~ %s", Nick(playerid), tresc);
TextDrawSetString(AdminNews3, dstring);
TextDrawShowForAll(AdminNews1);
TextDrawShowForAll(AdminNews2);
TextDrawShowForAll(AdminNews3);
an = 1;
ogloszenietim = SetTimer("SchowajOgloszenie", 10000, true);
}
return 1;
}
Powinno dzia?a?.
Jak ju? co? robisz, to r?b to porz?dnie, bo wida?, ?e o czym? zapomnia?e?:
Kod: if(sscanf(params, "s[64]", tresc))
na
Kod: if(sscanf(cmdtext, "s[64]", tresc))
Podpis
"MłoteK" napisał/a :
Zając, idź kicać gdzie indziej, może w teletubisiach się miejsca zwolnią.
"zajacp1" napisał/a :Wiele dzieci, które mi zazdroszczą, że mi się powodzi crashują mi serwer
Królik, Ty nigdy nie dorośniesz.
Wysłany: 2012-04-08, 18:21
BBBay
It's a Programmer
Wiek: 28 Na forum: 5428 dni Posty: 97
Nick w MP: xBBBay
Piwa : 340
Teraz jest blad bo jak napisze /news "tu nowy news" to pisze blad komendy, gdy napisze /news to pisz "BBBay: /news"
Wysłany: 2012-04-08, 18:22
__.A.__
Wiek: 30 Na forum: 5171 dni Posty: 151
Piwa : 855
aha xD nie zauwa?y?em nawed tego raz dwa napisa?em i tyle
Podpis
new map test beta:
ip serwera: 80.72.36.203:4056
Tagi: prosba :: zcmd :: strcmp
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: