Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2013-04-08, 20:04


Krystian5







Wiek: 36
Na forum: 5231 dni
Posty: 185

Piwa: 1

Respekt: 77

Witam.Mam tu komend? na ban-a lecz po wpisaniu /banned id nawet bez powodu od razu serwer si? zawiesza i restartuje

Kod:

if(strcmp(cmd, "/banned", true) == 0 && IsPlayerAdmin(playerid) == 1)
{
new banid, banreason[100], bangiver[MAX_PLAYER_NAME+1];
if( sscanf(cmdtext, "{s[64]}ds[100]", banid, banreason) ) return SendClientMessage(playerid, -1, "Uzyj: /zbanuj [id gracza] [pow?d]");


if( !IsPlayerConnected(banid) ) return SendClientMessage(playerid, -1, "B??d: Ten gracz nie jest online.");

new banfile[64];
GetPlayerIp(banid, banfile, sizeof(banfile));
format(banfile, sizeof(banfile), "bans/%s.ini", banfile);
dini_Create(banfile);

GetPlayerName(playerid, bangiver, sizeof(bangiver));
dini_Set(banfile, "giver", bangiver);
dini_Set(banfile, "reason", banreason);

new pname[MAX_PLAYER_NAME+1];
GetPlayerName(banid, pname, sizeof(pname));
SendClientMessage(banid, -1, "Zosta?e? permanentnie zbanowany przez Admina %s.", pname);
SetTimerEx("KickPlayer", 200, false, "d", banid);
return 1;
}


Za pomoc daje :piwo:


Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-04-09, 08:11


IgrexolonO







Wiek: 34
Na forum: 6809 dni
Posty: 1386

Piwa: 1062

Respekt: 651,8
Respekt: 651,8Respekt: 651,8

Kod:

if(strcmp(cmdtext, "/banned", true) == 0 && IsPlayerAdmin(playerid))
{
new banid, banreason[100], bangiver[MAX_PLAYER_NAME+1];
if(sscanf(cmdtext[10], "us[100]", banid, banreason)) return SendClientMessage(playerid, -1, "U?yj: /zbanuj [id gracza] [pow?d]");

if(banid == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "B??d: Ten gracz nie jest online.");

new banfile[64];
GetPlayerIp(banid, banfile, sizeof(banfile));
format(banfile, sizeof(banfile), "bans/%s.ini", banfile);

dini_Create(banfile);

GetPlayerName(playerid, bangiver, sizeof(bangiver));
dini_Set(banfile, giver, bangiver);
dini_Set(banfile, reason, banreason);

new pname[MAX_PLAYER_NAME+1];
GetPlayerName(banid, pname, sizeof(pname));
format(banfile, sizeof(banfile), "Zosta?e? permanentnie zbanowany przez Admina %s.", pname);
SendClientMessage(banid, -1, banfile);
SetTimerEx("KickPlayer", 200, false, d, banid);
return 1;
}


Przy okazji.. *****?o Ci cudzys?owia, no chyba ?e ich nie mia?e?, lol .

Ostatnio zmieniony przez IgrexolonO 2013-04-10, 18:18, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-04-10, 17:27


Krystian5







Wiek: 36
Na forum: 5231 dni
Posty: 185

Piwa: 1

Respekt: 77

Mam jeden error:
Kod:

C:\Documents and Settings\u?ytkownik\Moje error 076: syntax error in the expression, or invalid function call


Linijka:
Kod:

SetTimerEx(KickPlayer, 200, false, d, banid);


Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-04-10, 18:19


IgrexolonO







Wiek: 34
Na forum: 6809 dni
Posty: 1386

Piwa: 1062

Respekt: 651,8
Respekt: 651,8Respekt: 651,8

Cudzys??w przy nazwie wywo?ywanej funkcji.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-04-10, 18:27


Krystian5







Wiek: 36
Na forum: 5231 dni
Posty: 185

Piwa: 1

Respekt: 77

Pisze niepoprawna komenda

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-04-10, 18:29


IgrexolonO







Wiek: 34
Na forum: 6809 dni
Posty: 1386

Piwa: 1062

Respekt: 651,8
Respekt: 651,8Respekt: 651,8

Kod:

if(strcmp(cmd, "/banned", true) == 0 && IsPlayerAdmin(playerid))
{
new banid, banreason[100], bangiver[MAX_PLAYER_NAME+1];
if(sscanf(cmd[10], "us[100]", banid, banreason)) return SendClientMessage(playerid, -1, "U?yj: /zbanuj [id gracza] [pow?d]");

if(banid == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "B??d: Ten gracz nie jest online.");

new banfile[64];
GetPlayerIp(banid, banfile, sizeof(banfile));
format(banfile, sizeof(banfile), "bans/%s.ini", banfile);

dini_Create(banfile);

GetPlayerName(playerid, bangiver, sizeof(bangiver));
dini_Set(banfile, giver, bangiver);
dini_Set(banfile, reason, banreason);

new pname[MAX_PLAYER_NAME+1];
GetPlayerName(banid, pname, sizeof(pname));
format(banfile, sizeof(banfile), "Zosta?e? permanentnie zbanowany przez Admina %s.", pname);
SendClientMessage(banid, -1, banfile);
SetTimerEx("KickPlayer", 200, false, d, banid);
return 1;
}


Ostatnio zmieniony przez IgrexolonO 2013-04-10, 18:38, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-04-10, 18:33


Krystian5







Wiek: 36
Na forum: 5231 dni
Posty: 185

Piwa: 1

Respekt: 77

Teraz wpisuje /banned 0 powod to poprawia uzyj:/banned id powod

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-04-11, 17:42


IgrexolonO







Wiek: 34
Na forum: 6809 dni
Posty: 1386

Piwa: 1062

Respekt: 651,8
Respekt: 651,8Respekt: 651,8

Sprawd? jeszcze raz, w momencie jak edytowa?em jeszcze post, to ju? napisa?e? ?e nie dzia?a.. Polecam.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-04-11, 19:31


Krystian5







Wiek: 36
Na forum: 5231 dni
Posty: 185

Piwa: 1

Respekt: 77

Niestety jest nadal to samo. ;(

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-04-11, 19:40


IgrexolonO







Wiek: 34
Na forum: 6809 dni
Posty: 1386

Piwa: 1062

Respekt: 651,8
Respekt: 651,8Respekt: 651,8

Kod:

if(strcmp(cmd, "/banned", true) == 0 && IsPlayerAdmin(playerid))
{
new banid, banreason[100], bangiver[MAX_PLAYER_NAME+1];
if(sscanf(cmd[10], "us[100]", banid, banreason)) return SendClientMessage(playerid, -1, "U?yj: /zbanuj [id gracza] [pow?d]");
print("1");
if(banid == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "B??d: Ten gracz nie jest online.");

new banfile[64];
GetPlayerIp(banid, banfile, sizeof(banfile));
print("2");
format(banfile, sizeof(banfile), "bans/%s.ini", banfile);
print("3");
dini_Create(banfile);
print("4");
GetPlayerName(playerid, bangiver, sizeof(bangiver));
print("5");
dini_Set(banfile, giver, bangiver);
print("6");
dini_Set(banfile, reason, banreason);
print("7");
new pname[MAX_PLAYER_NAME+1];
GetPlayerName(banid, pname, sizeof(pname));
format(banfile, sizeof(banfile), "Zosta?e? permanentnie zbanowany przez Admina %s.", pname);
SendClientMessage(banid, -1, banfile);
SetTimerEx("KickPlayer", 200, false, d, banid);
print("8");
return 1;
}


Wklej co? takiego, powiedz od kt?rego numeru wzwy? inne nie zostan? wy?wietlone. (server_log.txt)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-04-11, 20:31


Krystian5







Wiek: 36
Na forum: 5231 dni
Posty: 185

Piwa: 1

Respekt: 77

Nic si? nie wy?wietli?o.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-04-11, 22:21


IgrexolonO







Wiek: 34
Na forum: 6809 dni
Posty: 1386

Piwa: 1062

Respekt: 651,8
Respekt: 651,8Respekt: 651,8

Jeste? pewny, ale to kurewsko pewny, ?e nie ma nic w konsoli po wpisaniu tej komendy?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-04-12, 16:21


Krystian5







Wiek: 36
Na forum: 5231 dni
Posty: 185

Piwa: 1

Respekt: 77

Tak nic nie ma zwi?zanego z t? komenda

Postaw piwo autorowi tego posta
 

 
Tagi: komenda :: crashuje :: serwer
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » PAWN » [INNE] Komenda crashuje serwer Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku