02.05.2011, 15:18
******, why doesn't this work
while this does work
I just don't get it, the first way, Input will be assigned the right playername but the wrong gPass is taken out of the file (the one of the player you log in with first), but when you manually assign a value to Input with strpack it will work!
What the heck, please help with this :S
pawn Код:
public OnPlayerConnect(playerid){
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
strpack(Input, name, sizeof(Input));
INI_Load("playerlist.ini");
strpack(Password[playerid], gPass, sizeof(gPass));
SendClientMessage(playerid, COLOR_WHITE, Input);
SendClientMessage(playerid, COLOR_WHITE, gPass);
CheckPlayer(playerid);
return 1;
}
pawn Код:
public OnPlayerConnect(playerid){
strpack(Input, "Har_Levis", sizeof(Input));
INI_Load("playerlist.ini");
SendClientMessage(playerid, COLOR_WHITE, gPass);
strpack(Input, "Lead_Admin", sizeof(Input));
INI_Load("playerlist.ini");
SendClientMessage(playerid, COLOR_WHITE, (gPass);
}
What the heck, please help with this :S