#1

Hi,

Look i have this and with this the player need to be freezed for 1 minute how to do that?Whet 1 minute passed to be unfreezed?
And i like for this when player is freezed to do annimation BOMB animation ? HOw?

pawn Код:
PlayerFreezed[playerid] = 1;
                SetTimer("Unfreeze", 120000, 0);
                GivePlayerMoney(playerid, 70000);
                SCM(playerid, WHITE, ""COL_GREEN"INFO:{FFFFFF}Uspesno ja hakiravte Narodnata Banka");
                SendClientMessage(playerid, WHITE, "{37F906}INFO:{FFFFFF}Mora da pocekate 1 minuta.");
Reply
#2

Код:
 
  // at your code: PlayerFreezed[playerid] = 1;
                SetTimerEx("UnFreezeThePlayer", 120000, 0,"d",playerid);
                GivePlayerMoney(playerid, 70000);
                SCM(playerid, WHITE, ""COL_GREEN"INFO:{FFFFFF}Uspesno ja hakiravte Narodnata Banka");
                SendClientMessage(playerid, WHITE, "{37F906}INFO:{FFFFFF}Mora da pocekate 1 minuta.");

forward UnFreezeThePlayer(playerid);
          public UnfreezePlayer(playerid);
          {
                   if(PlayerFreezed[playerid] == 1)
                    {
                          PlayerFreezerd[playerid] = 0;
                          TogglePlayerControllable(playerid,1);
                    }
           }
           return 1;
}
Reply
#3

pawn Код:
TogglePlayerControllable(playerid, 0);
To freeze a player, ApplyAnimation to give animation
pawn Код:
SetTimer("Unfreeze", 120000, 0);
This runs the Unfreeze function (which has to be public after 2 minutes (120000ms == 120s == 2min)), and then you run
pawn Код:
TogglePlayerControllable(playerid, 1);
In Unfreeze
Reply
#4

ok thanks for that but how to make when the player is freezed for 1 minute to do BOMB annimation?like planting a bomb?For 1 minute?
Reply
#5

Quote:
Originally Posted by Vizi
Посмотреть сообщение
ok thanks for that but how to make when the player is freezed for 1 minute to do BOMB annimation?like planting a bomb?For 1 minute?
Loop the animation , and after 1 minute passed, use this:
Код:
ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,0,0,0,0,0,1);
Reply
#6

Bro i have this error for the unfreeze
pawn Код:
F:\Users\Daniel\Desktop\GamingClub RP\gamemodes\DreamWorld.pwn(37123) : error 055: start of function body without function header
F:\Users\Daniel\Desktop\GamingClub RP\gamemodes\DreamWorld.pwn(37124) : error 010: invalid function or declaration
F:\Users\Daniel\Desktop\GamingClub RP\gamemodes\DreamWorld.pwn(37130) : error 010: invalid function or declaration
Line

pawn Код:
forward UnFreezeThePlayer(playerid);
          public UnfreezePlayer(playerid);
          { // first line
                   if(PlayerFreezed[playerid] == 1) // second line
                    {
                          PlayerFreezerd[playerid] = 0;
                          TogglePlayerControllable(playerid,1);
                    }
           }
           return 1; /// adn other line
}
Reply
#7

Quote:
Originally Posted by Vizi
Посмотреть сообщение
Bro i have this error for the unfreeze
pawn Код:
F:\Users\Daniel\Desktop\GamingClub RP\gamemodes\DreamWorld.pwn(37123) : error 055: start of function body without function header
F:\Users\Daniel\Desktop\GamingClub RP\gamemodes\DreamWorld.pwn(37124) : error 010: invalid function or declaration
F:\Users\Daniel\Desktop\GamingClub RP\gamemodes\DreamWorld.pwn(37130) : error 010: invalid function or declaration
Line

pawn Код:
forward UnFreezeThePlayer(playerid);
          public UnfreezePlayer(playerid);
          { // first line
                   if(PlayerFreezed[playerid] == 1) // second line
                    {
                          PlayerFreezerd[playerid] = 0;
                          TogglePlayerControllable(playerid,1);
                    }
           }
           return 1; /// adn other line
}
Код:
forward UnFreezeThePlayer(playerid);
          public UnfreezePlayer(playerid)
          { // first line
                   if(PlayerFreezed[playerid] == 1) // second line
                    {
                          PlayerFreezerd[playerid] = 0;
                          TogglePlayerControllable(playerid,1);
                    }
           }
           return 1; /// adn other line
}
Should work now. I forgot to remove the ' ; ' from the callback
Reply
#8

BRo now i have this error

pawn Код:
F:\Users\Daniel\Desktop\GamingClub RP\gamemodes\DreamWorld.pwn(37130) : error 010: invalid function or declaration
For line
pawn Код:
return 1; /// adn other line
ANd i want to ask for the annimaton
Does this animaton stop for one 1 minute?

pawn Код:
ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,0,0,0,0,0,1);
Reply
#9

Yes it will..for me it compiles good..:
Код:
forward UnFreezeThePlayer(playerid);

public UnFreezeThePlayer(playerid)
{ // first line
	if(IsPlayerConnected(playerid))
	{
		if(PlayerFreezed[playerid] == 1) // second line
        {
            PlayerFreezed[playerid] = 1;
            TogglePlayerControllable(playerid,1);
        }
    }
    return 1; /// adn other line
}
Reply
#10

its working but where to put the animation line?
Reply


Forum Jump:


Users browsing this thread: