SA-MP Forums Archive
[Include] PlayHard's Freezer - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] PlayHard's Freezer (/showthread.php?tid=307681)



PlayHard's Freezer - PlayHard - 31.12.2011

Information:

It's a very simple include that helps you setting time at the freezing function.

How to use?

For example if you decide to make a command that will freeze a player and do something like like kill him, this one is for you. You can use it like this:

pawn Код:
//******'s commands:
YCMD:test(playerid, params[])
{
    Freezer(playerid, 5000);
    SendClientMessage(playerid, COLOR_GREY, "You've been frozen for 5 seconds");
    return 1;
}
//STRCMP:
if (strcmp("/test", cmdtext, true, 10) == 0)
{
    Freezer(playerid, 5000);
    SendClientMessage(playerid, COLOR_GREY, "You've been frozen for 5 seconds");
    return 1;
}
//Zeex's commands:
CMD:test(playerid, params[])
{
    Freezer(playerid, 5000);
    SendClientMessage(playerid, COLOR_GREY, "You've been frozen for 5 seconds");
    return 1;
}
For sure you have to insert a time using Milliseconds.

Installation:

In order to let it work copy Freezer.inc to your SA-MP Server directory/Pawno/include and put the following under (#include <a_samp>)
pawn Код:
#include <Freezer>
Download:



Re: PlayHard's Freezer - SourceCode - 31.12.2011

Why don't u post it in snippets?


Re: PlayHard's Freezer - Mr.Fames - 31.12.2011

it is useful according to me good job reped


Re: PlayHard's Freezer - Mike_Peterson - 31.12.2011

Let me point you on a few things..
1. All your releases have 'Playhard's' in it.
2. Your avatar is screwed up.
3. Good for newbies that can't make (simple) timers theirselfs.
4. Why solidfiles?


Re: PlayHard's Freezer - PlayHard - 31.12.2011

Quote:
Originally Posted by SourceCode
Посмотреть сообщение
Why don't u post it in snippets?
I'll post the link there. Thanks.

Quote:
Originally Posted by Mr.Fames
Посмотреть сообщение
it is useful according to me good job reped
Thank you and I am so glad to hear that it helped you .

Quote:
Originally Posted by Mike_Peterson
Посмотреть сообщение
Let me point you on a few things..
1. All your releases have 'Playhard's' in it.
2. Your avatar is screwed up.
3. Good for newbies that can't make (simple) timers theirselfs.
4. Why solidfiles?
LOL, A list. Okay um,

1) What should my releases names be then ?!
2) I know :P, Changing it soon.
3) Thank you :3
4) Because it's Sexy & it knows it, Haha.


Re: PlayHard's Freezer - _DownLoaD_ - 31.12.2011

thx, i will use it


Re: PlayHard's Freezer - Camacorn - 31.12.2011

I will not be using it, but i figured i'll still comment on it.

Very easy to make, but could come in handy for some people, good work.


Re: PlayHard's Freezer - Mosslah - 31.12.2011

A friend of mine was struggling with timers and freezing, so this could be very handy for him. Good job.


Respuesta: PlayHard's Freezer - [Nikk] - 31.12.2011

Exelent, frezee players very easy! thanks i will use it


Re: PlayHard's Freezer - dr.pepper - 31.12.2011

Great job sir, now I don't have to set it by myself.


Re: PlayHard's Freezer - juraska - 31.12.2011

Wow great idea, freeze for time


Re: PlayHard's Freezer - iZN - 31.12.2011

Not bad, good for newbies. Also add an pastebin link.


Re: PlayHard's Freezer - PlayHard - 31.12.2011

Thanks a lot guys, I am so glad that you liked the include and the idea!

- Pastebin will be posted in 2 minutes .


Re: PlayHard's Freezer - Riddick94 - 31.12.2011

Or maybe like that?

pawn Код:
public FreezePlayer(playerid, time)
{
    if(time > 0)
    {
        TogglePlayerControllable(playerid, false);
        SetTimerEx("FreezePlayer", 1000, false, "ii", playerid, time-1);
    }

    else
    {
        TogglePlayerControllable(playerid, true);
    }
    return true;
}



Re: PlayHard's Freezer - PlayHard - 31.12.2011

Quote:
Originally Posted by Riddick94
Посмотреть сообщение
Or maybe like that?

pawn Код:
public FreezePlayer(playerid, time)
{
    if(time > 0)
    {
        TogglePlayerControllable(playerid, false);
        SetTimerEx("FreezePlayer", 1000, false, "ii", playerid, time-1);
    }

    else
    {
        TogglePlayerControllable(playerid, true);
    }
    return true;
}
Thanks, but I'll just keep it as simple as mine .


Re: PlayHard's Freezer - coole210 - 31.12.2011

His is more efficient and simple.