nobody here can help me with this ?
#1

Hello i have a problem with this i give myself admin 6/8 maximum and more 1339 i tryied all variantes and still tell me i dont have acces at many comands why? i tryied with rcon login too is blown gm mysql one please help me.
Reply
#2

Please show us /givemoney command
Reply
#3

at any commands do like that..any important comands
Reply
#4

Then just show us one of it
Reply
#5

Like he said, show us at least one command
Reply
#6

use zcmd instead of strcmp
replace all your strcmp code with zcmd

for the helpers here,
looking at the screen you get the unknown command thing that is made under onplayercommandperformed, and he either uses strcmp for some of his commands or any other cmd processor, when commandperformed only recognizes zcmd
Reply
#7

ok i will let here a comand..i modify from pAadmin from /makeadmin from 6 > to 0 and now work but some comands now work without have gm..lol.. look one comand


Quote:

if(strcmp(cmd, "/givemoney", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "{ffffff}Ne pare rau, dar nu esti logat pentru a utiliza aceata comanda!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendUsage(playerid,"/givemoney [playerid/PartOfName] [bani] [motiv]");
return 1;
}
new playa;
new money;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
money = strval(tmp);
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
if(EsteManager(playerid))
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
new year, month,day;
getdate(year, month, day);
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[200];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
for(new s = 0; s < num_words; s++)
{
new pos;
while((pos = strfind(result,Swears[s],true)) != -1) for(new i = pos, j = pos + strlen(Swears[s]); i < j; i++)
{
result[i] = '*';
}
}
if(!strlen(result))
{
SendUsage(playerid,"/givemoney [playerid/PartOfName] [suma] [motiv]");
return 1;
}
ConsumingMoney[playa] = 1;
GivePlayerCash(playa, money);
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, 256, "{C8D4D4}Adm{DB8E12}Warning:{FFFFFF} %s i-a setat bani la $%d la %s, Motiv: %s.", sendername, money, giveplayer, (result));
ABroadCast(COLOR_LIGHTRED,string,1);
format(string, sizeof(string), "[WARNING]: %s i-a dat $%d la %s, Motiv: %s . (%d-%d-%d)", sendername, money, giveplayer, (result), month, day, year);
AdminMoneyLog(string);

}
}
}
else
{
SendError(playerid,cmd);
}
}
return 1;
}

Reply
#8

if here modify this from 0 to 6 again with big admin some comands will say i dont have acces at them
Quote:

----------------------------------------Comanda-----------------------------------------//
if(strcmp(cmd, "/makeadmin", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerData[playerid][pAdmin] >= 0)
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "{ffffff}Ne pare rau, dar nu esti logat pentru a utiliza aceata comanda!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendUsage(playerid,"/makeadmin [playerid/PartOfName]");
return 1;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
if(EsteManager(playerid))
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
new day,month,year;
getdate(day,month,year);
new hour,minute,second;
gettime(hour,minute,second);
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "Ai fost promovat admin level %d de catre %s.", level, sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "L-ai promovat pe %s la admin level %d.", giveplayer,level);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "%s l-a promovat pe %s la admin level %d.", sendername, giveplayer,level);
ABroadCast(COLOR_LIGHTBLUE, string, 1);
format(string, sizeof(string), "%s l-a promovat pe %s la admin level %d (%d-%d-%d), (%d:%d:%d)", sendername, giveplayer,level,day,month,year,hour,minute,second );
HackLog(string);
new query[128];
PlayerData[para1][pAdmin] = level;
format(query, sizeof(query), "UPDATE players SET AdminLevel='%d' WHERE id=%d", PlayerData[para1][pAdmin], PlayerData[para1][pSQLID]);
mysql_query(query);
}
}
}

}
}
return 1;

Reply
#9

like i said, change it into zcmd
Reply
#10

Show us EsteManager(playerid) function.
Reply


Forum Jump:


Users browsing this thread: