03.05.2013, 09:51
First line :
----------------------------------------------------------------------------------------------------------------------
"
//================================================== ================================================== ================================================== =======
// = Include-uri
//================================================== ================================================== ================================================== =======
#include <a_samp>
#include <core>
#include <float>
#include <time>
#include <file>
#include <utils>
#include <morphinc>
#include <JunkBuster>
#include <ChatColor>
static gTeam[MAX_PLAYERS];
#define MAX_SWEARS 100
#define STR 100
new EventText[(10 + 1)]; //10 is the size of the text + 1 for the EOS mark (you can write 11, too)
//================================================== ================================================== ================================================== =======
// = JunkBusted
//================================================== ================================================== ================================================== =======
#define GetPlayerMoney JB_GetPlayerMoney
#define ResetPlayerMoney JB_ResetPlayerMoney
#define GivePlayerMoney JB_GivePlayerMoney
#define PutPlayerInVehicle JB_PutPlayerInVehicle
#define GivePlayerWeapon JB_GivePlayerWeapon
#define SetPlayerPos JB_SetPlayerPos
#define SetVehiclePos JB_SetVehiclePos
"
---------------------------------------------------------------------------------------------------------------------
Second line :
"
//================================================== ================================================== ================================================== =======
// = OnPlayerCommandText
//================================================== ================================================== ================================================== =======
public OnPlayerCommandText(playerid, cmdtext[])
{
new string[256];
new playermoney;
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
new playername[MAX_PLAYER_NAME];
new cmd[256];
new tmp[256];
new giveplayerid, moneys, idx;
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/healall", true) == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 2)
{
format(string, sizeof(string), "Administratorul %s a dat heal la toti playerii on.", sendername);
SendClientMessageToAll(0xFF7171FF, string);
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
SetPlayerHealth(i, 100);
}
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "Nu ai permisiunea pentru a folosit aceasta comanda!");
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "Trebuie sa fi logat pentru a folosi aceasta comanda!");
}
return 1;
}
if(strcmp("/refresh", cmdtext, true,
== 0)
{
SetPlayerVirtualWorld( playerid, 0 );
SetPlayerInterior( playerid, 0 );
//ResetPlayerWeapons( playerid );
//SetPlayerMoney( playerid, 0 );
//SetPlayerScore( playerid, 0 );
SetPlayerHealth( playerid, 100.0 );
return 1;
}
if(EventText[0] != EOS) //checks if the first cell isnt the end of the string
if(strcmp(text, EventText, false) == 0) //checks if the typed text match
{
SendClientMessage(playerid, 0xFFFFFFAA, "*** You were the fastest!");
GivePlayerMoney(playerid, 10_000);
EventText[0] = EOS; //sets the first cell to END OF STRING (mark it as empty)
}
"
--------------------------------------------------------------------------------------------------------------------
Third and last line :
"
//================================================== ================================================== ================================================== =======
// = MoveCamera
//================================================== ================================================== ================================================== =======
public MoveCamera(playerid)
{
SetPlayerCameraPos(playerid, player_x - 2 * floatsin(-PlayerInfo[playerid][SpawnAngle], degrees), player_y - 10 * floatcos(-PlayerInfo[playerid][SpawnAngle], degrees), player_z + 3);
SetPlayerCameraLookAt(playerid, player_x, player_y, player_z + 0.5);
PlayerInfo[playerid][SpawnAngle] += 0.5;
if (PlayerInfo[playerid][SpawnAngle] >= 360.0)
PlayerInfo[playerid][SpawnAngle] = 0.0;
}
//================================================== ================================================== ================================================== =======
// = ClearChatbox
//================================================== ================================================== ================================================== =======
public ClearChatbox(playerid, lines)
{
if (IsPlayerConnected(playerid))
{
for(new i=0; i<lines; i++)
{
SendClientMessage(playerid, COLOR_GREY, " ");
}
}
return 1;
}
//================================================== ================================================== ================
// fast event
//================================================== ================================================== =================
for(new c = 1; c < sizeof EventText; c++) //fills the array with random letters or numbers
EventText[c - 1] = ((random(2)) ? ((random(2)) ? ('a' + random(26)) : ('A' + random(26))) : ('0' + random(10)));
SendClientMessageToAll(0x0000FFAA, "***** Who types the word as fastest gets 10_000$:");
SendClientMessageToAll(0x0000FFAA, EventText);
"
Sorry,i didn't know how to add a code into a box with a scroolable bar.
----------------------------------------------------------------------------------------------------------------------
"
//================================================== ================================================== ================================================== =======
// = Include-uri
//================================================== ================================================== ================================================== =======
#include <a_samp>
#include <core>
#include <float>
#include <time>
#include <file>
#include <utils>
#include <morphinc>
#include <JunkBuster>
#include <ChatColor>
static gTeam[MAX_PLAYERS];
#define MAX_SWEARS 100
#define STR 100
new EventText[(10 + 1)]; //10 is the size of the text + 1 for the EOS mark (you can write 11, too)
//================================================== ================================================== ================================================== =======
// = JunkBusted
//================================================== ================================================== ================================================== =======
#define GetPlayerMoney JB_GetPlayerMoney
#define ResetPlayerMoney JB_ResetPlayerMoney
#define GivePlayerMoney JB_GivePlayerMoney
#define PutPlayerInVehicle JB_PutPlayerInVehicle
#define GivePlayerWeapon JB_GivePlayerWeapon
#define SetPlayerPos JB_SetPlayerPos
#define SetVehiclePos JB_SetVehiclePos
"
---------------------------------------------------------------------------------------------------------------------
Second line :
"
//================================================== ================================================== ================================================== =======
// = OnPlayerCommandText
//================================================== ================================================== ================================================== =======
public OnPlayerCommandText(playerid, cmdtext[])
{
new string[256];
new playermoney;
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
new playername[MAX_PLAYER_NAME];
new cmd[256];
new tmp[256];
new giveplayerid, moneys, idx;
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/healall", true) == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 2)
{
format(string, sizeof(string), "Administratorul %s a dat heal la toti playerii on.", sendername);
SendClientMessageToAll(0xFF7171FF, string);
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
SetPlayerHealth(i, 100);
}
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "Nu ai permisiunea pentru a folosit aceasta comanda!");
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "Trebuie sa fi logat pentru a folosi aceasta comanda!");
}
return 1;
}
if(strcmp("/refresh", cmdtext, true,

{
SetPlayerVirtualWorld( playerid, 0 );
SetPlayerInterior( playerid, 0 );
//ResetPlayerWeapons( playerid );
//SetPlayerMoney( playerid, 0 );
//SetPlayerScore( playerid, 0 );
SetPlayerHealth( playerid, 100.0 );
return 1;
}
if(EventText[0] != EOS) //checks if the first cell isnt the end of the string
if(strcmp(text, EventText, false) == 0) //checks if the typed text match
{
SendClientMessage(playerid, 0xFFFFFFAA, "*** You were the fastest!");
GivePlayerMoney(playerid, 10_000);
EventText[0] = EOS; //sets the first cell to END OF STRING (mark it as empty)
}
"
--------------------------------------------------------------------------------------------------------------------
Third and last line :
"
//================================================== ================================================== ================================================== =======
// = MoveCamera
//================================================== ================================================== ================================================== =======
public MoveCamera(playerid)
{
SetPlayerCameraPos(playerid, player_x - 2 * floatsin(-PlayerInfo[playerid][SpawnAngle], degrees), player_y - 10 * floatcos(-PlayerInfo[playerid][SpawnAngle], degrees), player_z + 3);
SetPlayerCameraLookAt(playerid, player_x, player_y, player_z + 0.5);
PlayerInfo[playerid][SpawnAngle] += 0.5;
if (PlayerInfo[playerid][SpawnAngle] >= 360.0)
PlayerInfo[playerid][SpawnAngle] = 0.0;
}
//================================================== ================================================== ================================================== =======
// = ClearChatbox
//================================================== ================================================== ================================================== =======
public ClearChatbox(playerid, lines)
{
if (IsPlayerConnected(playerid))
{
for(new i=0; i<lines; i++)
{
SendClientMessage(playerid, COLOR_GREY, " ");
}
}
return 1;
}
//================================================== ================================================== ================
// fast event
//================================================== ================================================== =================
for(new c = 1; c < sizeof EventText; c++) //fills the array with random letters or numbers
EventText[c - 1] = ((random(2)) ? ((random(2)) ? ('a' + random(26)) : ('A' + random(26))) : ('0' + random(10)));
SendClientMessageToAll(0x0000FFAA, "***** Who types the word as fastest gets 10_000$:");
SendClientMessageToAll(0x0000FFAA, EventText);
"
Sorry,i didn't know how to add a code into a box with a scroolable bar.