When login rcon in game it says you are not authorized to use this command but i rcon or owner - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: When login rcon in game it says you are not authorized to use this command but i rcon or owner (
/showthread.php?tid=614424)
When login rcon in game it says you are not authorized to use this command but i rcon or owner -
Dejan12345 - 08.08.2016
Код:
CMD:makeleader(playerid,params[])
{
new string[128], igrac, giveplayerid, giveplayer[MAX_PLAYER_NAME], level, sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
if(PlayerInfo[playerid][pAdmin] >= 4)
{
if(!sscanf(params, "ui", giveplayerid, level))
{
PlayerInfo[igrac][pRank] = 6;
PlayerInfo[igrac][pMember] = 0;
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
if(giveplayerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1,"Pogresan igracev id");
PlayerInfo[giveplayerid][pLeader] = level;
format(string, sizeof(string), "Dao si igracu %s lidera organizacije[%i]", giveplayer, level);
SendClientMessage(playerid, -1, string);
format(string, sizeof(string), "Admin %s ti je dao lidera organizacije[%i]", sendername, level);
SendClientMessage(giveplayerid, -1, string);
if(level == 0) { PlayerInfo[giveplayerid][pSkin] = 0; PlayerInfo[giveplayerid][pRank] = 0; return 1; }
else if(level == 1) { PlayerInfo[giveplayerid][pSkin] = 288; } //Policija
SetPlayerSkin(giveplayerid,PlayerInfo[giveplayerid][pSkin]);
}
else SendClientMessage(playerid, -1,"Koristenje /makeleader [IDigraca/Dio imena] [broj(1-0)]");
}
else SendClientMessage(playerid, -1,"Niste ovlasteni da koristite ovu komandu");
return 1;
}
help
Re: When login rcon in game it says you are not authorized to use this command but i rcon or owner -
Viggo - 08.08.2016
Rcon doesnt set your admin level to 4..
Make a RCON command to set your level.
Re: When login rcon in game it says you are not authorized to use this command but i rcon or owner -
Dejan12345 - 08.08.2016
how to
Re: When login rcon in game it says you are not authorized to use this command but i rcon or owner -
Shinja - 08.08.2016
PHP код:
if(PlayerInfo[playerid][pAdmin] >= 4 || IsPlayerAdmin(playerid))
Re: When login rcon in game it says you are not authorized to use this command but i rcon or owner - Quinncell - 08.08.2016
Read this
Also you made a mistake at the beginning of you script.You set it if the players admin is level 4 or higher he may use this command.No.You need to set it to
if(IsPlayerAdmin(playerid))
Then the command will only be for rcon admins.
Re: When login rcon in game it says you are not authorized to use this command but i rcon or owner -
Dejan12345 - 08.08.2016
tnxx