14.04.2012, 22:35
I started a new GM, and, if i want to add a command, it dosen't work. No errors, but in game don't appear nothing if I enter the command.
Sorry for my English.
Sorry for my English.
|
I started a new GM, and, if i want to add a command, it dosen't work. No errors, but in game don't appear nothing if I enter the command.
Sorry for my English. |
if (strcmp (Comanda, "/asetadmin", true) == 0)
{
new Mesaj [256];
new Format [256];
new Trimitator [MAX_PLAYER_NAME];
new Receptor [MAX_PLAYER_NAME];
new Receptor_ID;
if (PlayerInfo [playerid] [pAdmin] == 4)
{
Format = strtok (cmdtext, Variabila);
if (!strlen (Format))
{
SendClientMessage (playerid, 0xFFFFFF, "{CC0000}*** {336633}[Informatie] {FFCC99}Formatul corect al acestei comenzi este : '/asetadmin [ID Jucator] [Nivel Admin]'. {CC0000}***");
return 1;
}
Receptor_ID = ReturnUser (Format);
Format = strtok (cmdtext, Variabila);
new Nivel = strval (Format);
if (Receptor_ID != INVALID_PLAYER_ID)
{
GetPlayerName (Receptor_ID, Receptor, sizeof (Receptor));
GetPlayerName (playerid, Trimitator, sizeof (Trimitator));
PlayerInfo [Receptor_ID] [pAdmin] = Nivel;
format (Mesaj, sizeof (Mesaj), "{CC0000}*** {336633}[Informatie] {FFCC99}Ai fost promovat la statutul de Admin Level %d de Administratorul %s. Felicitari. {CC0000}***", Nivel, Trimitator);
SendClientMessage (Receptor_ID, 0xFFFFFF, Mesaj);
format (Mesaj, sizeof (Mesaj), "{CC0000}*** {336633}[Informatie] {FFCC99}L-ai promovat la statutul de Admin Level %s pe %d. Speram sa nu dezamageasca. {CC0000}***", Receptor, PlayerInfo [Receptor_ID] [pAdmin]);
SendClientMessage (playerid, 0xFFFFFF, Mesaj);
}
else if (Receptor_ID == INVALID_PLAYER_ID)
{
format (Mesaj, sizeof (Mesaj), "{CC0000}*** {336633}[Informatie] {FFCC99}%i nu este conectat pe server. Verifica daca ai scris ID-ul corect. {CC0000}***", Receptor_ID);
SendClientMessage (playerid, 0xFFFFFF, Mesaj);
}
}
else
{
SendClientMessage (playerid, 0xFFFFFF, "{CC0000}*** {336633}[Informatie] {FFCC99}Nu esti autorizat sa folosesti aceasta comanda. Ia legatura cu unul din membrii echipei noastre pentru mai multe detalii. {CC0000}***");
}
return 1;
}