[Include] PlayHard's Freezer
#1

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

Why don't u post it in snippets?
Reply
#3

it is useful according to me good job reped
Reply
#4

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

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

thx, i will use it
Reply
#7

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

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

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

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

Wow great idea, freeze for time
Reply
#12

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

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

- Pastebin will be posted in 2 minutes .
Reply
#14

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;
}
Reply
#15

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

His is more efficient and simple.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)