/jetpack problem, player stays at place, but also is flying
#1

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
Reply
#2

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.
Reply
#3

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?
Reply
#4

Quote:
Originally Posted by niels44
View Post
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.
Reply
#5

k i will, havent got any testers online atm, but i will test it when there is one online
Reply
#6

I will be more than glad to come help you out for now
Reply
#7

Search in OnPlayerUpdate or show that callback

something like

pawn Code:
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK) return 0;
Reply
#8

Return 1 on OnPlayerUpdate callback
Reply
#9

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
Reply
#10

pawn Code:
CMD:jetpack(playerid)
{
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USEJETPACK);
    return 1;
}
Search for OnPlayerUpdate and check if it returns 1.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)