29.03.2009, 11:29
if you wanna do more then just use brackets ( { } )
pawn Код:
dcmd_login(playerid, params[])
{
new Name[MAX_PLAYER_NAME+1];
GetPlayerName(playerid, Name, sizeof(Name));
if(_LOGIN_LoggedIn[playerid] == 0)
{
if(!strlen(params) || strcmp(params, dini_Get("Players.ini", Name), true) != 0)
{
// here your stuff you wanna do if the password is wrong
return SendClientMessage(playerid, COLOR_RED, "Invalid Password! Please Retry.");
}
SendClientMessage(playerid, COLOR_DARKGREEN, "Logged In.");
if(!strcmp(Name, "Eros"))
{
_LOGIN_Rank[playerid] = 2;
} else if (!strcmp(Name, "Decysen")) {
_LOGIN_Rank[playerid] = 3;
} else {
_LOGIN_Rank[playerid] = 1;
}
printf("%s (%d) Has Logged In. (Rank Set To: %d)", Name, playerid, _LOGIN_Rank[playerid]);
_LOGIN_LoggedIn[playerid] = 1;
} else {
SendClientMessage(playerid, COLOR_RED, "Already Logged In!");
}
return 1;
}