Hello i still remember you , your script is You just go in game type /rcon login [password] to use this command for now
Add this code anywhere in your script
pawn Код:
stock GetPlayerNameEx(playerid)
{
new Name[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
return Name;
}
Main command :
pawn Код:
CMD:dutyon(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF0000AA,"You are not adminstrator to use godmode");
SetPlayerHealth(playerid,999999);
SetPlayerArmour(playerid,999999);
SetPlayerSkin(playerid,217);
new Float:x,Float:y,Float:z;
new Text3D:label = Create3DTextLabel("Admin On Duty!", 0xED0909FF,x,y,z, 40.0, 0, 0);
Attach3DTextLabelToPlayer(label,playerid,0.0, 0.0, 0.7);
GivePlayerWeapon(playerid,38,99999);
new string[126];
format(string,sizeof(string),"{FF0000}Adminstrator %s in now in duty!",GetPlayerNameEx(playerid));
SendClientMessageToAll(-1,string);
return 1;
}
CMD:dutyoff(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF0000AA,"You are not adminstrator to turn off godmode");
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,100);
new string[126];
format(string,sizeof(string),"{FF0000}Adminstrator %s off duty!",GetPlayerNameEx(playerid));
SendClientMessageToAll(-1,string);
return 1;
}
Now just try to delete this part
pawn Код:
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF0000AA,"You are not adminstrator to use godmode");
And delete same part from cmd:dutyoff command
[pawn]
pawn Код:
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF0000AA,"You are not adminstrator to use godmode");
It's now working with out /rcon login... any player can turn on/off duty