Quote:
Originally Posted by gamer_Z
pawn Код:
new variable[MAX_PLAYERS]; //on connect if (dini_Exists(udb_encode(PlayerName(playerid)))) {// i suppose u have the playername func... new tmp[256]; tmp = dini_Get(udb_encode(PlayerName(playerid)), "level"); variable[playerid] = strval(tmp); } //in a command if(level[playerid] < /*mininal level*/1)...
also i think the lvl is saved in onplayerdisconnect? :P
have fun 
|
nice, it works, this is my command:
pawn Код:
if(strcmp(cmdtext, "/ad", true)==0)
{
if(level[playerid] < 1)
{
SendClientMessage(playerid, COLOR_RED, "You are an admin!");
}
else
{
SendClientMessage(playerid, COLOR_RED, "You are not authorized to use this command!");
}
return 1;
}
But now, players can use an admins name, and not login and still use the command!
How do I check if
Код:
logged[playerid] = 1;
if it is 0, then you can't use the command, if it is 1 and your an admin, you can use the command.