/jetpack problem, player stays at place, but also is flying -
niels44 - 12.11.2012
hey everyone,
i made this little /jetpack and /jp cmd, but now there is a bugg i really want to fix,
when i do /jetpack, it all works and i get a jetpack, and i can fly around, but at the other player, lets say my friend, at him im still standing at the place i did /jetpack, and am not flying around...
so this is my code:
pawn Code:
CMD:jetpack(playerid, params[])
{
if(PlayerInfo[playerid][AdminLevel] >= 3)
{
SetPlayerSpecialAction(playerid, 2);
SendCommandToAdmins(playerid,"/jetpack");
}
else return SendClientMessage(playerid, COLOR_RED, "ERROR: you need to be atleast Admin Level 3 to use this command");
return 1;
}
anyone knows why he is doing this? and not just lets me fly at EVERYONE, instead of just at me and at rest im just standing there...
greets niels
Re: /jetpack problem, player stays at place, but also is flying -
MichaelWharton101 - 12.11.2012
Code:
CMD:jetpack(playerid, params[])
{
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(PlayerInfo[playerid][AdminLevel] < 3) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
if(sscanf(params, "u", playerid)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /jetpack [playerid]");
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
return 1;
}
This is my /jetpack command, I am sure you know what to do to get it to work for you.
Re: /jetpack problem, player stays at place, but also is flying -
niels44 - 12.11.2012
same as me right? only thingy different is SPECIAL_ACTION_USEJETPACK, but thats same as 2 right? and the isplayerlogged wont make any different right?
Re: /jetpack problem, player stays at place, but also is flying -
MichaelWharton101 - 12.11.2012
Quote:
Originally Posted by niels44
same as me right? only thingy different is SPECIAL_ACTION_USEJETPACK, but thats same as 2 right? and the isplayerlogged wont make any different right?
|
Yep... Let me know if it works.
Re: /jetpack problem, player stays at place, but also is flying -
niels44 - 12.11.2012
k i will, havent got any testers online atm, but i will test it when there is one online
Re: /jetpack problem, player stays at place, but also is flying -
MichaelWharton101 - 12.11.2012
I will be more than glad to come help you out for now
Re: /jetpack problem, player stays at place, but also is flying -
Jefff - 12.11.2012
Search in OnPlayerUpdate or show that callback
something like
pawn Code:
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK) return 0;
Re: /jetpack problem, player stays at place, but also is flying -
Plovix - 12.11.2012
Return 1 on OnPlayerUpdate callback
Re: /jetpack problem, player stays at place, but also is flying -
pln102 - 12.11.2012
Here is my code
Code:
CMD:jetpack(playerid)
{
if(PlayerInfo[playerid][pAdmin] >= 3)
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USEJETPACK);
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, " No jetpack for you!!!");
}
return 1;
}
I hope that fixed your problem
Re: /jetpack problem, player stays at place, but also is flying -
Face9000 - 12.11.2012
pawn Code:
CMD:jetpack(playerid)
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USEJETPACK);
return 1;
}
Search for OnPlayerUpdate and check if it returns 1.