03.09.2012, 16:37
I got this:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(pInfo[playerid][superadmin] == 1)
if(IsPlayerAdmin(playerid))
if (PRESSED(KEY_JUMP))
{
new
Float,
Float:y,
Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x, y + 10.0, z + 10.0);
}
return 1;
}
But i want more too, like:
if(pInfo[playerid][superadmin] == 1)
if(IsPlayerAdmin(playerid))
if (PRESSED(KEY_LEFT))
{
new
Float,
Float:y,
Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x - 10.0, y, z);
just an example there, but how to put it together?
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(pInfo[playerid][superadmin] == 1)
if(IsPlayerAdmin(playerid))
if (PRESSED(KEY_JUMP))
{
new
Float,
Float:y,
Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x, y + 10.0, z + 10.0);
}
return 1;
}
But i want more too, like:
if(pInfo[playerid][superadmin] == 1)
if(IsPlayerAdmin(playerid))
if (PRESSED(KEY_LEFT))
{
new
Float,
Float:y,
Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x - 10.0, y, z);
just an example there, but how to put it together?