Anim problem with JETPACK -
blanic - 12.06.2016
I use this command to get jetpack for admin players, but my arms are stuck
http://i.imgur.com/1m0uFzC.jpg
This is the code
PHP код:
CMD:jetpack(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
}
else if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
{
ClearAnimations(playerid);
return 1;
}
return 1;
}
Re: Anim problem with JETPACK -
FuNkYTheGreat - 12.06.2016
Try This command
Код:
CMD:jetpack(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK) return SendClientMessage(playerid, COLOR_RED, "[JETPACK] "white"You are already using a jetpack.");
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
SendClientMessage(playerid, COLOR_RED, "You have spawned jetpack.");
}
else
{
SendClientMessage(playerid, -1, "You Are Not Authorized To Use This Command.");
}
return 1;
}
Re: Anim problem with JETPACK -
blanic - 12.06.2016
It's not what I want.
I want to spawn jetpack by /jetpack (only if player is admin) and remove the jetpack with the same command
Re: Anim problem with JETPACK -
FuNkYTheGreat - 12.06.2016
Код:
CMD:jetpack(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
new jetpack = GetPVarInt(playerid, "JetPack");
if(jetpack == 0)
{
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
SendClientMessage(playerid, COLOR_RED, "You have spawned jetpack.");
}
else
{
ClearAnimations(playerid);
SendClientMessage(playerid, COLOR_RED, "Your JetPack Is now Gone.");
SetPVarInt(playerid, "GodMode", 0);
}
}
else
{
SendClientMessage(playerid, -1, "You Are Not Authorized To Use This Command..");
}
return 1;
}
Re: Anim problem with JETPACK -
blanic - 12.06.2016
No, it's not fine because id 0 will change, you're not helping me
Re: Anim problem with JETPACK -
FuNkYTheGreat - 12.06.2016
i Edited my post. now see
Re: Anim problem with JETPACK -
AbyssMorgan - 12.06.2016
PHP код:
CMD:jetpack(playerid){
if(!IsPlayerAdmin(playerid)) return 0;
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK){
ClearAnimations(playerid);
} else {
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USEJETPACK);
}
return 1;
}
Re: Anim problem with JETPACK -
Dayrion - 12.06.2016
Firstly, intend your code because this one is clearly bad to see.
This one is perfectly working for me.
PHP код:
CMD:jetpack(playerid)
{
if(!IsPlayerAdmin(playerid)) return 1;
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK) ClearAnimations(playerid);
else SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK), SendClientMessage(playerid, -1, "You have spawned jetpack.");
return 1;
}
Re: Anim problem with JETPACK -
blanic - 12.06.2016
I get the same problem with the codes you posted
Re: Anim problem with JETPACK -
blanic - 12.06.2016
This command works on my previous gamemode, but it's not working on new gamemode
PHP код:
CMD:jetpack(playerid, params[]) {
if(AdminDuty[playerid] != 1)
{
SendClientMessage(playerid, 0x04C4D9AA, "|- Devi essere Aduty per porter utilizzare i comandi admin -|");
return 1;
}
else if(AdminDuty[playerid] != 0) {
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
}
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK) {
ClearAnimations(playerid);
}
return 1;
}