/leavesuperadmin to not be able to use any of thorse keys.
Very nooby i guess.. but edit the keys and it can get useful if you need to help someone in your server to get to a place?
Code:
#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>
#if defined FILTERSCRIPT
#define COLOR_YELLOW 0xFFFF00AA
enum
e_PlayerInfo
{
superadmin
};
new pInfo[MAX_PLAYERS][e_PlayerInfo];
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}
#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(pInfo[playerid][superadmin] == 1)
if(IsPlayerAdmin(playerid))
if (PRESSED(KEY_JUMP))
{
new
Float:x,
Float:y,
Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x, y + 30.0, z + 7.0);
}
if(pInfo[playerid][superadmin] == 1)
if(IsPlayerAdmin(playerid))
if (PRESSED(KEY_SPRINT))
{
new
Float:x1,
Float:y1,
Float:z1;
GetPlayerPos(playerid, x1, y1, z1);
SetPlayerPos(playerid, x1 - 30.0, y1, z1);
}
if(pInfo[playerid][superadmin] == 1)
if(IsPlayerAdmin(playerid))
if (PRESSED(KEY_CROUCH))
{
new
Float:x2,
Float:y2,
Float:z2;
GetPlayerPos(playerid, x2, y2, z2);
SetPlayerPos(playerid, x2 + 30.0, y2, z2);
}
if(pInfo[playerid][superadmin] == 1)
if(IsPlayerAdmin(playerid))
if (PRESSED(KEY_FIRE))
{
new
Float:x3,
Float:y3,
Float:z3;
GetPlayerPos(playerid, x3, y3, z3);
SetPlayerPosFindZ(playerid, x3, y3, z3);
return 1;
}
return 1;
}
COMMAND:superadmin(playerid, params[])
{
if(IsPlayerAdmin(playerid))
if(pInfo[playerid][superadmin] == 1) return SendClientMessage(playerid, COLOR_YELLOW, "You are already in Super Admin Mode.");
pInfo[playerid][superadmin] = 1;
SetPlayerHealth(playerid, 999999);
return 1;
}
COMMAND:leavesuperadmin(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
SendClientMessage(playerid, COLOR_YELLOW, "You are no longer in Super Admin Mode");
pInfo[playerid][superadmin] = 0;
SetPlayerHealth(playerid, 100);
return 1;
}
SendClientMessage(playerid, COLOR_YELLOW, "You are not an rcon admin.");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
#endif