27.12.2012, 18:19
Hey guys.
I just created two things in OnPlayerKeyStateChange. Two different things. But I got errors and it is wrong.. I dont know how to fix this..
This is it:
And this are the errors:
And I think this is wrong to.. I mean the command to do it.
I hope anyone can help me out of this!
Thanks for reading
Gr, mickos
I just created two things in OnPlayerKeyStateChange. Two different things. But I got errors and it is wrong.. I dont know how to fix this..
This is it:
PHP код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
{
if(PRESSED(KEY_JUMP) && jumper[playerid] == true){
GetPlayerVelocity(playerid, x, y, z);
SetPlayerVelocity(playerid, x, y, z+ 0.3);}
}
return 1;
}
if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING && spectatorid[playerid] != INVALID_PLAYER_ID)
{
if(newkeys & KEY_CROUCH) AdvanceSpectate(playerid);
else if(newkeys & KEY_JUMP) ReverseSpectate(playerid);
}
if(IsBeingSpeced[playerid] == 1)
{
foreach(Player, i)
{
if(spectatorid[i] == playerid)
{
SetPlayerInterior(i, GetPlayerInterior(playerid));
SetPlayerVirtualWorld(i, GetPlayerVirtualWorld(playerid));
}
}
}
return 1;
}
PHP код:
D:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(772) : error 010: invalid function or declaration
D:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(774) : error 010: invalid function or declaration
D:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(775) : error 010: invalid function or declaration
D:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(777) : error 010: invalid function or declaration
D:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(779) : error 010: invalid function or declaration
D:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(781) : error 010: invalid function or declaration
D:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(788) : error 010: invalid function or declaration
PHP код:
CMD:spsj(playerid, params[])
{
new str[128];
if(PlayerAcc[playerid][Log] == 0) return SendClientMessage(playerid, COLOR_ORANGE, "You are not logged in, please login first.");
if(PlayerAcc[playerid][Admin] >= 1)
GetPlayerVelocity(playerid, x, y, z);
SetPlayerVelocity(playerid, x, y, z+ 0.3); //Forces the player to jump
SendClientMessage(playerid, COLOR_YELLOW, "You have succesfully enabled super jump. /spsjo to turn it off."); jumper[playerid]=true;
return 1;
}
CMD:spsjo(playerid, params[])
{
new str[128];
if(PlayerAcc[playerid][Log] == 0) return SendClientMessage(playerid, COLOR_ORANGE, "You are not logged in, please login first.");
if(PlayerAcc[playerid][Admin] >= 1)
GetPlayerVelocity(playerid, x, y, z);
SetPlayerVelocity(playerid,0.0,0.0,0.0); //Forces the player to sink
SendClientMessage(playerid, COLOR_ORANGE, "You have succesfully disabled super jump. /spsj to turn it on"); jumper[playerid]=false;
return 1;
}
Thanks for reading
Gr, mickos