29.03.2009, 11:11
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)
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;
}
Ive made the part in bold. Somebody helped me made this a while ago, but used return. I do not only want to send a clientmessage but do more. How would i do this?
Thnx, Robbin
{
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)
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;
}
Ive made the part in bold. Somebody helped me made this a while ago, but used return. I do not only want to send a clientmessage but do more. How would i do this?
Thnx, Robbin