Sleep System
#1

I want to create Sleep system for samp with timer texdraw and command.
Timer: I want to create timer and to check every 2 hours and when time expire to send player message
Textdraw: I want to create some black textdraw that in on full screen(everything is black) when player use command
Command: I want to create command for sleeping and when type command to setplayer textdraw for 2-3 minutes, if player not type command to kill him.

How to make this ??
Reply
#2

Help Please
Reply
#3

pawn Код:
new sTimer[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    sTimer[playerid] = SetTimerEx("SleepMessage", 2 * 60 * 60 * 1000, true, "i", playerid);
    return 1;
}

forward SleepMessage(playerid);
public SleepMessage(playerid)
{
    SendClientMessage(playerid, -1, "Message");
    return 1;
}
Black screen:
pawn Код:
new Text: blackTD;

public OnGameModeInit()
{
    blackTD = TextDrawCreate(-20.000000,2.000000,"|");
    TextDrawUseBox(blackTD,1);
    TextDrawBoxColor(blackTD,0x000000ff);
    TextDrawTextSize(blackTD,660.000000,22.000000);
    TextDrawAlignment(blackTD,0);
    TextDrawBackgroundColor(blackTD,0x000000ff);
    TextDrawFont(blackTD,3);
    TextDrawLetterSize(blackTD,1.000000,52.200000);
    TextDrawColor(blackTD,0x000000ff);
    TextDrawSetOutline(blackTD,1);
    TextDrawSetProportional(blackTD,1);
    TextDrawSetShadow(blackTD,1);
    return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/blackscreen"))
    {
        TextDrawShowForPlayer(playerid, blackTD);
        return 1;
    }
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)