SA-MP Forums Archive
Admin hard commands! - 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: Admin hard commands! (/showthread.php?tid=582035)



Admin hard commands! - ironmen - 17.07.2015

Hey guyz i wanna make a command the let admins write commands for other players like /writecommand (playerid) (command)
Can you help me?
Thanks !
Ironmen


Re: Admin hard commands! - jamesmith12 - 17.07.2015

Nice idea ! i want this too lol


Re: Admin hard commands! - BladeFire - 17.07.2015

Is this possible to do this?


AW: Admin hard commands! - Kaliber - 17.07.2015

...No but you can script a filterscript and load it while the server runs and then only active this command for a special player


Re: Admin hard commands! - ironmen - 17.07.2015

Can anyone help me?!?!


Re: AW: Admin hard commands! - Alex Magaсa - 17.07.2015

Quote:
Originally Posted by Kaliber
Посмотреть сообщение
...No but you can script a filterscript and load it while the server runs and then only active this command for a special player
I would agree with this.
OP: I'm not sure this is possible and if its possible it needs scripting knowledge.


Re: Admin hard commands! - SpikeSpigel - 17.07.2015

No-.. that's not even possible. Cuz lets say that I do /writecommand 11 /car . And /car creats a car with ID color X, with X components and etc.

It won't work cuz that commands needs to script AUTOMATICALLY in the .PWN gamemode.. If this was even possible everyone could make a GM..


Re: Admin hard commands! - PrinceKumar - 17.07.2015

I think it is possible as you can create a text file using some scripting then you can also create a Filterscript(Only this) because in GM it would be hard i think. A best example is "tedit" which allows you to get some ideas about your question answer.


Re: Admin hard commands! - karemmahmed22 - 17.07.2015

Quote:

dcmd_fakecmd(playerid,params[])
{
if(AccInfo[playerid][Level] >= 5)
{
new tmp[256], tmp2[256], Index;
tmp = strtok(params,Index);
tmp2 = strtok(params,Index);

if(!strlen(tmp) || !strlen(tmp2)) return
SendClientMessage(playerid, LIGHTBLUE2, "Usage: /fakecmd [PlayerID] [Command]") &&
SendClientMessage(playerid, orange, "Function: Will sending a false Command used per Specified player");

new player1 = strval(tmp);
if(AccInfo[player1][Level] == ServerInfo[MaxAdminLevel] && AccInfo[playerid][Level] != ServerInfo[MaxAdminLevel])
return SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin");
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID)
{
SendCommandToAdmins(playerid,"FakeCmd");
CallRemoteFunction("OnPlayerCommandText", "is", player1, tmp2);
return SendClientMessage(playerid,blue,"|- Fake command sent! -|");
}
else return ErrorMessages(playerid, 2);
}
else return ErrorMessages(playerid, 1);
}

This code i got from LuxAdmin script, it wont work since no defines or anything
Its idea for how to make it


Re: Admin hard commands! - Moudix - 17.07.2015

How it's not possible ? it is.
It's called "fakecmd" and can be found in many admin systems. I used it in LuxAdmin.