hi leute ich will machen dass man gleich nach /register eingeloggt ist, wie mach ich das?
dcmd_register(playerid,params[]) {if(!strlen(params)) return SendClientMessage(playerid,COLOR_SYSTEM,"/register Passwort");new name[MAX_PLAYER_NAME], s[256];//sollte die variable "s" zu klein sein, dann mach aus der 20 ne 256GetPlayerName(playerid,name,sizeof(name));format(s,sizeof(s),"%s.ini",name);if(!dini_Exists(s)) {dini_Create(s);new ip[15];GetPlayerIp(playerid,ip,sizeof(ip));dini_Set(s,"ip",ip);dini_IntSet(s,"passwort",udb_hash(params));dini_IntSet(s,"kills",0);dini_IntSet(s,"geld",GetPlayerMoney(playerid));dini_IntSet(s,"skin",GetPlayerSkin(playerid));dini_IntSet(s,"admin",0);SendClientMessage(playerid,COLOR_RED," Herzlichen Glückwunsch, Du hast dich Erfolgreich Registriert.");SendClientMessage(playerid,COLOR_RED," Bitte logge dich jetzt mit '/login [Passwort] ein.");Logged[playerid] = 1;SpawnPlayer(playerid);TogglePlayerControllable(playerid,0);SetTimer("tut1",2000,0);} else {SendClientMessage(playerid,COLOR_RED," Du bist schon Registriert.");}return 1;}
dcmd_login(playerid,params[]) {if(!strlen(params)) return SendClientMessage(playerid,COLOR_SYSTEM,"/login Passwort");new name[MAX_PLAYER_NAME], s[20], s2[256];//hier ei "s[20]" gilt das gleiche, wie obenGetPlayerName(playerid,name,sizeof(name));format(s,sizeof(s),"%s.ini",name);if(dini_Exists(s)) {s2=dini_Get(s,"passwort");if(strval(s2)==udb_hash(params)) {TogglePlayerControllable(playerid,1);SendClientMessage(playerid,COLOR_RED," Erfolgreich Eingeloggt.");Logged[playerid] = 1;//SpawnPlayer(playerid);SpielerS[playerid][kills]=dini_Int(s,"kills");GivePlayerMoney(playerid,SpielerS[playerid][geld]);SetPlayerSkin(playerid,SpielerS[playerid][skin]);SpielerS[playerid][admin]=dini_Int(s,"admin");}}return 1;}
-.- sry google chrome spinnt -.-
Ach mensch... Das muss doch jemand wissen