Код:
CMD:ajail (playerid, params [])
{
new IID;
new Motiv [256];
new Timp;
if (PlayerInfo [playerid] [pAdmin] < 1)
{
return SendClientMessage (playerid, 0xFFDEAD, "{FFA500}*** {9370DB}[Informatie] {FFDEAD}Nu ai acces la aceasta comanda. Doar adminii pot folosi aceasta comanda. {FFA500}***");
}
else if (sscanf (params, "uds [128]", IID, Timp, Motiv))
{
return SendClientMessage (playerid, 0xFFDEAD, "{FFA500}*** {9370DB}[Informatie] {FFDEAD}Formatul corect al acestei comenzi este : {CDB5CD}'/ajail [ID Jucator] [Timp] [Motiv]'{FFDEAD}. {FFA500}***");
}
else if (isnull (params))
{
SendClientMessage (playerid, 0xFFDEAD, "{FFA500}*** {9370DB}[Informatie] {FFDEAD}Formatul corect al acestei comenzi este : {CDB5CD}'/ajail [ID Jucator] [Timp] [Motiv]'{FFDEAD}. {FFA500}***");
return 1;
}
else if (IID == INVALID_PLAYER_ID)
{
return SendClientMessage (playerid, 0xFFDEAD, "{FFA500}*** {9370DB}[Informatie] {FFDEAD}Nu este niciun jucator conectat ce detine acest ID. {FFA500}***");
}
else if (PlayerInfo [playerid] [pInchis] == 1)
{
return SendClientMessage (playerid, 0xFFDEAD, "{FFA500}*** {9370DB}[Informatie] {FFDEAD}Acest jucator este deja inchis. {FFA500}***");
}
else if (Timp < 1 || Timp > 1000)
{
return SendClientMessage (playerid, 0xFFDEAD, "{FFA500}*** {9370DB}[Informatie] {FFDEAD}Timpul trebuie sa fie intre 1 si 1000 minute. {FFA500}***");
}
else
{
new Jucator [MAX_PLAYER_NAME];
new Jucator2 [MAX_PLAYER_NAME];
new Mesaj1 [256];
new Mesaj2 [256];
new Mesaj3 [256];
GetPlayerName (IID, Jucator, sizeof (Jucator));
GetPlayerName (playerid, Jucator2, sizeof (Jucator2));
format (Mesaj1, sizeof (Mesaj1), "{FFA500}*** {B22222}[Anunt global] {FFDEAD}%s a fost inchis de catre admin-ul %s timp de %d minute. Motiv : %s. {FFA500}***", Jucator, Jucator2, Timp, Motiv);
SendClientMessageToAll (0xFFDEAD, Mesaj1);
format (Mesaj2, sizeof (Mesaj2), "{FFA500}*** {9370DB}[Informatie] {FFDEAD}L-ai inchis pe %s timp de %d minute. Motiv : %s. {FFA500}***", Jucator, Timp, Motiv);
SendClientMessage (playerid, 0xFFDEAD, Mesaj2);
format (Mesaj3, sizeof (Mesaj3), "{FFA500}*** {9370DB}[Informatie] {FFDEAD}Ai fost inchis de catre admin-ul %s timp de %d minute. Motiv : %s. {FFA500}***", Jucator2, Timp, Motiv);
SendClientMessage (IID, 0xFFDEAD, Mesaj3);
PlayerInfo [playerid] [pInchis] = 1;
SetPlayerPos (IID, 264.53, 77.43, 1001.04);
SetPlayerInterior (IID, 6);
SetPlayerVirtualWorld (IID, 1337);
Timer_Inchis [IID] = SetTimerEx ("Timp_Inchis", 60000 * Timp, 0, "i", IID);
}
return 1;
}
This is just one example, only 2 messages showed up.