[Script] Info

/*/
Creditos :
[BSP]HIGOR
/*/

//==============================================================================
// Includes
//==============================================================================
#include "a_samp"
#include "time"

//==============================================================================
// New
//==============================================================================
new Text:TextdrawName2;//Name
new Text:TextdrawName;//Name
new Text:TextdrawTime;//Time
new Menu:info;//info menu
new Time[MAX_PLAYERS];
new Name[MAX_PLAYERS];
// 1 = on
// 0 = off

//==============================================================================
// Forwards
//==============================================================================
forward Clock(playerid);//clock

//==============================================================================
// OnFilterScriptInit()
//==============================================================================
public OnFilterScriptInit()
{
//info menu
info = CreateMenu("info", 1, 50.0, 180.0, 200.0, 200.0);
AddMenuItem(info, 0, "Name (on/off)");
AddMenuItem(info, 0, "Time (on/off)");
AddMenuItem(info, 0, "Exit");
//Name
TextdrawName = TextDrawCreate(499.000000,104.000000,"~b~Nome aqui"); //Troque aqui o nome para aparecer no text draw Azul de cima
TextDrawAlignment(TextdrawName,0);
TextDrawBackgroundColor(TextdrawName,0x000000ff);
TextDrawFont(TextdrawName,3);
TextDrawLetterSize(TextdrawName,0.299999,1.000000);
TextDrawColor(TextdrawName,0xffffffff);
TextDrawSetOutline(TextdrawName,1);
TextDrawSetProportional(TextdrawName,1);
TextDrawSetShadow(TextdrawName,1);

TextdrawTime = TextDrawCreate(499.000000,118.000000,"www.blogdosa-mp.rg3.net");
TextDrawAlignment(TextdrawName2,0);
TextDrawBackgroundColor(TextdrawName2,0x000000ff);
TextDrawFont(TextdrawName2,3);
TextDrawLetterSize(TextdrawName2,0.299999,1.000000);
TextDrawColor(TextdrawName,0xffffffff);
TextDrawSetOutline(TextdrawName2,1);
TextDrawSetProportional(TextdrawName2,1);
TextDrawSetShadow(TextdrawName2,1);
//Timer
SetTimer("Clock", 1000, 1);
return 1;
}

//==============================================================================
// OnFilterScriptExit()
//==============================================================================
public OnFilterScriptExit()
{
DestroyMenu(info);
TextDrawDestroy(TextdrawName);
TextDrawDestroy(TextdrawTime);
return 1;
}

//==============================================================================
// OnPlayerConnect(playerid)
//==============================================================================
public OnPlayerConnect(playerid)
{
Time[playerid] = 1;
Name[playerid] = 1;
return 1;
}

//==============================================================================
// OnPlayerSpawn(playerid)
//==============================================================================
public OnPlayerSpawn(playerid)
{
if (Time[playerid] == 1)
{
TextDrawShowForPlayer(playerid, TextdrawTime);//Time
}
if (Name[playerid] == 1)
{
TextDrawShowForPlayer(playerid, TextdrawName);//Name
}
if (Name[playerid] == 1)
{
TextDrawShowForPlayer(playerid, TextdrawName2);//Name
}
return 1;
}

//==============================================================================
// Clock(playerid)
//==============================================================================
public Clock(playerid)
{
new string[256];
new hour, minute, second;
gettime(hour,minute,second);
format(string, sizeof(string), "BRASIL[BSP]RPG GAME", hour, minute, second); //Troque aqui para o Text Draw De baixo
TextDrawSetString(Text:TextdrawTime, string);
return 1;
}

//==============================================================================
// OnPlayerSelectedMenuRow(playerid, row)

//==============================================================================
// OnPlayerCommandText(playerid, cmdtext[])
//==============================================================================
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/hahaa", cmdtext, true, 10) == 0)
{
ShowMenuForPlayer(info, playerid);
TogglePlayerControllable(playerid, 0);
return 1;
}
return 0;
}

//==============================================================================
// OnPlayerExitedMenu(playerid)
//==============================================================================
public OnPlayerExitedMenu(playerid)
{
TogglePlayerControllable(playerid, 1);
return 1;
}
Proxima
« Anterior
Anterior
Proxima »
Postar um comentário
Obrigado pelo seu comentário