level Admin don't work
#1

Hi all i'm using a system level Admin who don't work.
In the top of my GM i use new niveauAdmin[MAX_PLAYERS];
In Callback OnPlayerConnect i have
new nomDuJoueur[MAX_PLAYER_NAME], string[256], file[256];
GetPlayerName(playerid, nomDuJoueur, sizeof(nomDuJoueur));
format(string, sizeof(string), "%s s'est connectй au Serveur",nomDuJoueur);
if(!IsPlayerNPC(playerid)) {SendClientMessageToAll(bleu_clair, string);}
format(string, sizeof(string), "Bienvenue sur le Serveur, %s",nomDuJoueur);
format(file, sizeof(file), "/Joueurs/%s.ini",nomDuJoueur);
if(!dini_Exists(file))
{
dini_Create(file);
dini_Set(file,"Pseudo", nomDuJoueur);
dini_Set(file,"Admin","0");
}

And in a cmd to respawn some cars i have :
if(strcmp("/reparerdepotadmin", cmdtext, true) == 0)
{
new nomDuJoueur[MAX_PLAYER_NAME], file[256];
GetPlayerName(playerid, nomDuJoueur, sizeof(nomDuJoueur));
format(file, sizeof(file), "/Joueurs/%s.ini",nomDuJoueur);
niveauAdmin = dini_Get(file,"Admin");
if (niveauAdmin[playerid] == 3)
{
SetVehicleToRespawn(3);
SetVehicleToRespawn(4);
SetVehicleToRespawn(5);
SetVehicleToRespawn(6);
SetVehicleToRespawn(7);
SetVehicleToRespawn(;
SetVehicleToRespawn(9);
SetVehicleToRespawn(10);
SetVehicleToRespawn(11);
SetVehicleToRespawn(12);
SetVehicleToRespawn(13);
SetVehicleToRespawn(14);
SetVehicleToRespawn(15);
SetVehicleToRespawn(16);
SetVehicleToRespawn(17);
SetVehicleToRespawn(1;
SetVehicleToRespawn(19);
SendAdminMessage(jaune, "Les vйhicules du dйpot Admin ont respawnйs");
}

else
{
SendClientMessage(playerid, rouge, "Vous n'кtes pas autorise а utiliser cette commande !");
}
return 1;
}

Thanks to rode this and sorry for bad english.
Reply


Messages In This Thread
level Admin don't work - by will-56 - 14.05.2011, 22:14

Forum Jump:


Users browsing this thread: 1 Guest(s)