03.09.2012, 13:50
I got this
#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(pInfo[playerid][superadmin] == 0)) return SendClientMessage(playerid, COLOR_YELLOW, "You are not in Super Admin Mode.");
if(IsPlayerAdmin(playerid))
if (PRESSED(KEY_JUMP))
{
new
Float,
Float:y,
Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x, y, z + 10.0);
}
return 1;
}
COMMANDuperadmin(playerid, params[])
{
if(IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_YELLOW, "You are not an Rcon Admin.");
pInfo[playerid][superadmin] = 1;
SendClientMessage(playerid, COLOR_YELLOW, "You are now in Super Admin Mode.");
return 1;
}
error 029: invalid expression, assumed zero
warning 215: expression has no effect
error 001: expected token: ";", but found "return"
All on the "if(pInfo[playerid] etc line
There is something i do wrong with thorse if's after each other i think, but i don't know how i should set them up.
#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(pInfo[playerid][superadmin] == 0)) return SendClientMessage(playerid, COLOR_YELLOW, "You are not in Super Admin Mode.");
if(IsPlayerAdmin(playerid))
if (PRESSED(KEY_JUMP))
{
new
Float,
Float:y,
Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x, y, z + 10.0);
}
return 1;
}
COMMANDuperadmin(playerid, params[])
{
if(IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_YELLOW, "You are not an Rcon Admin.");
pInfo[playerid][superadmin] = 1;
SendClientMessage(playerid, COLOR_YELLOW, "You are now in Super Admin Mode.");
return 1;
}
error 029: invalid expression, assumed zero
warning 215: expression has no effect
error 001: expected token: ";", but found "return"
All on the "if(pInfo[playerid] etc line
There is something i do wrong with thorse if's after each other i think, but i don't know how i should set them up.