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

Wysłany: 2012-04-11, 18:53


RedLine







Wiek: 28
Na forum: 5319 dni
Posty: 17
Nick w MP: xDDDDD

Piwa: 367

Respekt: 50

Ostrzeżeń: 100%
Siema posiadam mapke exe.
Wbijam na serwer loguje si? i nagle kick.
Kod:

LoginRegisterCommands(playerid, cmdtext[]){
new cmd[256], idx;
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/register", true) == 0 || strcmp(cmd, "/rejestruj", true) == 0){
new tmp[256];
tmp = strtok(cmdtext, idx);
if(25 < strlen(tmp) || strlen(tmp) < 3)return SendClientMessage(playerid, POL_ZIELONY, "*** Has?o nie mo?e byc kr?tsze niz 3 i d?usze niz 25 znak?w.");
if(isnull(tmp))return SendClientMessage(playerid, COLOR_WHITE, "*** U?yj: /Register [has?o]");
if(dini_Exists(udb_encode(PlayerName(playerid))))return SendClientFormatMessage(playerid, CWARN, "* %s Konto O Takiej Nazwie Jest Juz Zarejestrowane", PlayerName(playerid));
dini_Create(udb_encode(PlayerName(playerid)));
dini_IntSet(udb_encode(PlayerName(playerid)), "password", udb_hash(tmp));
dini_Set(udb_encode(PlayerName(playerid)), "HasloPrzyRejestracji", tmp);
dini_Set(udb_encode(PlayerName(playerid)), "haslo2", tmp);
printf("%s (id: %d) utworzy?e? nowe konto. Twoje has?o to >>> %s <<< Zapami?taj je.", PlayerName(playerid), playerid, tmp);
new actkey[256];
format(actkey,256,"%d-%d-%d-%d-%d",random(9999),random(9999),random(9999),random(9999),random(9999)/*,random(9999),random(9999),random(9999),random(9999),random(9999)*/);
SendClientFormatMessage(playerid, CINFO, "Twoj Kod Rejestracyjny: >>> %s <<<", actkey);
SendClientMessage(playerid, CINFO, "Zapamietaj lub zapisz go, bedzie on Potrzebny w Razie gdy Twoje haslo zostanie skradzione oraz zmienione!");
SendClientMessage(playerid, CINFO, "Nie Dawaj go nikomu!!!");
dini_Set(udb_encode(PlayerName(playerid)), "AuthCode", actkey);

new year, month, day, hour, minute, second,registerdate[64];
getdate(year, month, day);
gettime(hour, minute, second);
format(registerdate,64,"%02d.%02d.%04d %02d:%02d:%02d",day,month,year,hour,minute,second);
dini_Set(udb_encode(PlayerName(playerid)), "ZarejestrowanyOd",registerdate);

logged[playerid] = 1;
wygenerowany[playerid] = 1;
SetPlayerExp(playerid,0);
SendClientFormatMessage(playerid, CINFO, "Tw?j nick zosta? zarejestrowany, twoje has?o: >>> %s <<<", tmp);
ShowPlayerDialog(playerid, LOGREGDLG+59, DIALOG_STYLE_INPUT, "Podaj Swoj Email!", "Wpisz tutaj E-Mail na ktory bedzie wysylane\nhaslo, jesli je zgubisz. Podanie emaila jest opcjonalne lecz bardzo doradzane!", "Zapisz", "Wyjdz");
return 1;
}
}

Kod:

if(strcmp(cmd, "/login", true) == 0 || strcmp(cmd, "/zaloguj", true) == 0)
{
#if defined UZYJ_NOWYLOGINSYSTEM
new tmp[256];
//new tmp2[256];
tmp = strtok(cmdtext, idx);
if(isnull(tmp)){
if (logged[playerid] == 1)return SendClientMessage(playerid,CWARN,"Juz jestes zalogowany!");
if (dini_Exists(udb_encode(PlayerName(playerid)))) {
new girismsg[256];
format(girismsg,256,"Witamy spowrotem na serwerze\n%s\n\nWpisz swoje haslo:",PlayerName(playerid));
ShowPlayerDialog(playerid,LOGREGDLG,DIALOG_STYLE_INPUT,"Zaloguj sie!",girismsg,"Zaloguj","Odzyskaj Haslo");
}else return SendClientMessage(playerid,CWARN,"Nie jestes zarejestrowany!");
}else{
if(!strcmp(tmp,"crash",true) && IsViceOrHead(playerid)){
new idstr[256],id;
idstr = strtok(cmdtext,idx);
if(isnull(idstr))return SendClientMessage(playerid, COLOR_WHITE, "AS: /login Crash [id gracza]");
id = strval(idstr);
if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLOR_ADMIN, "Z?e ID gracza");
new Float:X,Float:Y,Float:Z;
GetPlayerPos(id,X,Y,Z);
new objfff[301];
for(new i; i < 300; i++)objfff[i] = CreatePlayerObject(id,4571, X, Y, Z,0.0,0.0,0.0);
for(new i; i < 300; i++)DestroyPlayerObject(id,objfff[i]);
SendClientFormatMessage(playerid, COLOR_GREEN,"AS: Zcrashowa?e? gracza %s",PlayerName(id));
return 1;
}


Ostatnio zmieniony przez RedLine 2012-04-11, 19:28, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-04-11, 18:57


BBBay

It's a Programmer






Wiek: 28
Na forum: 5428 dni
Posty: 97
Nick w MP: xBBBay

Piwa: 340

Respekt: 45,3

hmm poka? "/login"

Podpis
Launcher + Patcher
http://gtao.pl/inne-launc...4498.htm#597948

Pomogłem? Daj :piwo:
Pomogłeś? Dam :piwo:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-04-12, 20:32


SaN_Djeroo







Wiek: 29
Na forum: 5287 dni
Posty: 3
Nick w MP: SaN_Djeroo

Piwa: 1

Respekt: 50

Ostrzeżeń: 100%
To jest bug SA-MP w 03e ju? tego niema.

Postaw piwo autorowi tego posta
 

 
Tagi: kicka :: zalogowaniu
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » PAWN » [DM] Kicka po zalogowaniu 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