View difference between Paste ID: qtZGnkNz and DFKt9mj6
SHOW: | | - or go back to the newest paste.
1-
#include <a_samp>
1+
#include <a_samp>
2-
#include <a_mysql>
2+
#include <a_mysql>
3-
#include <dns>
3+
#include <dns>
4-
#include <streamer>
4+
#include <streamer>
5-
#include <zcmd>
5+
#include <zcmd>
6-
#include <CTime>
6+
#include <CTime>
7-
7+
8-
native WP_Hash(buffer[], len, const str[]);
8+
native WP_Hash(buffer[], len, const str[]);
9-
native sscanf(const sting[], const pattern[], {Float,_}:...);
9+
native sscanf(const sting[], const pattern[], {Float,_}:...);
10-
10+
11-
main() {
11+
main() {
12-
	printf("MyRPG: Compilação 1 (0.1) por Stewie`\n \
12+
	printf("MyRPG: Compilação 1 (0.1) por Stewie`\n \
13-
			\t Luís Gustavo Miki");
13+
			\t Luís Gustavo Miki");
14-
	return 1;
14+
	return 1;
15
}
16-
16+
17-
#if defined MAX_PLAYERS
17+
#if defined MAX_PLAYERS
18-
	#undef MAX_PLAYERS
18+
	#undef MAX_PLAYERS
19-
#endif 
19+
#endif 
20-
20+
21-
// // // // // // // // // // // // // // // // // // //
21+
// // // // // // // // // // // // // // // // // // //
22-
//   MyRPG é o nome do gamemode RPG 100% brasileiro   //
22+
//   MyRPG é o nome do gamemode RPG 100% brasileiro   //
23-
//   codado totalmente do 0, para criar um novo 	  //
23+
//   codado totalmente do 0, para criar um novo 	  //
24-
//   [i]conceito[/i] de RPG, sendo as coisas mais	  //
24+
//   [i]conceito[/i] de RPG, sendo as coisas mais	  //
25-
//   simples mais realístico possivel, apenas com 	  //
25+
//   simples mais realístico possivel, apenas com 	  //
26-
//	 restrição de script, fazendo com que o mode	  //
26+
//	 restrição de script, fazendo com que o mode	  //
27-
// 	 dê a vontade de tentar tudo.					  //
27+
// 	 dê a vontade de tentar tudo.					  //
28-
// // // // // // // // // // // // // // // // // // //
28+
// // // // // // // // // // // // // // // // // // //
29-
//
29+
//
30-
// 	Creditos iniciais a:
30+
// 	Creditos iniciais a:
31-
//      + Stewie` 	(Luís Gustavo Miki)
31+
//      + Stewie` 	(Luís Gustavo Miki)
32-
//		+ BlueX 	(Gonçalo Rebelo)
32+
//		+ BlueX 	(Gonçalo Rebelo)
33-
//		+ Viih 		(Victor Ferraresi)  
33+
//		+ Viih 		(Victor Ferraresi)  
34-
//			
34+
//			
35-
//			- Apenas essas pessoas tem os direitos
35+
//			- Apenas essas pessoas tem os direitos
36-
//			  para com o script.
36+
//			  para com o script.
37-
//			
37+
//			
38-
//
38+
//
39-
//
39+
//
40-
//
40+
//
41-
//
41+
//
42-
42+
43-
//
43+
//
44-
//
44+
//
45-
//
45+
//
46-
//
46+
//
47-
//
47+
//
48-
48+
49-
//
49+
//
50-
// ESSE GAMEMODE FOI FEITO DO 0 POR LUÍS GUSTAVO MIKI
50+
// ESSE GAMEMODE FOI FEITO DO 0 POR LUÍS GUSTAVO MIKI
51-
// POR INTEIRO. TUDO CONTINDO NESSE GAMEMODE E PROPRIEDADE
51+
// POR INTEIRO. TUDO CONTINDO NESSE GAMEMODE E PROPRIEDADE
52-
// DE LUIS GUSTAVO MIKI.
52+
// DE LUIS GUSTAVO MIKI.
53-
//
53+
//
54-
// (Partes de outros autores serão mencionados ao decorrer do script)
54+
// (Partes de outros autores serão mencionados ao decorrer do script)
55-
55+
56-
56+
57-
// Começo do script:
57+
// Começo do script:
58-
58+
59-
// Constantes importantes
59+
// Constantes importantes
60-
60+
61-
new const 
61+
new const 
62-
	SCRIPT_VERSION[] = "0.1 (Rev 0)",
62+
	SCRIPT_VERSION[] = "0.1 (Rev 0)",
63-
	SERVER_NAME[] = "RioRPG",
63+
	SERVER_NAME[] = "RioRPG",
64-
	MAX_PLAYERS = 800,
64+
	MAX_PLAYERS = 800,
65-
	
65+
	
66-
	DB_HOSTNAME[] = "localhost",
66+
	DB_HOSTNAME[] = "localhost",
67-
	DB_USER[] = "root",
67+
	DB_USER[] = "root",
68-
	DB_DB [] = "myrpg",
68+
	DB_DB [] = "myrpg",
69-
	DB_PASS[] = "";
69+
	DB_PASS[] = "";
70-
	
70+
	
71-
enum
71+
enum
72-
{
72+
{
73-
	PLAYER_STAT_JUST_CONNECTED,
73+
	PLAYER_STAT_JUST_CONNECTED,
74-
	PLAYER_STAT_LOGGING,
74+
	PLAYER_STAT_LOGGING,
75-
	PLAYER_STAT_REGISTER_PROCESS,
75+
	PLAYER_STAT_REGISTER_PROCESS,
76-
	PLAYER_STAT_LOADING,
76+
	PLAYER_STAT_LOADING,
77-
	PLAYER_STAT_PLAYING,
77+
	PLAYER_STAT_PLAYING,
78-
	PLAYER_STAT_AJAIL
78+
	PLAYER_STAT_AJAIL
79
}
80-
80+
81-
enum 
81+
enum 
82-
{
82+
{
83-
	PLAYER_ATTRIB_CONFIRMED 	= 0b1,
83+
	PLAYER_ATTRIB_CONFIRMED 	= 0b1,
84-
	PLAYER_ATTRIB_TRUSTED		= 0b10,
84+
	PLAYER_ATTRIB_TRUSTED		= 0b10,
85-
	PLAYER_ATTRIB_VIP_BRONZE 	= 0b100,
85+
	PLAYER_ATTRIB_VIP_BRONZE 	= 0b100,
86-
	PLAYER_ATTRIB_VIP_SILVER	= 0b1000,
86+
	PLAYER_ATTRIB_VIP_SILVER	= 0b1000,
87-
	PLAYER_ATTRIB_VIP_GOLD		= 0b10000,
87+
	PLAYER_ATTRIB_VIP_GOLD		= 0b10000,
88-
	
88+
	
89-
	PLAYER_ATTRIB_SEMI_ADMIN	= 0b100000,
89+
	PLAYER_ATTRIB_SEMI_ADMIN	= 0b100000,
90-
	PLAYER_ATTRIB_ADMIM			= 0b1000000,
90+
	PLAYER_ATTRIB_ADMIM			= 0b1000000,
91-
	PLAYER_ATTRIB_LEAD_ADMIN	= 0b10000000,
91+
	PLAYER_ATTRIB_LEAD_ADMIN	= 0b10000000,
92-
	PLAYER_ATTRIB_DEV			= 0b100000000,
92+
	PLAYER_ATTRIB_DEV			= 0b100000000,
93-
	PLAYER_ATTRIB_OWNER			= 0b1000000000
93+
	PLAYER_ATTRIB_OWNER			= 0b1000000000
94
}
95-
95+
96-
96+
97-
new Float:cDefaultPos[4] = {
97+
new Float:cDefaultPos[4] = {
98-
	1731.6230,-1276.0973,13.5610,117.5404	
98+
	1731.6230,-1276.0973,13.5610,117.5404	
99-
};
99+
};
100-
100+
101-
// Estruturas de dados (enum)
101+
// Estruturas de dados (enum)
102-
enum E_PLAYER_INFO {
102+
enum E_PLAYER_INFO {
103-
	// Identificação
103+
	// Identificação
104-
	gPlayerID,
104+
	gPlayerID,
105-
	gPlayerName[MAX_PLAYER_NAME], 
105+
	gPlayerName[MAX_PLAYER_NAME], 
106-
	gPlayerIP[16],
106+
	gPlayerIP[16],
107-
	gPlayerHost[256],
107+
	gPlayerHost[256],
108-
	// Estática (para usar pra carregar dados
108+
	// Estática (para usar pra carregar dados
109-
	gPlayerReg_Pass[32],
109+
	gPlayerReg_Pass[32],
110-
	gPlayerLogin_Tries,
110+
	gPlayerLogin_Tries,
111-
	// Variaveis (SCRIPT/aka OOC)
111+
	// Variaveis (SCRIPT/aka OOC)
112-
	gPlayerStat,
112+
	gPlayerStat,
113-
	gPlayerAttributes,
113+
	gPlayerAttributes,
114-
	// Variaveis (GAME/ aka IC)
114+
	// Variaveis (GAME/ aka IC)
115-
	gPlayerSkin,
115+
	gPlayerSkin,
116-
	gPlayerLevel,
116+
	gPlayerLevel,
117-
	gPlayerExp,
117+
	gPlayerExp,
118-
	gPlayerCash,
118+
	gPlayerCash,
119-
	gPlayerMoney,
119+
	gPlayerMoney,
120-
	gPlayerPayCheck,
120+
	gPlayerPayCheck,
121-
	gPlayerSavings,
121+
	gPlayerSavings,
122-
	// Familias/Grupos
122+
	// Familias/Grupos
123-
	gPlayerFamily,
123+
	gPlayerFamily,
124-
	gPlayerFamilyRank,
124+
	gPlayerFamilyRank,
125-
	gPlayerFamilyJoin,
125+
	gPlayerFamilyJoin,
126-
	gPlayerJob,
126+
	gPlayerJob,
127-
	gPlayerJobRank,
127+
	gPlayerJobRank,
128-
	gPlayerJobTime,
128+
	gPlayerJobTime,
129-
	gPlayerSpawn,
129+
	gPlayerSpawn,
130-
    // PROPERTY_SYSTEM
130+
    // PROPERTY_SYSTEM
131-
    gPlayerInside,
131+
    gPlayerInside,
132-
    gPlayerPorch
132+
    gPlayerPorch
133
}
134-
134+
135-
enum RCAMERA_INFO 
135+
enum RCAMERA_INFO 
136-
{
136+
{
137-
	Float:rcam_Pos[3],
137+
	Float:rcam_Pos[3],
138-
	Float:rcam_LookAt[3]
138+
	Float:rcam_LookAt[3]
139
}
140-
//
140+
//
141-
141+
142-
// Declarações de variaveis globais
142+
// Declarações de variaveis globais
143-
new gPlayerInfo[800][E_PLAYER_INFO];
143+
new gPlayerInfo[800][E_PLAYER_INFO];
144-
144+
145-
new
145+
new
146-
	//Language:g_lPortuguese,
146+
	//Language:g_lPortuguese,
147-
	g_dbConnection,
147+
	g_dbConnection,
148-
	gstring[1024],
148+
	gstring[1024],
149-
	Text:g_tdStat;
149+
	Text:g_tdStat;
150-
	
150+
	
151-
new rcamInfo[][RCAMERA_INFO] = {
151+
new rcamInfo[][RCAMERA_INFO] = {
152-
	{{719.8196, -1984.5413, 0.8574	 }, {719.7933,  -1983.5378, 0.7499  }},
152+
	{{719.8196, -1984.5413, 0.8574	 }, {719.7933,  -1983.5378, 0.7499  }},
153-
	{{842.0169, -1772.2430, 365.1170 }, {841.0131,  -1772.2399, 362.0245}},
153+
	{{842.0169, -1772.2430, 365.1170 }, {841.0131,  -1772.2399, 362.0245}},
154-
	{{1085.8168, -1507.1821, 32.6435 }, {1086.4247, -1506.3833, 32.2360 }},
154+
	{{1085.8168, -1507.1821, 32.6435 }, {1086.4247, -1506.3833, 32.2360 }},
155-
	{{1138.8068, -1400.2664, 22.4200 }, {1139.8031, -1400.1439, 22.3171 }},
155+
	{{1138.8068, -1400.2664, 22.4200 }, {1139.8031, -1400.1439, 22.3171 }},
156-
	{{1532.3412, -1361.0857, 341.1450}, {1532.7753, -1361.9911, 339.6769}},
156+
	{{1532.3412, -1361.0857, 341.1450}, {1532.7753, -1361.9911, 339.6769}},
157-
	{{1518.8756, -1628.3341, 18.7397 }, {1519.3651, -1629.2109, 18.6616 }},
157+
	{{1518.8756, -1628.3341, 18.7397 }, {1519.3651, -1629.2109, 18.6616 }},
158-
	{{1834.7419, -1303.5442, 120.2275}, {1835.5393, -1304.1547, 119.9244}},
158+
	{{1834.7419, -1303.5442, 120.2275}, {1835.5393, -1304.1547, 119.9244}},
159-
	{{1935.7708, -1395.2288, 342.9268}, {1935.7756, -1394.2245, 341.1788}},
159+
	{{1935.7708, -1395.2288, 342.9268}, {1935.7756, -1394.2245, 341.1788}},
160-
	{{2200.1458, -1106.1829, 107.0125}, {2200.9858, -1105.6324, 106.6644}},
160+
	{{2200.1458, -1106.1829, 107.0125}, {2200.9858, -1105.6324, 106.6644}},
161-
	{{2571.9436, -1278.1204, 131.3794}, {2572.5393, -1278.9288, 130.8064}}
161+
	{{2571.9436, -1278.1204, 131.3794}, {2572.5393, -1278.9288, 130.8064}}
162-
	                                  
162+
	                                  
163-
};
163+
};
164-
164+
165-
enum 
165+
enum 
166-
{
166+
{
167-
	PROPERTY_ATTRIB_ACTIVE = 0b1,
167+
	PROPERTY_ATTRIB_ACTIVE = 0b1,
168-
	PROPERTY_ATTRIB_BUYABLE = 0b10,
168+
	PROPERTY_ATTRIB_BUYABLE = 0b10,
169-
	PROPERTY_ATTRIB_SELLABLE = 0b100,
169+
	PROPERTY_ATTRIB_SELLABLE = 0b100,
170-
	PROPERTY_ATTRIB_ENTERABLE = 0b1000,
170+
	PROPERTY_ATTRIB_ENTERABLE = 0b1000,
171-
	PROPERTY_ATTRIB_EXITABLE   = 0b10000,
171+
	PROPERTY_ATTRIB_EXITABLE   = 0b10000,
172-
	
172+
	
173-
	//
173+
	//
174-
	// Static means if the property belongs to 
174+
	// Static means if the property belongs to 
175-
	// a faction, instead of some player.
175+
	// a faction, instead of some player.
176-
	// Faction members would have access to
176+
	// Faction members would have access to
177-
	// the property.
177+
	// the property.
178-
	PROPERTY_ATTRIB_STATIC 		= 0b100000	
178+
	PROPERTY_ATTRIB_STATIC 		= 0b100000	
179
}
180-
enum
180+
enum
181-
{
181+
{
182-
	PROPERTY_TYPE_INT = 0,
182+
	PROPERTY_TYPE_INT = 0,
183-
	PROPERTY_TYPE_HOUSE = 1,
183+
	PROPERTY_TYPE_HOUSE = 1,
184-
	PROPERTY_TYPE_BUSINESS = 100,
184+
	PROPERTY_TYPE_BUSINESS = 100,
185-
	PROPERTY_TYPE_BUSINESS_GROCERY,
185+
	PROPERTY_TYPE_BUSINESS_GROCERY,
186-
	PROPERTY_TYPE_BUSINESS_BANK,
186+
	PROPERTY_TYPE_BUSINESS_BANK,
187-
	PROPERTY_TYPE_BUSINESS_GAS,
187+
	PROPERTY_TYPE_BUSINESS_GAS,
188-
	PROPERTY_TYPE_BUSINESS_CASINO,
188+
	PROPERTY_TYPE_BUSINESS_CASINO,
189-
	PROPERTY_TYPE_BUSINESS_WEAPON
189+
	PROPERTY_TYPE_BUSINESS_WEAPON
190
}
191-
191+
192-
enum PROPERTY_INFO
192+
enum PROPERTY_INFO
193-
{
193+
{
194-
	bool:prop_Loaded,
194+
	bool:prop_Loaded,
195-
	prop_Attrib,
195+
	prop_Attrib,
196-
	prop_Type,
196+
	prop_Type,
197-
	prop_Level,
197+
	prop_Level,
198-
	prop_Price,
198+
	prop_Price,
199-
	Float:prop_ExtPos[3],
199+
	Float:prop_ExtPos[3],
200-
	prop_ExtProp,
200+
	prop_ExtProp,
201-
	Float:prop_IntPos[3],
201+
	Float:prop_IntPos[3],
202-
	prop_IntInt,
202+
	prop_IntInt,
203-
	prop_Owner,
203+
	prop_Owner,
204-
	prop_Locked,
204+
	prop_Locked,
205-
	prop_Name[32],
205+
	prop_Name[32],
206-
	// --------- //
206+
	// --------- //
207-
	prop_AreaExt,
207+
	prop_AreaExt,
208-
	prop_AreaInt,
208+
	prop_AreaInt,
209-
	prop_PickupExt,
209+
	prop_PickupExt,
210-
	prop_PickupInt
210+
	prop_PickupInt
211
}
212-
#define MAX_PROPERTIES 1000
212+
#define MAX_PROPERTIES 1000
213-
new gPropertyInfo[MAX_PROPERTIES][PROPERTY_INFO];
213+
new gPropertyInfo[MAX_PROPERTIES][PROPERTY_INFO];
214-
214+
215-
new const
215+
new const
216-
	sz_PropertyDump[] = {
216+
	sz_PropertyDump[] = {
217-
		"CREATE TABLE IF NOT EXISTS `familyinfo` ( \
217+
		"CREATE TABLE IF NOT EXISTS `familyinfo` ( \
218-
			`id` int(10) NOT NULL AUTO_INCREMENT, \
218+
			`id` int(10) NOT NULL AUTO_INCREMENT, \
219-
			`name` varchar(50) NOT NULL, \
219+
			`name` varchar(50) NOT NULL, \
220-
			`rank1` varchar(50) NOT NULL, \
220+
			`rank1` varchar(50) NOT NULL, \
221-
			`rank2` varchar(50) NOT NULL, \
221+
			`rank2` varchar(50) NOT NULL, \
222-
			`rank3` varchar(50) NOT NULL, \
222+
			`rank3` varchar(50) NOT NULL, \
223-
			`rank4` varchar(50) NOT NULL, \
223+
			`rank4` varchar(50) NOT NULL, \
224-
			`rank5` varchar(50) NOT NULL, \
224+
			`rank5` varchar(50) NOT NULL, \
225-
			`rank6` varchar(50) NOT NULL, \
225+
			`rank6` varchar(50) NOT NULL, \
226-
			`drogas` int(11) NOT NULL, \
226+
			`drogas` int(11) NOT NULL, \
227-
			`materiais` int(11) NOT NULL, \
227+
			`materiais` int(11) NOT NULL, \
228-
			`x` double NOT NULL, \
228+
			`x` double NOT NULL, \
229-
			`y` double NOT NULL, \
229+
			`y` double NOT NULL, \
230-
			`z` double NOT NULL, \
230+
			`z` double NOT NULL, \
231-
			PRIMARY KEY (`id`) )" };
231+
			PRIMARY KEY (`id`) )" };
232-
232+
233-
// Funções Públicas (SA:MP)
233+
// Funções Públicas (SA:MP)
234-
//
234+
//
235-
//
235+
//
236-
236+
237-
public OnGameModeInit()
237+
public OnGameModeInit()
238-
{
238+
{
239-
	g_dbConnection = Server_dbConnect();
239+
	g_dbConnection = Server_dbConnect();
240-
	
240+
	
241-
	g_tdStat = TextDrawCreate(319.000000, 435.000000, "  ");
241+
	g_tdStat = TextDrawCreate(319.000000, 435.000000, "  ");
242-
	TextDrawAlignment(g_tdStat, 2);
242+
	TextDrawAlignment(g_tdStat, 2);
243-
	TextDrawBackgroundColor(g_tdStat, -256);
243+
	TextDrawBackgroundColor(g_tdStat, -256);
244-
	TextDrawFont(g_tdStat, 1);
244+
	TextDrawFont(g_tdStat, 1);
245-
	TextDrawLetterSize(g_tdStat, 0.300000, 1.200000);
245+
	TextDrawLetterSize(g_tdStat, 0.300000, 1.200000);
246-
	TextDrawColor(g_tdStat, -1);
246+
	TextDrawColor(g_tdStat, -1);
247-
	TextDrawSetOutline(g_tdStat, 1);
247+
	TextDrawSetOutline(g_tdStat, 1);
248-
	TextDrawSetProportional(g_tdStat, 1);
248+
	TextDrawSetProportional(g_tdStat, 1);
249-
	
249+
	
250-
	Property_LoadAll();
250+
	Property_LoadAll();
251-
	
251+
	
252-
	return 1;
252+
	return 1;
253
}
254-
254+
255-
public OnPlayerConnect(playerid)
255+
public OnPlayerConnect(playerid)
256-
{
256+
{
257-
	TogglePlayerSpectating(playerid, true);
257+
	TogglePlayerSpectating(playerid, true);
258-
    SetPlayerColor(playerid, -1);
258+
    SetPlayerColor(playerid, -1);
259-
	Player_Init(playerid);
259+
	Player_Init(playerid);
260-
	gPlayerInfo[playerid][gPlayerStat] = PLAYER_STAT_JUST_CONNECTED;
260+
	gPlayerInfo[playerid][gPlayerStat] = PLAYER_STAT_JUST_CONNECTED;
261-
	SendClientMessageFormatted(playerid, -1, "Olá, %s. Bem-vindo ao {FF7F50}%s{/}.",
261+
	SendClientMessageFormatted(playerid, -1, "Olá, %s. Bem-vindo ao {FF7F50}%s{/}.",
262-
        gPlayerInfo[playerid][gPlayerName],
262+
        gPlayerInfo[playerid][gPlayerName],
263-
        SERVER_NAME
263+
        SERVER_NAME
264-
    );
264+
    );
265-
    SendClientMessageFormatted(playerid, -1, "Esse servidor usa o script {FF7F50}MyRPG{FFFFFF} versão {FF7F50}%s.", SCRIPT_VERSION);
265+
    SendClientMessageFormatted(playerid, -1, "Esse servidor usa o script {FF7F50}MyRPG{FFFFFF} versão {FF7F50}%s.", SCRIPT_VERSION);
266-
    SendClientMessage(playerid, -1, "Creditos para {FF7F50}Stewie{FFFFFF}`, {FF7F50}BlueX{FFFFFF} e {FF7F50}Viih{FFFFFF}.");
266+
    SendClientMessage(playerid, -1, "Creditos para {FF7F50}Stewie{FFFFFF}`, {FF7F50}BlueX{FFFFFF} e {FF7F50}Viih{FFFFFF}.");
267-
267+
268-
	return 1;
268+
	return 1;
269
}
270-
270+
271-
public OnReverseDNS(ip[], host[], extra)
271+
public OnReverseDNS(ip[], host[], extra)
272-
	format(gPlayerInfo[extra][gPlayerHost], 256, host);
272+
	format(gPlayerInfo[extra][gPlayerHost], 256, host);
273-
273+
274-
	
274+
	
275-
enum 
275+
enum 
276-
{
276+
{
277-
	DIALOG_NONE,
277+
	DIALOG_NONE,
278-
	DIALOG_REGISTER_1,
278+
	DIALOG_REGISTER_1,
279-
	DIALOG_REGISTER_1_CONF,
279+
	DIALOG_REGISTER_1_CONF,
280-
	DIALOG_REGISTER_1_ERR,
280+
	DIALOG_REGISTER_1_ERR,
281-
	DIALOG_REGISTER_2,
281+
	DIALOG_REGISTER_2,
282-
	DIALOG_EMAIL_YESNO,
282+
	DIALOG_EMAIL_YESNO,
283-
	DIALOG_EMAIL_INPUT,
283+
	DIALOG_EMAIL_INPUT,
284-
	DIALOG_LOGIN,
284+
	DIALOG_LOGIN,
285-
	DIALOG_INVENT
285+
	DIALOG_INVENT
286
}
287-
287+
288-
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
288+
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
289-
{
289+
{
290-
	switch	(dialogid)
290+
	switch	(dialogid)
291-
	{
291+
	{
292-
		case
292+
		case
293-
			DIALOG_REGISTER_1:
293+
			DIALOG_REGISTER_1:
294-
		{
294+
		{
295-
			if(response)
295+
			if(response)
296-
			{
296+
			{
297-
				if(4 <= strlen(inputtext) < 32)
297+
				if(4 <= strlen(inputtext) < 32)
298-
				{
298+
				{
299-
					format(gPlayerInfo[playerid][gPlayerReg_Pass], 32, "%s", inputtext);
299+
					format(gPlayerInfo[playerid][gPlayerReg_Pass], 32, "%s", inputtext);
300-
					ShowPlayerDialog(playerid, DIALOG_REGISTER_2, DIALOG_STYLE_PASSWORD, "Passo 2 de 4:", "Digite novamente a senha para confirmar:", "OK", "Voltar");
300+
					ShowPlayerDialog(playerid, DIALOG_REGISTER_2, DIALOG_STYLE_PASSWORD, "Passo 2 de 4:", "Digite novamente a senha para confirmar:", "OK", "Voltar");
301-
				}
301+
				}
302-
				else
302+
				else
303-
				{
303+
				{
304-
					ShowPlayerDialog(playerid, DIALOG_REGISTER_1_ERR, DIALOG_STYLE_MSGBOX, "Erro:", "A sua senha deve ter de 4 a 32 caracteres!", "OK", "");
304+
					ShowPlayerDialog(playerid, DIALOG_REGISTER_1_ERR, DIALOG_STYLE_MSGBOX, "Erro:", "A sua senha deve ter de 4 a 32 caracteres!", "OK", "");
305-
				}
305+
				}
306-
			}
306+
			}
307-
			else
307+
			else
308-
			{
308+
			{
309-
				ShowPlayerDialog
309+
				ShowPlayerDialog
310-
					(playerid, DIALOG_REGISTER_1_CONF, DIALOG_STYLE_MSGBOX, "Confirmação", "Você deseja mesmo cancelar?\nSe sim, será obrigado a sair do servidor!", "Sim", "Não");
310+
					(playerid, DIALOG_REGISTER_1_CONF, DIALOG_STYLE_MSGBOX, "Confirmação", "Você deseja mesmo cancelar?\nSe sim, será obrigado a sair do servidor!", "Sim", "Não");
311-
			}
311+
			}
312-
		}
312+
		}
313-
313+
314-
		case
314+
		case
315-
			DIALOG_REGISTER_1_CONF:
315+
			DIALOG_REGISTER_1_CONF:
316-
		{
316+
		{
317-
			if(response)
317+
			if(response)
318-
			{
318+
			{
319-
				ShowPlayerDialog
319+
				ShowPlayerDialog
320-
					(playerid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "Adeus!", "Volte sempre!", "Fechar", "");
320+
					(playerid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "Adeus!", "Volte sempre!", "Fechar", "");
321-
				Kick(playerid);
321+
				Kick(playerid);
322-
			}
322+
			}
323-
			else
323+
			else
324-
			{
324+
			{
325-
				ShowPlayerDialog
325+
				ShowPlayerDialog
326-
					(playerid, DIALOG_REGISTER_1, DIALOG_STYLE_PASSWORD, "Passo 1 de 4:", "Olá e bem-vindo ao processo de\nimigração para o nosso servidor!\n\tDigite sua senha para próximos logins:", "OK", "Cancelar");
326+
					(playerid, DIALOG_REGISTER_1, DIALOG_STYLE_PASSWORD, "Passo 1 de 4:", "Olá e bem-vindo ao processo de\nimigração para o nosso servidor!\n\tDigite sua senha para próximos logins:", "OK", "Cancelar");
327-
                SendClientMessage(playerid, -1, "{FF7F50}(( {FFFFFF}Digite abaixo a senha para o seu novo personagem.{FF7F50} ))");
327+
                SendClientMessage(playerid, -1, "{FF7F50}(( {FFFFFF}Digite abaixo a senha para o seu novo personagem.{FF7F50} ))");
328-
			}
328+
			}
329-
		}
329+
		}
330-
		//break;
330+
		//break;
331-
		case
331+
		case
332-
			DIALOG_REGISTER_1_ERR:
332+
			DIALOG_REGISTER_1_ERR:
333-
		{
333+
		{
334-
			ShowPlayerDialog
334+
			ShowPlayerDialog
335-
				(playerid, DIALOG_REGISTER_1, DIALOG_STYLE_PASSWORD, "Passo 1 de 4:", "Olá e bem-vindo ao processo de\nimigração para o nosso servidor!\n\tDigite sua senha para próximos logins:", "OK", "Cancelar");
335+
				(playerid, DIALOG_REGISTER_1, DIALOG_STYLE_PASSWORD, "Passo 1 de 4:", "Olá e bem-vindo ao processo de\nimigração para o nosso servidor!\n\tDigite sua senha para próximos logins:", "OK", "Cancelar");
336-
		}
336+
		}
337-
		//break;
337+
		//break;
338-
		case
338+
		case
339-
			DIALOG_REGISTER_2:
339+
			DIALOG_REGISTER_2:
340-
		{
340+
		{
341-
			if(response)
341+
			if(response)
342-
			{
342+
			{
343-
				//printf("inputtext: %s | gPlayerReg_Pass: %s", inputtext, gPlayerInfo[playerid][gPlayerReg_Pass]);
343+
				//printf("inputtext: %s | gPlayerReg_Pass: %s", inputtext, gPlayerInfo[playerid][gPlayerReg_Pass]);
344-
				if(strcmp(inputtext, gPlayerInfo[playerid][gPlayerReg_Pass], false))
344+
				if(strcmp(inputtext, gPlayerInfo[playerid][gPlayerReg_Pass], false))
345-
				{
345+
				{
346-
					ShowPlayerDialog(playerid, DIALOG_REGISTER_1_ERR, DIALOG_STYLE_MSGBOX, "Erro:", "A senha que você digitou é diferente da confirmação.", "OK", "");
346+
					ShowPlayerDialog(playerid, DIALOG_REGISTER_1_ERR, DIALOG_STYLE_MSGBOX, "Erro:", "A senha que você digitou é diferente da confirmação.", "OK", "");
347-
				}
347+
				}
348-
				else
348+
				else
349-
				{
349+
				{
350-
					ShowPlayerDialog(playerid, DIALOG_EMAIL_YESNO, DIALOG_STYLE_MSGBOX, "Confirmação de e-mail.", "Você deseja inserir um e-mail para confirmação?\nConfirmando um e-mail você tem:\n\t- Um rank de 'usuário confirmado' \
350+
					ShowPlayerDialog(playerid, DIALOG_EMAIL_YESNO, DIALOG_STYLE_MSGBOX, "Confirmação de e-mail.", "Você deseja inserir um e-mail para confirmação?\nConfirmando um e-mail você tem:\n\t- Um rank de 'usuário confirmado' \
351-
		ingame.\n\t- Vantagens no jogo, como carros exclusivos, propriedades, etc.\n\t- Mais chances de entrar na staff e\n\t- Receber updates sobre a nossa comunidade.\n\nDeseja inserir um e-mail?", "Sim", "Não");
351+
		ingame.\n\t- Vantagens no jogo, como carros exclusivos, propriedades, etc.\n\t- Mais chances de entrar na staff e\n\t- Receber updates sobre a nossa comunidade.\n\nDeseja inserir um e-mail?", "Sim", "Não");
352-
				}
352+
				}
353-
			}
353+
			}
354-
			else
354+
			else
355-
			{
355+
			{
356-
				ShowPlayerDialog
356+
				ShowPlayerDialog
357-
					(playerid, DIALOG_REGISTER_1, DIALOG_STYLE_PASSWORD, "Passo 1 de 4:", "Olá e bem-vindo ao processo de\nimigração para o nosso servidor!\n\tDigite sua senha para próximos logins:", "OK", "Cancelar");
357+
					(playerid, DIALOG_REGISTER_1, DIALOG_STYLE_PASSWORD, "Passo 1 de 4:", "Olá e bem-vindo ao processo de\nimigração para o nosso servidor!\n\tDigite sua senha para próximos logins:", "OK", "Cancelar");
358-
			}
358+
			}
359-
		}
359+
		}
360-
		//break;
360+
		//break;
361-
		case
361+
		case
362-
			DIALOG_EMAIL_YESNO:
362+
			DIALOG_EMAIL_YESNO:
363-
		{
363+
		{
364-
            const bool:enabled = false;
364+
            const bool:enabled = false;
365-
			if(response && enabled)
365+
			if(response && enabled)
366-
			{
366+
			{
367-
                SendClientMessage(playerid, -1, "{FF7F50}(( {FFFFFF}Certo. Você vai registrar o seu e-mail. {FF7F50} ))");
367+
                SendClientMessage(playerid, -1, "{FF7F50}(( {FFFFFF}Certo. Você vai registrar o seu e-mail. {FF7F50} ))");
368-
				ShowPlayerDialog(playerid, DIALOG_EMAIL_INPUT, DIALOG_STYLE_INPUT, "Passo 3 de 4:", "Agora digite o seu e-mail!", "OK", "Cancelar");
368+
				ShowPlayerDialog(playerid, DIALOG_EMAIL_INPUT, DIALOG_STYLE_INPUT, "Passo 3 de 4:", "Agora digite o seu e-mail!", "OK", "Cancelar");
369-
			}
369+
			}
370-
			else
370+
			else
371-
			{
371+
			{
372-
				ShowPlayerDialog(playerid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "Processando...", "Aguarde enquanto a sua conta é criada\ne você é levado para o mundo...", "", "");
372+
				ShowPlayerDialog(playerid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "Processando...", "Aguarde enquanto a sua conta é criada\ne você é levado para o mundo...", "", "");
373-
				
373+
				
374-
				WP_Hash(gstring, 129, gPlayerInfo[playerid][gPlayerReg_Pass]);
374+
				WP_Hash(gstring, 129, gPlayerInfo[playerid][gPlayerReg_Pass]);
375-
				mysql_format(g_dbConnection, gstring, 
375+
				mysql_format(g_dbConnection, gstring, 
376-
					"INSERT INTO `player_info` (`name`, `password`) VALUES ('%s', '%s');", gPlayerInfo[playerid][gPlayerName], gstring);
376+
					"INSERT INTO `player_info` (`name`, `password`) VALUES ('%s', '%s');", gPlayerInfo[playerid][gPlayerName], gstring);
377-
				mysql_function_query(g_dbConnection, gstring, false, "r@Player_Register", "is", playerid, gPlayerInfo[playerid][gPlayerReg_Pass]);
377+
				mysql_function_query(g_dbConnection, gstring, false, "r@Player_Register", "is", playerid, gPlayerInfo[playerid][gPlayerReg_Pass]);
378-
			}
378+
			}
379-
		}
379+
		}
380-
		case
380+
		case
381-
			DIALOG_LOGIN:
381+
			DIALOG_LOGIN:
382-
		{
382+
		{
383-
			mysql_format(g_dbConnection, gstring, "SELECT `password` FROM `player_info` WHERE name='%s'", gPlayerInfo[playerid][gPlayerName]);
383+
			mysql_format(g_dbConnection, gstring, "SELECT `password` FROM `player_info` WHERE name='%s'", gPlayerInfo[playerid][gPlayerName]);
384-
			mysql_function_query(g_dbConnection, gstring, true, "r@Player_Login", "is", playerid, inputtext);
384+
			mysql_function_query(g_dbConnection, gstring, true, "r@Player_Login", "is", playerid, inputtext);
385-
		}
385+
		}
386-
		//break;
386+
		//break;
387-
		
387+
		
388-
		
388+
		
389-
		
389+
		
390-
		/* --------------
390+
		/* --------------
391-
		 * ITEM ---------
391+
		 * ITEM ---------
392-
		*/
392+
		*/
393-
		case
393+
		case
394-
			DIALOG_INVENT:
394+
			DIALOG_INVENT:
395-
		{
395+
		{
396-
			
396+
			
397-
		}
397+
		}
398-
	}
398+
	}
399-
	return 1;
399+
	return 1;
400
}
401-
401+
402-
public OnPlayerText(playerid, text[])
402+
public OnPlayerText(playerid, text[])
403-
{
403+
{
404-
    if(text[0] == '!')
404+
    if(text[0] == '!')
405-
    {
405+
    {
406-
        strmid(gstring, text, 1, strlen(text));
406+
        strmid(gstring, text, 1, strlen(text));
407-
        format(gstring, sizeof gstring, "/a %s", gstring);
407+
        format(gstring, sizeof gstring, "/a %s", gstring);
408-
        CallLocalFunction("OnPlayerCommandText", "is", playerid, gstring);
408+
        CallLocalFunction("OnPlayerCommandText", "is", playerid, gstring);
409-
        return 1;
409+
        return 1;
410-
    }
410+
    }
411-
411+
412-
    // Use this to prevent SAMP Server to broadcast the text
412+
    // Use this to prevent SAMP Server to broadcast the text
413-
    return 0;
413+
    return 0;
414
}
415-
415+
416-
public OnPlayerEnterDynamicArea(playerid, areaid)
416+
public OnPlayerEnterDynamicArea(playerid, areaid)
417-
{
417+
{
418-
	new index = -1;
418+
	new index = -1;
419-
	while(++index < MAX_PROPERTIES)
419+
	while(++index < MAX_PROPERTIES)
420-
	{
420+
	{
421-
		//
421+
		//
422-
		// This was supposed to be a pointer to the array (lol)
422+
		// This was supposed to be a pointer to the array (lol)
423-
		// Just keep an eye out for silly mistakes
423+
		// Just keep an eye out for silly mistakes
424-
		#define _prp gPropertyInfo[index]
424+
		#define _prp gPropertyInfo[index]
425-
		
425+
		
426-
		// In the case the current property exterior dynarea 
426+
		// In the case the current property exterior dynarea 
427-
		// matches with the current areaid 
427+
		// matches with the current areaid 
428-
		// The same with the other statement down there :)
428+
		// The same with the other statement down there :)
429-
		if(_prp[prop_AreaExt] == areaid)
429+
		if(_prp[prop_AreaExt] == areaid)
430-
		{
430+
		{
431-
            gPlayerInfo[playerid][gPlayerPorch] = index;
431+
            gPlayerInfo[playerid][gPlayerPorch] = index;
432-
			if(Player_IsAdmin(playerid))
432+
			if(Player_IsAdmin(playerid))
433-
				Property_DisplayData(playerid, index);
433+
				Property_DisplayData(playerid, index);
434-
			// If the property the player is trying to enter
434+
			// If the property the player is trying to enter
435-
			// Is actually active
435+
			// Is actually active
436-
			if(_prp[prop_Attrib] & PROPERTY_ATTRIB_ACTIVE)
436+
			if(_prp[prop_Attrib] & PROPERTY_ATTRIB_ACTIVE)
437-
			{
437+
			{
438-
				// If the property has an owner
438+
				// If the property has an owner
439-
				if(_prp[prop_Owner])
439+
				if(_prp[prop_Owner])
440-
				{
440+
				{
441-
					Property_SendDoorMessage(playerid, index);
441+
					Property_SendDoorMessage(playerid, index);
442-
				}
442+
				}
443-
				// Else case...
443+
				// Else case...
444-
				else
444+
				else
445-
				{
445+
				{
446-
					// If buying the house is allowed
446+
					// If buying the house is allowed
447-
					// So, summing:
447+
					// So, summing:
448-
					// If the player can buy such prop
448+
					// If the player can buy such prop
449-
					if(_prp[prop_Attrib] & PROPERTY_ATTRIB_BUYABLE)
449+
					if(_prp[prop_Attrib] & PROPERTY_ATTRIB_BUYABLE)
450-
					{
450+
					{
451-
						// If the player has enough level to buy the house
451+
						// If the player has enough level to buy the house
452-
						if(gPlayerInfo[playerid][gPlayerLevel] >= _prp[prop_Level])
452+
						if(gPlayerInfo[playerid][gPlayerLevel] >= _prp[prop_Level])
453-
						{
453+
						{
454-
							SendClientMessage(playerid, -1, "Esta casa está à {0EAB00}venda{FFFFFF}!");
454+
							SendClientMessage(playerid, -1, "Esta casa está à {0EAB00}venda{FFFFFF}!");
455-
							format(gstring, sizeof gstring, 
455+
							format(gstring, sizeof gstring, 
456-
								"Preço: {0EAB00}R${FFFFFF}%d,00 / Nível mínimo: {0006AB}%d", _prp[prop_Price], _prp[prop_Level]);
456+
								"Preço: {0EAB00}R${FFFFFF}%d,00 / Nível mínimo: {0006AB}%d", _prp[prop_Price], _prp[prop_Level]);
457-
							SendClientMessage(playerid, -1, gstring);	
457+
							SendClientMessage(playerid, -1, gstring);	
458-
							SendClientMessage(playerid, -1, "    - Para opções, digite {2DD2F7}/prop(riedade){FFFFFF}.");
458+
							SendClientMessage(playerid, -1, "    - Para opções, digite {2DD2F7}/prop(riedade){FFFFFF}.");
459-
						}
459+
						}
460-
						else
460+
						else
461-
						{
461+
						{
462-
							SendClientMessage(playerid, -1, "Esta casa está à {0EAB00}venda{FFFFFF}!");
462+
							SendClientMessage(playerid, -1, "Esta casa está à {0EAB00}venda{FFFFFF}!");
463-
							format(gstring, sizeof gstring, 
463+
							format(gstring, sizeof gstring, 
464-
								"Preço: {0EAB00}R${FFFFFF}%d,00 / Nível mínimo: {0006AB}%d", _prp[prop_Price], _prp[prop_Level]);
464+
								"Preço: {0EAB00}R${FFFFFF}%d,00 / Nível mínimo: {0006AB}%d", _prp[prop_Price], _prp[prop_Level]);
465-
							SendClientMessage(playerid, -1, gstring);	
465+
							SendClientMessage(playerid, -1, gstring);	
466-
							SendClientMessage(playerid, -1, "    - Infelizmente você não pode comprar esta propriedade...");
466+
							SendClientMessage(playerid, -1, "    - Infelizmente você não pode comprar esta propriedade...");
467-
						}
467+
						}
468-
					}
468+
					}
469-
					// If the house buying is currently disabled
469+
					// If the house buying is currently disabled
470-
					else
470+
					else
471-
					{
471+
					{
472-
						SendClientMessage(playerid, -1, "{DE2F4F}(( {FFFFFF}A compra desta propriedade está desabilitada. {DE2F4F}))");
472+
						SendClientMessage(playerid, -1, "{DE2F4F}(( {FFFFFF}A compra desta propriedade está desabilitada. {DE2F4F}))");
473-
					}
473+
					}
474-
				}
474+
				}
475-
			}
475+
			}
476-
			// Else case, let's advise the player :D
476+
			// Else case, let's advise the player :D
477-
			else
477+
			else
478-
			{
478+
			{
479-
				SendClientMessage(playerid, -1, "{DE2F4F}(( {FFFFFF}Esta propriedade está atualmente desativada. {DE2F4F} ))");
479+
				SendClientMessage(playerid, -1, "{DE2F4F}(( {FFFFFF}Esta propriedade está atualmente desativada. {DE2F4F} ))");
480-
			}
480+
			}
481-
			return 1;
481+
			return 1;
482-
		}
482+
		}
483-
		if(_prp[prop_AreaInt] == areaid)
483+
		if(_prp[prop_AreaInt] == areaid)
484-
		{
484+
		{
485-
			return 1;
485+
			return 1;
486-
		}
486+
		}
487-
		#undef _prp
487+
		#undef _prp
488-
	}
488+
	}
489-
	return 1;
489+
	return 1;
490
}
491-
public OnPlayerLeaveDynamicArea(playerid, areaid)
491+
public OnPlayerLeaveDynamicArea(playerid, areaid)
492-
{
492+
{
493-
    if(gPropertyInfo
493+
    if(gPropertyInfo
494-
        [gPlayerInfo[playerid][gPlayerPorch]]
494+
        [gPlayerInfo[playerid][gPlayerPorch]]
495-
        [prop_AreaInt]  == areaid ||
495+
        [prop_AreaInt]  == areaid ||
496-
       gPropertyInfo
496+
       gPropertyInfo
497-
        [gPlayerInfo[playerid][gPlayerPorch]]
497+
        [gPlayerInfo[playerid][gPlayerPorch]]
498-
        [prop_AreaExt]  == areaid ) {
498+
        [prop_AreaExt]  == areaid ) {
499-
        gPlayerInfo[playerid][gPlayerPorch] = 0;
499+
        gPlayerInfo[playerid][gPlayerPorch] = 0;
500-
    }
500+
    }
501-
    return 1;
501+
    return 1;
502
}
503-
503+
504-
// Funções Públicas (Script)
504+
// Funções Públicas (Script)
505-
//
505+
//
506-
//
506+
//
507-
507+
508-
// Server:
508+
// Server:
509-
	forward Server_dbConnect();
509+
	forward Server_dbConnect();
510-
	
510+
	
511-
	
511+
	
512-
public Server_dbConnect()
512+
public Server_dbConnect()
513-
{
513+
{
514-
	new conn;
514+
	new conn;
515-
	conn = mysql_connect(DB_HOSTNAME, DB_USER, DB_DB, DB_PASS);
515+
	conn = mysql_connect(DB_HOSTNAME, DB_USER, DB_DB, DB_PASS);
516-
	
516+
	
517-
	if(!conn)
517+
	if(!conn)
518-
	{
518+
	{
519-
		printf("Failure on Server_dbConnect(), shutting down...");
519+
		printf("Failure on Server_dbConnect(), shutting down...");
520-
		SendRconCommand("exit");
520+
		SendRconCommand("exit");
521-
		return 0;
521+
		return 0;
522-
	}
522+
	}
523-
	printf("(!) Database connection has succeded!\ng_dbConnection = %d", conn);
523+
	printf("(!) Database connection has succeded!\ng_dbConnection = %d", conn);
524-
	return conn;
524+
	return conn;
525
}
526-
526+
527-
// Player:
527+
// Player:
528-
	forward Player_Init(playerid);
528+
	forward Player_Init(playerid);
529-
		forward r@Player_Init(playerid);
529+
		forward r@Player_Init(playerid);
530-
	forward Player_Load(playerid);
530+
	forward Player_Load(playerid);
531-
		forward r@Player_Load(playerid);
531+
		forward r@Player_Load(playerid);
532-
    forward Player_BanCheck(playerid);
532+
    forward Player_BanCheck(playerid);
533-
        forward r@Player_BanCheck(playerid);
533+
        forward r@Player_BanCheck(playerid);
534-
	forward Player_Spawn(playerid);
534+
	forward Player_Spawn(playerid);
535-
		forward r@Player_Register(playerid, password[]);
535+
		forward r@Player_Register(playerid, password[]);
536-
		forward r@Player_Login(playerid, password[]);
536+
		forward r@Player_Login(playerid, password[]);
537-
	stock Player_SetStatLabel(playerid, text[]);
537+
	stock Player_SetStatLabel(playerid, text[]);
538-
		
538+
		
539-
	
539+
	
540-
	
540+
	
541-
public Player_Init(playerid)
541+
public Player_Init(playerid)
542-
{
542+
{
543-
	Player_SetStatLabel(playerid, "Obtendo dados do cliente...");
543+
	Player_SetStatLabel(playerid, "Obtendo dados do cliente...");
544-
	GetPlayerName(playerid, gPlayerInfo[playerid][gPlayerName], MAX_PLAYER_NAME);
544+
	GetPlayerName(playerid, gPlayerInfo[playerid][gPlayerName], MAX_PLAYER_NAME);
545-
	GetPlayerIp(playerid, gPlayerInfo[playerid][gPlayerIP], 16);
545+
	GetPlayerIp(playerid, gPlayerInfo[playerid][gPlayerIP], 16);
546-
	rdns(gPlayerInfo[playerid][gPlayerIP], playerid);
546+
	rdns(gPlayerInfo[playerid][gPlayerIP], playerid);
547-
	
547+
	
548-
	Player_SetStatLabel(playerid, "Limpando variaveis da sessão anterior...");
548+
	Player_SetStatLabel(playerid, "Limpando variaveis da sessão anterior...");
549-
	gPlayerInfo[playerid][gPlayerLogin_Tries] = 0;
549+
	gPlayerInfo[playerid][gPlayerLogin_Tries] = 0;
550-
	
550+
	
551-
	Player_SetStatLabel(playerid, "Verificando a existencia da conta...");
551+
	Player_SetStatLabel(playerid, "Verificando a existencia da conta...");
552-
	mysql_format(g_dbConnection, gstring, "SELECT `id` FROM `player_info` WHERE `name`='%e'", gPlayerInfo[playerid][gPlayerName]);
552+
	mysql_format(g_dbConnection, gstring, "SELECT `id` FROM `player_info` WHERE `name`='%e'", gPlayerInfo[playerid][gPlayerName]);
553-
	mysql_function_query(g_dbConnection, gstring, true, "r@Player_Init", "i", playerid);
553+
	mysql_function_query(g_dbConnection, gstring, true, "r@Player_Init", "i", playerid);
554-
	return 1;
554+
	return 1;
555
}
556-
public r@Player_Init(playerid)
556+
public r@Player_Init(playerid)
557-
{
557+
{
558-
	Player_SetStatLabel(playerid, "Dados obtidos, processando...");
558+
	Player_SetStatLabel(playerid, "Dados obtidos, processando...");
559-
	new fields, rows;
559+
	new fields, rows;
560-
	cache_get_data(rows, fields, g_dbConnection);
560+
	cache_get_data(rows, fields, g_dbConnection);
561-
	
561+
	
562-
	if(!rows)
562+
	if(!rows)
563-
	{
563+
	{
564-
		Player_SetStatLabel(playerid, "Conta inexistente!");
564+
		Player_SetStatLabel(playerid, "Conta inexistente!");
565-
		gPlayerInfo[playerid][gPlayerStat] = PLAYER_STAT_REGISTER_PROCESS;
565+
		gPlayerInfo[playerid][gPlayerStat] = PLAYER_STAT_REGISTER_PROCESS;
566-
        SendClientMessageFormatted(playerid, -1, "Senhor {FF7F50}%s{FFFFFF}. Parece que é a sua primeira visita aqui, não?",
566+
        SendClientMessageFormatted(playerid, -1, "Senhor {FF7F50}%s{FFFFFF}. Parece que é a sua primeira visita aqui, não?",
567-
            gPlayerInfo[playerid][gPlayerName]);
567+
            gPlayerInfo[playerid][gPlayerName]);
568-
        SendClientMessage(playerid, -1, "Por favor, siga com os próximos passos para obter {FF7F50}visto{FFFFFF} em nosso servidor!");
568+
        SendClientMessage(playerid, -1, "Por favor, siga com os próximos passos para obter {FF7F50}visto{FFFFFF} em nosso servidor!");
569-
		
569+
		
570-
		Player_SetStatLabel(playerid, "Passo 1 de 4");
570+
		Player_SetStatLabel(playerid, "Passo 1 de 4");
571-
		ShowPlayerDialog(playerid, DIALOG_REGISTER_1, DIALOG_STYLE_PASSWORD, "Passo 1 de 4:", "Olá e bem-vindo ao processo de\nimigração para o nosso servidor!\n\tDigite sua senha para próximos logins:", "OK", "Cancelar");
571+
		ShowPlayerDialog(playerid, DIALOG_REGISTER_1, DIALOG_STYLE_PASSWORD, "Passo 1 de 4:", "Olá e bem-vindo ao processo de\nimigração para o nosso servidor!\n\tDigite sua senha para próximos logins:", "OK", "Cancelar");
572-
        SendClientMessage(playerid, -1, "{FF7F50}(( {FFFFFF}Digite abaixo a senha para o seu novo personagem.{FF7F50} ))");
572+
        SendClientMessage(playerid, -1, "{FF7F50}(( {FFFFFF}Digite abaixo a senha para o seu novo personagem.{FF7F50} ))");
573-
		return 1;
573+
		return 1;
574-
	}
574+
	}
575-
	
575+
	
576-
	Player_SetStatLabel(playerid, "Prossiga com o login:");
576+
	Player_SetStatLabel(playerid, "Prossiga com o login:");
577-
	gPlayerInfo[playerid][gPlayerStat] = PLAYER_STAT_LOGGING;
577+
	gPlayerInfo[playerid][gPlayerStat] = PLAYER_STAT_LOGGING;
578-
	ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login no RioRPG:", "Para efetuar o login no nosso servidor,\ndigite a sua senha abaixo.", "Login", "");
578+
	ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login no RioRPG:", "Para efetuar o login no nosso servidor,\ndigite a sua senha abaixo.", "Login", "");
579-
579+
580-
    SendClientMessageFormatted(playerid, -1, "Olá denovo, %s. Se deseja fazer o login, digite logo abaixo a sua senha!",
580+
    SendClientMessageFormatted(playerid, -1, "Olá denovo, %s. Se deseja fazer o login, digite logo abaixo a sua senha!",
581-
        gPlayerInfo[playerid][gPlayerName]
581+
        gPlayerInfo[playerid][gPlayerName]
582-
    );
582+
    );
583-
	return 1;
583+
	return 1;
584-
	
584+
	
585
}
586-
public Player_Load(playerid)
586+
public Player_Load(playerid)
587-
{
587+
{
588-
	Player_SetStatLabel(playerid, "Preparando para carregar...");
588+
	Player_SetStatLabel(playerid, "Preparando para carregar...");
589-
	gPlayerInfo[playerid][gPlayerStat] = PLAYER_STAT_LOADING;
589+
	gPlayerInfo[playerid][gPlayerStat] = PLAYER_STAT_LOADING;
590-
	format(gstring, sizeof gstring, "SELECT * FROM `player_info` WHERE `name`='%s'", gPlayerInfo[playerid][gPlayerName]);
590+
	format(gstring, sizeof gstring, "SELECT * FROM `player_info` WHERE `name`='%s'", gPlayerInfo[playerid][gPlayerName]);
591-
	mysql_function_query(g_dbConnection, gstring, true, "r@Player_Load", "i", playerid);
591+
	mysql_function_query(g_dbConnection, gstring, true, "r@Player_Load", "i", playerid);
592-
	return 1;
592+
	return 1;
593
}
594-
public r@Player_Load(playerid)
594+
public r@Player_Load(playerid)
595-
{
595+
{
596-
	Player_SetStatLabel(playerid, "Processando dados...");
596+
	Player_SetStatLabel(playerid, "Processando dados...");
597-
	new rows, fields;
597+
	new rows, fields;
598-
	cache_get_data(rows, fields);
598+
	cache_get_data(rows, fields);
599-
599+
600-
	new buffer[32];
600+
	new buffer[32];
601-
	cache_get_field_content(0, "id", 		buffer, g_dbConnection);
601+
	cache_get_field_content(0, "id", 		buffer, g_dbConnection);
602-
	gPlayerInfo[playerid][gPlayerID] = strval(buffer);
602+
	gPlayerInfo[playerid][gPlayerID] = strval(buffer);
603-
	cache_get_field_content(0, "attrib", 		buffer, g_dbConnection);
603+
	cache_get_field_content(0, "attrib", 		buffer, g_dbConnection);
604-
	gPlayerInfo[playerid][gPlayerAttributes] = strval(buffer);
604+
	gPlayerInfo[playerid][gPlayerAttributes] = strval(buffer);
605-
	cache_get_field_content(0, "level", 		buffer, g_dbConnection);
605+
	cache_get_field_content(0, "level", 		buffer, g_dbConnection);
606-
	gPlayerInfo[playerid][gPlayerLevel] = 		strval(buffer);
606+
	gPlayerInfo[playerid][gPlayerLevel] = 		strval(buffer);
607-
	cache_get_field_content(0, "exp", 			buffer, g_dbConnection);
607+
	cache_get_field_content(0, "exp", 			buffer, g_dbConnection);
608-
	gPlayerInfo[playerid][gPlayerExp] = 		strval(buffer);
608+
	gPlayerInfo[playerid][gPlayerExp] = 		strval(buffer);
609-
	cache_get_field_content(0, "cash", 			buffer, g_dbConnection);
609+
	cache_get_field_content(0, "cash", 			buffer, g_dbConnection);
610-
	gPlayerInfo[playerid][gPlayerCash] = 		strval(buffer);
610+
	gPlayerInfo[playerid][gPlayerCash] = 		strval(buffer);
611-
	cache_get_field_content(0, "money", 		buffer, g_dbConnection);
611+
	cache_get_field_content(0, "money", 		buffer, g_dbConnection);
612-
	gPlayerInfo[playerid][gPlayerMoney] = 		strval(buffer);
612+
	gPlayerInfo[playerid][gPlayerMoney] = 		strval(buffer);
613-
	cache_get_field_content(0, "paycheck", 		buffer, g_dbConnection);
613+
	cache_get_field_content(0, "paycheck", 		buffer, g_dbConnection);
614-
	gPlayerInfo[playerid][gPlayerPayCheck] = 	strval(buffer);
614+
	gPlayerInfo[playerid][gPlayerPayCheck] = 	strval(buffer);
615-
	cache_get_field_content(0, "savings", 		buffer, g_dbConnection);
615+
	cache_get_field_content(0, "savings", 		buffer, g_dbConnection);
616-
	gPlayerInfo[playerid][gPlayerSavings] = 	strval(buffer);
616+
	gPlayerInfo[playerid][gPlayerSavings] = 	strval(buffer);
617-
	cache_get_field_content(0, "family", 		buffer, g_dbConnection);
617+
	cache_get_field_content(0, "family", 		buffer, g_dbConnection);
618-
	gPlayerInfo[playerid][gPlayerFamily] = 		strval(buffer);
618+
	gPlayerInfo[playerid][gPlayerFamily] = 		strval(buffer);
619-
	cache_get_field_content(0, "familyrank", 	buffer, g_dbConnection);
619+
	cache_get_field_content(0, "familyrank", 	buffer, g_dbConnection);
620-
	gPlayerInfo[playerid][gPlayerFamilyRank] = 	strval(buffer);
620+
	gPlayerInfo[playerid][gPlayerFamilyRank] = 	strval(buffer);
621-
	cache_get_field_content(0, "familyjoin", 	buffer, g_dbConnection);
621+
	cache_get_field_content(0, "familyjoin", 	buffer, g_dbConnection);
622-
	gPlayerInfo[playerid][gPlayerFamilyJoin] = 	strval(buffer);
622+
	gPlayerInfo[playerid][gPlayerFamilyJoin] = 	strval(buffer);
623-
	cache_get_field_content(0, "job", 			buffer, g_dbConnection);
623+
	cache_get_field_content(0, "job", 			buffer, g_dbConnection);
624-
	gPlayerInfo[playerid][gPlayerJob] = 		strval(buffer);
624+
	gPlayerInfo[playerid][gPlayerJob] = 		strval(buffer);
625-
	cache_get_field_content(0, "jobrank", 		buffer, g_dbConnection);
625+
	cache_get_field_content(0, "jobrank", 		buffer, g_dbConnection);
626-
	gPlayerInfo[playerid][gPlayerJobRank] = 	strval(buffer);
626+
	gPlayerInfo[playerid][gPlayerJobRank] = 	strval(buffer);
627-
	cache_get_field_content(0, "jobtime", 		buffer, g_dbConnection);
627+
	cache_get_field_content(0, "jobtime", 		buffer, g_dbConnection);
628-
	gPlayerInfo[playerid][gPlayerJobTime] = 	strval(buffer);
628+
	gPlayerInfo[playerid][gPlayerJobTime] = 	strval(buffer);
629-
	cache_get_field_content(0, "spawn", 		buffer, g_dbConnection);
629+
	cache_get_field_content(0, "spawn", 		buffer, g_dbConnection);
630-
	gPlayerInfo[playerid][gPlayerSpawn] = 		strval(buffer);
630+
	gPlayerInfo[playerid][gPlayerSpawn] = 		strval(buffer);
631-
	cache_get_field_content(0, "skin", 		buffer, g_dbConnection);
631+
	cache_get_field_content(0, "skin", 		buffer, g_dbConnection);
632-
	gPlayerInfo[playerid][gPlayerSkin] = 		strval(buffer);
632+
	gPlayerInfo[playerid][gPlayerSkin] = 		strval(buffer);
633-
	
633+
	
634-
	Player_SetStatLabel(playerid, "Verificando bans...");
634+
	Player_SetStatLabel(playerid, "Verificando bans...");
635-
    Player_BanCheck(playerid);
635+
    Player_BanCheck(playerid);
636-
	return 1;
636+
	return 1;
637
}
638-
638+
639-
enum
639+
enum
640-
{
640+
{
641-
    RECORD_TYPE_COMMENT,
641+
    RECORD_TYPE_COMMENT,
642-
    RECORD_TYPE_BAN,
642+
    RECORD_TYPE_BAN,
643-
    RECORD_TYPE_KICK,
643+
    RECORD_TYPE_KICK,
644-
    RECORD_TYPE_AJAIL
644+
    RECORD_TYPE_AJAIL
645
}
646-
public Player_BanCheck(playerid)
646+
public Player_BanCheck(playerid)
647-
{
647+
{
648-
    format(gstring, sizeof gstring, "SELECT `record_info`.*, `player_info`.`name` AS adminname FROM `record_info` INNER JOIN `player_info` ON `record_info`.`admin` = `player_info`.`id` WHERE `record_info`.`lifted`=0 AND `record_info`.`type`=1 AND (`record_info`.`stamp`+`record_info`.`time` < UNIX_TIMESTAMP() OR `record_info`.`time`=-1) AND `record_info`.`pid`=%d", gPlayerInfo[playerid][gPlayerID]);
648+
    format(gstring, sizeof gstring, "SELECT `record_info`.*, `player_info`.`name` AS adminname FROM `record_info` INNER JOIN `player_info` ON `record_info`.`admin` = `player_info`.`id` WHERE `record_info`.`lifted`=0 AND `record_info`.`type`=1 AND (`record_info`.`stamp`+`record_info`.`time` < UNIX_TIMESTAMP() OR `record_info`.`time`=-1) AND `record_info`.`pid`=%d", gPlayerInfo[playerid][gPlayerID]);
649-
    mysql_function_query(g_dbConnection, gstring, true, "r@Player_BanCheck", "i", playerid);
649+
    mysql_function_query(g_dbConnection, gstring, true, "r@Player_BanCheck", "i", playerid);
650-
    return 1;
650+
    return 1;
651
}
652-
652+
653-
public r@Player_BanCheck(playerid)
653+
public r@Player_BanCheck(playerid)
654-
{
654+
{
655-
    new rows, fields;
655+
    new rows, fields;
656-
    cache_get_data(rows, fields, g_dbConnection);
656+
    cache_get_data(rows, fields, g_dbConnection);
657-
657+
658-
    if(rows)
658+
    if(rows)
659-
    { // Vish. Sujou pros irmão :P
659+
    { // Vish. Sujou pros irmão :P
660-
        SendClientMessage(playerid, -1, " ");
660+
        SendClientMessage(playerid, -1, " ");
661-
        SendClientMessage(playerid, -1, " ");
661+
        SendClientMessage(playerid, -1, " ");
662-
        SendClientMessage(playerid, -1, "Você tem os seguintes bans (não expirados/eternos) adicionados a você:");
662+
        SendClientMessage(playerid, -1, "Você tem os seguintes bans (não expirados/eternos) adicionados a você:");
663-
663+
664-
        new index = -1;
664+
        new index = -1;
665-
        while(++index < rows)
665+
        while(++index < rows)
666-
        {
666+
        {
667-
            enum RI_RESULT_INFO
667+
            enum RI_RESULT_INFO
668-
            {
668+
            {
669-
                _ri_id,
669+
                _ri_id,
670-
                _ri_pid,
670+
                _ri_pid,
671-
                _ri_type,
671+
                _ri_type,
672-
                _ri_stamp,
672+
                _ri_stamp,
673-
                _ri_reason[255],
673+
                _ri_reason[255],
674-
                _ri_time,
674+
                _ri_time,
675-
                _ri_admin,
675+
                _ri_admin,
676-
                _ri_lifted,
676+
                _ri_lifted,
677-
                _ri_liftadmin,
677+
                _ri_liftadmin,
678-
                _ri_liftreason[255],
678+
                _ri_liftreason[255],
679-
                _ri_adminname[MAX_PLAYER_NAME]
679+
                _ri_adminname[MAX_PLAYER_NAME]
680-
            }
680+
            }
681-
            new result[RI_RESULT_INFO],
681+
            new result[RI_RESULT_INFO],
682-
                buffer[64];
682+
                buffer[64];
683-
683+
684-
            cache_get_field_content(index, "id", buffer, g_dbConnection);
684+
            cache_get_field_content(index, "id", buffer, g_dbConnection);
685-
            result[_ri_id] = strval(buffer);
685+
            result[_ri_id] = strval(buffer);
686-
            cache_get_field_content(index, "pid", buffer, g_dbConnection);
686+
            cache_get_field_content(index, "pid", buffer, g_dbConnection);
687-
            result[_ri_pid] = strval(buffer);
687+
            result[_ri_pid] = strval(buffer);
688-
            cache_get_field_content(index, "type", buffer, g_dbConnection);
688+
            cache_get_field_content(index, "type", buffer, g_dbConnection);
689-
            result[_ri_type] = strval(buffer);
689+
            result[_ri_type] = strval(buffer);
690-
            cache_get_field_content(index, "stamp", buffer, g_dbConnection);
690+
            cache_get_field_content(index, "stamp", buffer, g_dbConnection);
691-
            result[_ri_stamp] = strval(buffer);
691+
            result[_ri_stamp] = strval(buffer);
692-
            cache_get_field_content(index, "reason", result[_ri_reason], g_dbConnection);
692+
            cache_get_field_content(index, "reason", result[_ri_reason], g_dbConnection);
693-
            cache_get_field_content(index, "time", buffer, g_dbConnection);
693+
            cache_get_field_content(index, "time", buffer, g_dbConnection);
694-
            result[_ri_time] = strval(buffer);
694+
            result[_ri_time] = strval(buffer);
695-
            cache_get_field_content(index, "admin", buffer, g_dbConnection);
695+
            cache_get_field_content(index, "admin", buffer, g_dbConnection);
696-
            result[_ri_admin] = strval(buffer);
696+
            result[_ri_admin] = strval(buffer);
697-
            cache_get_field_content(index, "lifted", buffer, g_dbConnection);
697+
            cache_get_field_content(index, "lifted", buffer, g_dbConnection);
698-
            result[_ri_lifted] = strval(buffer);
698+
            result[_ri_lifted] = strval(buffer);
699-
            cache_get_field_content(index, "liftadmin", buffer, g_dbConnection);
699+
            cache_get_field_content(index, "liftadmin", buffer, g_dbConnection);
700-
            result[_ri_liftadmin] = strval(buffer);
700+
            result[_ri_liftadmin] = strval(buffer);
701-
            cache_get_field_content(index, "liftreason", result[_ri_liftreason], g_dbConnection);
701+
            cache_get_field_content(index, "liftreason", result[_ri_liftreason], g_dbConnection);
702-
            cache_get_field_content(index, "adminname", result[_ri_adminname], g_dbConnection);
702+
            cache_get_field_content(index, "adminname", result[_ri_adminname], g_dbConnection);
703-
703+
704-
            new
704+
            new
705-
                tm<tmTime>;
705+
                tm<tmTime>;
706-
            localtime(Time:result[_ri_stamp], tmTime);
706+
            localtime(Time:result[_ri_stamp], tmTime);
707-
            strftime(buffer, sizeof buffer, "%A, %d de %B de %Y (%X)", tmTime);
707+
            strftime(buffer, sizeof buffer, "%A, %d de %B de %Y (%X)", tmTime);
708-
708+
709-
            format(gstring, sizeof gstring, " - {C0C0C0}%s, {FFFFFF}pelo administrador {C0C0C0}%s:", buffer, result[_ri_adminname]);
709+
            format(gstring, sizeof gstring, " - {C0C0C0}%s, {FFFFFF}pelo administrador {C0C0C0}%s:", buffer, result[_ri_adminname]);
710-
            SendClientMessage(playerid, -1, gstring);
710+
            SendClientMessage(playerid, -1, gstring);
711-
            format(gstring, sizeof gstring, "   {C0C0C0}Motivo: {FFFFFF}%s", result[_ri_reason]);
711+
            format(gstring, sizeof gstring, "   {C0C0C0}Motivo: {FFFFFF}%s", result[_ri_reason]);
712-
            SendClientMessage(playerid, -1, gstring);
712+
            SendClientMessage(playerid, -1, gstring);
713-
713+
714-
            buffer[0] = 0;
714+
            buffer[0] = 0;
715-
            strcat(buffer, "Nunca");
715+
            strcat(buffer, "Nunca");
716-
            if(result[_ri_time] != -1)
716+
            if(result[_ri_time] != -1)
717-
            {
717+
            {
718-
                localtime(Time:result[_ri_stamp] + Time:result[_ri_time], tmTime);
718+
                localtime(Time:result[_ri_stamp] + Time:result[_ri_time], tmTime);
719-
                strftime(buffer, sizeof buffer, "%A, %d de %B de %Y (%X)", tmTime);
719+
                strftime(buffer, sizeof buffer, "%A, %d de %B de %Y (%X)", tmTime);
720-
            }
720+
            }
721-
            format(gstring, sizeof gstring, "   {C0C0C0}Expira em: {FFFFFF}%s", buffer);
721+
            format(gstring, sizeof gstring, "   {C0C0C0}Expira em: {FFFFFF}%s", buffer);
722-
            SendClientMessage(playerid, -1, gstring);
722+
            SendClientMessage(playerid, -1, gstring);
723-
723+
724-
724+
725-
725+
726-
726+
727-
        }
727+
        }
728-
        Kick(playerid);
728+
        Kick(playerid);
729-
        return 1;
729+
        return 1;
730-
    }
730+
    }
731-
731+
732-
    Player_SetStatLabel(playerid, "Feito! Voce está sendo levado ao mundo!");
732+
    Player_SetStatLabel(playerid, "Feito! Voce está sendo levado ao mundo!");
733-
	Player_Spawn(playerid);
733+
	Player_Spawn(playerid);
734-
    return 1;
734+
    return 1;
735
}
736-
736+
737-
737+
738-
public r@Player_Register(playerid, password[])
738+
public r@Player_Register(playerid, password[])
739-
{
739+
{
740-
	SendClientMessageFormatted(playerid, -1, "Senhor {2ADFE8}%s{FFFFFF}. Você foi autorizado com sucesso em nossa cidade.", gPlayerInfo[playerid][gPlayerName]);
740+
	SendClientMessageFormatted(playerid, -1, "Senhor {2ADFE8}%s{FFFFFF}. Você foi autorizado com sucesso em nossa cidade.", gPlayerInfo[playerid][gPlayerName]);
741-
	SendClientMessage(playerid, -1, "Deseja que eu te guie numa pequena volta na nossa cidade?");
741+
	SendClientMessage(playerid, -1, "Deseja que eu te guie numa pequena volta na nossa cidade?");
742-
	SendClientMessage(playerid, -1, "{2A6DE8}(( {FFFFFF}Lembrando que você pode ver o tutorial quando você quiser, digitando /tutorial{2A6DE8} ))");
742+
	SendClientMessage(playerid, -1, "{2A6DE8}(( {FFFFFF}Lembrando que você pode ver o tutorial quando você quiser, digitando /tutorial{2A6DE8} ))");
743-
    SendClientMessageFormatted(playerid, -1, "(( {WHITE}Sua senha é %s. Se você registrou seu e-mail, uma cópia foi mandada para o mesmo.{/} ))",
743+
    SendClientMessageFormatted(playerid, -1, "(( {WHITE}Sua senha é %s. Se você registrou seu e-mail, uma cópia foi mandada para o mesmo.{/} ))",
744-
        password
744+
        password
745-
    );
745+
    );
746-
	
746+
	
747-
	mysql_store_result(g_dbConnection);
747+
	mysql_store_result(g_dbConnection);
748-
	new insert = mysql_insert_id(g_dbConnection);
748+
	new insert = mysql_insert_id(g_dbConnection);
749-
	mysql_free_result(g_dbConnection);
749+
	mysql_free_result(g_dbConnection);
750-
750+
751-
    SendClientMessageFormatted(playerid, -1, "Você se registrou como {1E90FF}%q{FFFFFF}.", gPlayerInfo[playerid][gPlayerName]);
751+
    SendClientMessageFormatted(playerid, -1, "Você se registrou como {1E90FF}%q{FFFFFF}.", gPlayerInfo[playerid][gPlayerName]);
752-
    SendClientMessageFormatted(playerid, -1, "Você pode ter suporte mais rápido fornecendo o seu número a um administrador, que no caso é {C0C0C0}%d{FFFFFF}.", insert);
752+
    SendClientMessageFormatted(playerid, -1, "Você pode ter suporte mais rápido fornecendo o seu número a um administrador, que no caso é {C0C0C0}%d{FFFFFF}.", insert);
753-
753+
754-
    SendClientMessage(playerid, -1, "     - Para obter informações gerais sobre você e o servidor, digite {C0C0C0}/info{FFFFFF}.");
754+
    SendClientMessage(playerid, -1, "     - Para obter informações gerais sobre você e o servidor, digite {C0C0C0}/info{FFFFFF}.");
755-
    SendClientMessage(playerid, -1, "     - Para verificar seus documentos, digite {C0C0C0}/inventário{FFFFFF} (Serve também para outros itens).");
755+
    SendClientMessage(playerid, -1, "     - Para verificar seus documentos, digite {C0C0C0}/inventário{FFFFFF} (Serve também para outros itens).");
756-
    SendClientMessage(playerid, -1, "{C0C0C0}Se perder sua Identidade, você pode tirar uma cópia em uma delegacia local...");
756+
    SendClientMessage(playerid, -1, "{C0C0C0}Se perder sua Identidade, você pode tirar uma cópia em uma delegacia local...");
757-
    SendClientMessage(playerid, -1, "Não exite em procurar por uma administrador para obter ajuda! Para informações gerais, novamente, digite {C0C0C0}/info{FFFFFF}");
757+
    SendClientMessage(playerid, -1, "Não exite em procurar por uma administrador para obter ajuda! Para informações gerais, novamente, digite {C0C0C0}/info{FFFFFF}");
758-
	Player_Load(playerid);
758+
	Player_Load(playerid);
759-
	return 1;
759+
	return 1;
760
}
761-
761+
762-
public r@Player_Login(playerid, password[])
762+
public r@Player_Login(playerid, password[])
763-
{
763+
{
764-
	new
764+
	new
765-
		hash_pass[129];
765+
		hash_pass[129];
766-
	WP_Hash(hash_pass, sizeof hash_pass, password);
766+
	WP_Hash(hash_pass, sizeof hash_pass, password);
767-
	cache_get_field_content(0, "password", gstring, g_dbConnection);
767+
	cache_get_field_content(0, "password", gstring, g_dbConnection);
768-
	
768+
	
769-
	new result = strcmp(hash_pass, gstring, true);
769+
	new result = strcmp(hash_pass, gstring, true);
770-
	
770+
	
771-
	
771+
	
772-
	
772+
	
773-
	if(!result)
773+
	if(!result)
774-
	{
774+
	{
775-
        SendClientMessage(playerid, -1, "{FF7F50}(( {FFFFFF}Aguarde enquanto você é carregado e levado ao mundo...{FF7F50} ))");
775+
        SendClientMessage(playerid, -1, "{FF7F50}(( {FFFFFF}Aguarde enquanto você é carregado e levado ao mundo...{FF7F50} ))");
776-
		Player_SetStatLabel(playerid, "Carregando!");
776+
		Player_SetStatLabel(playerid, "Carregando!");
777-
		Player_Load(playerid);
777+
		Player_Load(playerid);
778-
	}
778+
	}
779-
	else
779+
	else
780-
	{
780+
	{
781-
		if(gPlayerInfo[playerid][gPlayerLogin_Tries] == 3)
781+
		if(gPlayerInfo[playerid][gPlayerLogin_Tries] == 3)
782-
		{
782+
		{
783-
			SendClientMessage(playerid, -1, "Você foi {E01B35}despejado{FFFFFF} por exceder as tentativas máximas de login!");
783+
			SendClientMessage(playerid, -1, "Você foi {E01B35}despejado{FFFFFF} por exceder as tentativas máximas de login!");
784-
			Kick(playerid);
784+
			Kick(playerid);
785-
		}
785+
		}
786-
		else
786+
		else
787-
		{
787+
		{
788-
			gPlayerInfo[playerid][gPlayerLogin_Tries] ++;
788+
			gPlayerInfo[playerid][gPlayerLogin_Tries] ++;
789-
			ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login no RioRPG:", "\tSenha errada!\nPara efetuar o login no nosso servidor,\ndigite a sua senha abaixo.", "Login", "");
789+
			ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login no RioRPG:", "\tSenha errada!\nPara efetuar o login no nosso servidor,\ndigite a sua senha abaixo.", "Login", "");
790-
		}
790+
		}
791-
	}
791+
	}
792-
	return 1;
792+
	return 1;
793
}
794-
794+
795-
public Player_Spawn(playerid)
795+
public Player_Spawn(playerid)
796-
{
796+
{
797-
	if(!gPlayerInfo[playerid][gPlayerSpawn])
797+
	if(!gPlayerInfo[playerid][gPlayerSpawn])
798-
		SetSpawnInfo(playerid, 0, gPlayerInfo[playerid][gPlayerSkin], cDefaultPos[0], cDefaultPos[1], cDefaultPos[2], cDefaultPos[3], 0, 0, 0, 0, 0, 0);
798+
		SetSpawnInfo(playerid, 0, gPlayerInfo[playerid][gPlayerSkin], cDefaultPos[0], cDefaultPos[1], cDefaultPos[2], cDefaultPos[3], 0, 0, 0, 0, 0, 0);
799-
	else
799+
	else
800-
	{
800+
	{
801-
		//
801+
		//
802-
	}
802+
	}
803-
	TogglePlayerSpectating(playerid, false);
803+
	TogglePlayerSpectating(playerid, false);
804-
	gPlayerInfo[playerid][gPlayerStat] = PLAYER_STAT_PLAYING;
804+
	gPlayerInfo[playerid][gPlayerStat] = PLAYER_STAT_PLAYING;
805-
	SpawnPlayer(playerid);
805+
	SpawnPlayer(playerid);
806-
	Player_SetStatLabel(playerid, "  ");
806+
	Player_SetStatLabel(playerid, "  ");
807-
	return 1;
807+
	return 1;
808
}
809-
809+
810-
stock Player_SetStatLabel(playerid, text[])
810+
stock Player_SetStatLabel(playerid, text[])
811-
{
811+
{
812-
	TextDrawSetString(g_tdStat, text);
812+
	TextDrawSetString(g_tdStat, text);
813-
	TextDrawShowForPlayer(playerid, g_tdStat);
813+
	TextDrawShowForPlayer(playerid, g_tdStat);
814-
	return 1;
814+
	return 1;
815
}
816-
816+
817-
817+
818-
818+
819-
819+
820-
820+
821-
821+
822-
822+
823-
823+
824-
/* Item System */
824+
/* Item System */
825-
enum ITEM_INFO
825+
enum ITEM_INFO
826-
{
826+
{
827-
	gItemName[64],
827+
	gItemName[64],
828-
	gItemType,
828+
	gItemType,
829-
	Float:gItemExtra
829+
	Float:gItemExtra
830
}
831-
831+
832-
enum
832+
enum
833-
{
833+
{
834-
	ITEM_TYPE_ID,
834+
	ITEM_TYPE_ID,
835-
	ITEM_TYPE_CASH
835+
	ITEM_TYPE_CASH
836
}
837-
837+
838-
new const
838+
new const
839-
	gItemInfo[][ITEM_INFO] = {
839+
	gItemInfo[][ITEM_INFO] = {
840-
		{"Identidade", ITEM_TYPE_ID, 0.0},
840+
		{"Identidade", ITEM_TYPE_ID, 0.0},
841-
		{"Dinheiro", ITEM_TYPE_CASH, 0.0}
841+
		{"Dinheiro", ITEM_TYPE_CASH, 0.0}
842-
	};
842+
	};
843-
843+
844-
/* PLAYER INVENT */
844+
/* PLAYER INVENT */
845-
#define MAX_ITEMS_PER_PAGE 10
845+
#define MAX_ITEMS_PER_PAGE 10
846-
forward Invent_Show(playerid); //
846+
forward Invent_Show(playerid); //
847-
forward r@Invent_Show(playerid);
847+
forward r@Invent_Show(playerid);
848-
848+
849-
CMD:inventario(playerid, params[], help)
849+
CMD:inventario(playerid, params[], help)
850-
{
850+
{
851-
	#pragma unused params
851+
	#pragma unused params
852-
	#pragma unused help
852+
	#pragma unused help
853-
	if(gPlayerInfo[playerid][gPlayerStat] != PLAYER_STAT_PLAYING)
853+
	if(gPlayerInfo[playerid][gPlayerStat] != PLAYER_STAT_PLAYING)
854-
	{
854+
	{
855-
		return 1;
855+
		return 1;
856-
	}
856+
	}
857-
	Invent_Show(playerid);
857+
	Invent_Show(playerid);
858-
	return 1;
858+
	return 1;
859
}
860-
860+
861-
public Invent_Show(playerid) 
861+
public Invent_Show(playerid) 
862-
{
862+
{
863-
	if(gPlayerInfo[playerid][gPlayerStat] < PLAYER_STAT_PLAYING)
863+
	if(gPlayerInfo[playerid][gPlayerStat] < PLAYER_STAT_PLAYING)
864-
		return 1;
864+
		return 1;
865-
	
865+
	
866-
	format(gstring, sizeof gstring, "SELECT * FROM `inventory_info` WHERE `pid`=%d", gPlayerInfo[playerid][gPlayerID]);
866+
	format(gstring, sizeof gstring, "SELECT * FROM `inventory_info` WHERE `pid`=%d", gPlayerInfo[playerid][gPlayerID]);
867-
	mysql_function_query(g_dbConnection, gstring, true, "r@Invent_Show", "i", playerid);
867+
	mysql_function_query(g_dbConnection, gstring, true, "r@Invent_Show", "i", playerid);
868-
	return 1;
868+
	return 1;
869
}
870-
870+
871-
public r@Invent_Show(playerid)
871+
public r@Invent_Show(playerid)
872-
{
872+
{
873-
	new rows, fields;
873+
	new rows, fields;
874-
	cache_get_data(rows, fields, g_dbConnection);
874+
	cache_get_data(rows, fields, g_dbConnection);
875-
	
875+
	
876-
	gstring[0] = 0;
876+
	gstring[0] = 0;
877-
	new temp[64], title[64];
877+
	new temp[64], title[64];
878-
	format(title, sizeof title, "Inventário (%s):", gPlayerInfo[playerid][gPlayerName]);
878+
	format(title, sizeof title, "Inventário (%s):", gPlayerInfo[playerid][gPlayerName]);
879-
	
879+
	
880-
	//declare gstring[];
880+
	//declare gstring[];
881-
	for(new i; i < rows; i++)
881+
	for(new i; i < rows; i++)
882-
	{
882+
	{
883-
		new
883+
		new
884-
			item;
884+
			item;
885-
		cache_get_field_content(i, "item", temp, g_dbConnection);
885+
		cache_get_field_content(i, "item", temp, g_dbConnection);
886-
		item = strval(temp);
886+
		item = strval(temp);
887-
		
887+
		
888-
		format(temp, sizeof temp, "[%d] - %s\n", i, gItemInfo[item][gItemName]);
888+
		format(temp, sizeof temp, "[%d] - %s\n", i, gItemInfo[item][gItemName]);
889-
		strcat(gstring, temp);
889+
		strcat(gstring, temp);
890-
	}
890+
	}
891-
	ShowPlayerDialog(playerid, DIALOG_INVENT, DIALOG_STYLE_LIST, title, gstring, "Selecionar", "Sair");
891+
	ShowPlayerDialog(playerid, DIALOG_INVENT, DIALOG_STYLE_LIST, title, gstring, "Selecionar", "Sair");
892-
	return 1;
892+
	return 1;
893
}
894-
894+
895-
895+
896-
//
896+
//
897-
//
897+
//
898-
//
898+
//
899-
// PROPERTY SYSTEM
899+
// PROPERTY SYSTEM
900-
//
900+
//
901-
forward Property_LoadAll();
901+
forward Property_LoadAll();
902-
	forward r@Property_LoadAll();
902+
	forward r@Property_LoadAll();
903-
forward Property_SetAll();
903+
forward Property_SetAll();
904-
904+
905-
public Property_LoadAll()
905+
public Property_LoadAll()
906-
{
906+
{
907-
	static block;	
907+
	static block;	
908-
	if(block)
908+
	if(block)
909-
		return 1;
909+
		return 1;
910-
	block = 1;
910+
	block = 1;
911-
	
911+
	
912-
	printf("Preparando para carregar as propriedades...");
912+
	printf("Preparando para carregar as propriedades...");
913-
	
913+
	
914-
	mysql_function_query(g_dbConnection, "SELECT * FROM `property_info`", true, "r@Property_LoadAll", ""); 
914+
	mysql_function_query(g_dbConnection, "SELECT * FROM `property_info`", true, "r@Property_LoadAll", ""); 
915-
	return 1;
915+
	return 1;
916
}
917-
917+
918-
public r@Property_LoadAll()
918+
public r@Property_LoadAll()
919-
{
919+
{
920-
	new rows, fields, index = -1;
920+
	new rows, fields, index = -1;
921-
	cache_get_data(rows, fields, g_dbConnection);
921+
	cache_get_data(rows, fields, g_dbConnection);
922-
	
922+
	
923-
	while(++index < rows)
923+
	while(++index < rows)
924-
	{
924+
	{
925-
		new buffer[32], id;
925+
		new buffer[32], id;
926-
		cache_get_field_content(index, "id", buffer, g_dbConnection);
926+
		cache_get_field_content(index, "id", buffer, g_dbConnection);
927-
		id = strval(buffer);
927+
		id = strval(buffer);
928-
		
928+
		
929-
		if(id >= MAX_PROPERTIES)
929+
		if(id >= MAX_PROPERTIES)
930-
			continue;
930+
			continue;
931-
		
931+
		
932-
		// General Info
932+
		// General Info
933-
		cache_get_field_content(index, "attrib", buffer, g_dbConnection);
933+
		cache_get_field_content(index, "attrib", buffer, g_dbConnection);
934-
		gPropertyInfo[id][prop_Attrib] = strval(buffer);
934+
		gPropertyInfo[id][prop_Attrib] = strval(buffer);
935-
		cache_get_field_content(index, "type", buffer, g_dbConnection);
935+
		cache_get_field_content(index, "type", buffer, g_dbConnection);
936-
		gPropertyInfo[id][prop_Type] = strval(buffer);
936+
		gPropertyInfo[id][prop_Type] = strval(buffer);
937-
		cache_get_field_content(index, "level", buffer, g_dbConnection);
937+
		cache_get_field_content(index, "level", buffer, g_dbConnection);
938-
		gPropertyInfo[id][prop_Level] = strval(buffer);
938+
		gPropertyInfo[id][prop_Level] = strval(buffer);
939-
		cache_get_field_content(index, "price", buffer, g_dbConnection);
939+
		cache_get_field_content(index, "price", buffer, g_dbConnection);
940-
		gPropertyInfo[id][prop_Price] = strval(buffer);
940+
		gPropertyInfo[id][prop_Price] = strval(buffer);
941-
		
941+
		
942-
		// Position Info
942+
		// Position Info
943-
		//
943+
		//
944-
		// ext_
944+
		// ext_
945-
		cache_get_field_content(index, "ext_x", buffer, g_dbConnection);
945+
		cache_get_field_content(index, "ext_x", buffer, g_dbConnection);
946-
		gPropertyInfo[id][prop_ExtPos][0] = floatstr(buffer);
946+
		gPropertyInfo[id][prop_ExtPos][0] = floatstr(buffer);
947-
		cache_get_field_content(index, "ext_y", buffer, g_dbConnection);
947+
		cache_get_field_content(index, "ext_y", buffer, g_dbConnection);
948-
		gPropertyInfo[id][prop_ExtPos][1] = floatstr(buffer);
948+
		gPropertyInfo[id][prop_ExtPos][1] = floatstr(buffer);
949-
		cache_get_field_content(index, "ext_z", buffer, g_dbConnection);
949+
		cache_get_field_content(index, "ext_z", buffer, g_dbConnection);
950-
		gPropertyInfo[id][prop_ExtPos][2] = floatstr(buffer);
950+
		gPropertyInfo[id][prop_ExtPos][2] = floatstr(buffer);
951-
		cache_get_field_content(index, "ext_prop", buffer, g_dbConnection);
951+
		cache_get_field_content(index, "ext_prop", buffer, g_dbConnection);
952-
		gPropertyInfo[id][prop_ExtProp] = strval(buffer);
952+
		gPropertyInfo[id][prop_ExtProp] = strval(buffer);
953-
		
953+
		
954-
		//
954+
		//
955-
		// int_
955+
		// int_
956-
		cache_get_field_content(index, "int_x", buffer, g_dbConnection);
956+
		cache_get_field_content(index, "int_x", buffer, g_dbConnection);
957-
		gPropertyInfo[id][prop_IntPos][0] = floatstr(buffer);
957+
		gPropertyInfo[id][prop_IntPos][0] = floatstr(buffer);
958-
		cache_get_field_content(index, "int_y", buffer, g_dbConnection);
958+
		cache_get_field_content(index, "int_y", buffer, g_dbConnection);
959-
		gPropertyInfo[id][prop_IntPos][1] = floatstr(buffer);
959+
		gPropertyInfo[id][prop_IntPos][1] = floatstr(buffer);
960-
		cache_get_field_content(index, "int_z", buffer, g_dbConnection);
960+
		cache_get_field_content(index, "int_z", buffer, g_dbConnection);
961-
		gPropertyInfo[id][prop_IntPos][2] = floatstr(buffer);
961+
		gPropertyInfo[id][prop_IntPos][2] = floatstr(buffer);
962-
		cache_get_field_content(index, "int_int", buffer, g_dbConnection);
962+
		cache_get_field_content(index, "int_int", buffer, g_dbConnection);
963-
		gPropertyInfo[id][prop_IntInt] = strval(buffer);
963+
		gPropertyInfo[id][prop_IntInt] = strval(buffer);
964-
		
964+
		
965-
		//
965+
		//
966-
		// Game Info
966+
		// Game Info
967-
		cache_get_field_content(index, "owner", buffer, g_dbConnection);
967+
		cache_get_field_content(index, "owner", buffer, g_dbConnection);
968-
		gPropertyInfo[id][prop_Owner] = strval(buffer);
968+
		gPropertyInfo[id][prop_Owner] = strval(buffer);
969-
		cache_get_field_content(index, "locked", buffer, g_dbConnection);
969+
		cache_get_field_content(index, "locked", buffer, g_dbConnection);
970-
		gPropertyInfo[id][prop_Locked] = strval(buffer);
970+
		gPropertyInfo[id][prop_Locked] = strval(buffer);
971-
		cache_get_field_content(index, "name", gPropertyInfo[id][prop_Name], g_dbConnection);
971+
		cache_get_field_content(index, "name", gPropertyInfo[id][prop_Name], g_dbConnection);
972-
		
972+
		
973-
		gPropertyInfo[id][prop_Loaded] = true;
973+
		gPropertyInfo[id][prop_Loaded] = true;
974-
		
974+
		
975-
		printf("-- PROP: %d CARREGADA: ex: %.2f | ey: %.2f | ez %.2f", id, gPropertyInfo[id][prop_ExtPos][0], gPropertyInfo[id][prop_ExtPos][1], gPropertyInfo[id][prop_ExtPos][2]);
975+
		printf("-- PROP: %d CARREGADA: ex: %.2f | ey: %.2f | ez %.2f", id, gPropertyInfo[id][prop_ExtPos][0], gPropertyInfo[id][prop_ExtPos][1], gPropertyInfo[id][prop_ExtPos][2]);
976-
	}
976+
	}
977-
	Property_SetAll();
977+
	Property_SetAll();
978-
	return 1;
978+
	return 1;
979
}
980-
980+
981-
public Property_SetAll()
981+
public Property_SetAll()
982-
{
982+
{
983-
	static block;	
983+
	static block;	
984-
	if(block)
984+
	if(block)
985-
		return 1;
985+
		return 1;
986-
	block = 1;
986+
	block = 1;
987-
	
987+
	
988-
	new index = -1;
988+
	new index = -1;
989-
	while(++index < MAX_PROPERTIES)
989+
	while(++index < MAX_PROPERTIES)
990-
		if(gPropertyInfo[index][prop_Loaded])
990+
		if(gPropertyInfo[index][prop_Loaded])
991-
		{
991+
		{
992-
			if(gPropertyInfo[index][prop_Attrib] & PROPERTY_ATTRIB_ENTERABLE)
992+
			if(gPropertyInfo[index][prop_Attrib] & PROPERTY_ATTRIB_ENTERABLE)
993-
			{
993+
			{
994-
				printf("PROP %d ENTERABLE!", index);
994+
				printf("PROP %d ENTERABLE!", index);
995-
				gPropertyInfo[index][prop_AreaExt] = CreateDynamicSphere(gPropertyInfo[index][prop_ExtPos][0], gPropertyInfo[index][prop_ExtPos][1], gPropertyInfo[index][prop_ExtPos][2], 2.0, gPropertyInfo[index][prop_ExtProp], gPropertyInfo[gPropertyInfo[index][prop_ExtProp]][prop_IntInt]);
995+
				gPropertyInfo[index][prop_AreaExt] = CreateDynamicSphere(gPropertyInfo[index][prop_ExtPos][0], gPropertyInfo[index][prop_ExtPos][1], gPropertyInfo[index][prop_ExtPos][2], 2.0, gPropertyInfo[index][prop_ExtProp], gPropertyInfo[gPropertyInfo[index][prop_ExtProp]][prop_IntInt]);
996-
				gPropertyInfo[index][prop_PickupExt] = CreateDynamicPickup(1318, 1, gPropertyInfo[index][prop_ExtPos][0], gPropertyInfo[index][prop_ExtPos][1], gPropertyInfo[index][prop_ExtPos][2], gPropertyInfo[index][prop_ExtProp], gPropertyInfo[gPropertyInfo[index][prop_ExtProp]][prop_IntInt]);
996+
				gPropertyInfo[index][prop_PickupExt] = CreateDynamicPickup(1318, 1, gPropertyInfo[index][prop_ExtPos][0], gPropertyInfo[index][prop_ExtPos][1], gPropertyInfo[index][prop_ExtPos][2], gPropertyInfo[index][prop_ExtProp], gPropertyInfo[gPropertyInfo[index][prop_ExtProp]][prop_IntInt]);
997-
			}
997+
			}
998-
			if(gPropertyInfo[index][prop_Attrib] & PROPERTY_ATTRIB_EXITABLE)
998+
			if(gPropertyInfo[index][prop_Attrib] & PROPERTY_ATTRIB_EXITABLE)
999-
			{
999+
			{
1000-
				gPropertyInfo[index][prop_AreaInt] = CreateDynamicSphere(gPropertyInfo[index][prop_IntPos][0], gPropertyInfo[index][prop_IntPos][1], gPropertyInfo[index][prop_IntPos][2], 2.0, index, gPropertyInfo[index][prop_IntInt]);
1000+
				gPropertyInfo[index][prop_AreaInt] = CreateDynamicSphere(gPropertyInfo[index][prop_IntPos][0], gPropertyInfo[index][prop_IntPos][1], gPropertyInfo[index][prop_IntPos][2], 2.0, index, gPropertyInfo[index][prop_IntInt]);
1001-
				gPropertyInfo[index][prop_PickupInt] = CreateDynamicPickup(1318, 1, gPropertyInfo[index][prop_IntPos][0], gPropertyInfo[index][prop_IntPos][1], gPropertyInfo[index][prop_IntPos][2], index, gPropertyInfo[index][prop_IntInt]);
1001+
				gPropertyInfo[index][prop_PickupInt] = CreateDynamicPickup(1318, 1, gPropertyInfo[index][prop_IntPos][0], gPropertyInfo[index][prop_IntPos][1], gPropertyInfo[index][prop_IntPos][2], index, gPropertyInfo[index][prop_IntInt]);
1002-
			}
1002+
			}
1003-
		}
1003+
		}
1004-
	return 1;
1004+
	return 1;
1005
}
1006-
1006+
1007-
//
1007+
//
1008-
//
1008+
//
1009-
//
1009+
//
1010-
// FACTION SYSTEM
1010+
// FACTION SYSTEM
1011-
//
1011+
//
1012-
//
1012+
//
1013-
enum {
1013+
enum {
1014-
    MAX_FACTIONS = 25
1014+
    MAX_FACTIONS = 25
1015
}
1016-
enum FACTION_RANK_INFO
1016+
enum FACTION_RANK_INFO
1017-
{
1017+
{
1018-
    fact_Rank1[32],
1018+
    fact_Rank1[32],
1019-
    fact_Rank2[32],
1019+
    fact_Rank2[32],
1020-
    fact_Rank3[32],
1020+
    fact_Rank3[32],
1021-
    fact_Rank4[32],
1021+
    fact_Rank4[32],
1022-
    fact_Rank5[32],
1022+
    fact_Rank5[32],
1023-
    fact_Rank6[32],
1023+
    fact_Rank6[32],
1024-
    fact_Rank7[32],
1024+
    fact_Rank7[32],
1025-
    fact_Rank8[32],
1025+
    fact_Rank8[32],
1026-
    fact_Rank9[32],
1026+
    fact_Rank9[32],
1027-
    fact_Rank10[32]
1027+
    fact_Rank10[32]
1028
}
1029-
enum FACTION_INFO
1029+
enum FACTION_INFO
1030-
{
1030+
{
1031-
	fact_Name[32],
1031+
	fact_Name[32],
1032-
	fact_Type,
1032+
	fact_Type,
1033-
	Float:fact_Pos[3],
1033+
	Float:fact_Pos[3],
1034-
    fact_Ranks[FACTION_RANK_INFO]
1034+
    fact_Ranks[FACTION_RANK_INFO]
1035
}
1036-
new gFactionInfo[MAX_FACTIONS][FACTION_INFO];
1036+
new gFactionInfo[MAX_FACTIONS][FACTION_INFO];
1037-
1037+
1038-
forward Faction_LoadAll();
1038+
forward Faction_LoadAll();
1039-
	forward r@Faction_LoadAll();
1039+
	forward r@Faction_LoadAll();
1040-
1040+
1041-
public Faction_LoadAll()
1041+
public Faction_LoadAll()
1042-
	return mysql_function_query(g_dbConnection, "SELECT * FROM `faction_info`", true, "r@Faction_LoadAll", "");
1042+
	return mysql_function_query(g_dbConnection, "SELECT * FROM `faction_info`", true, "r@Faction_LoadAll", "");
1043-
public r@Faction_LoadAll()
1043+
public r@Faction_LoadAll()
1044-
{
1044+
{
1045-
	new rows, fields;
1045+
	new rows, fields;
1046-
	cache_get_data(rows, fields, g_dbConnection);
1046+
	cache_get_data(rows, fields, g_dbConnection);
1047-
1047+
1048-
	new index = -1;
1048+
	new index = -1;
1049-
	while(++index < rows)
1049+
	while(++index < rows)
1050-
	{
1050+
	{
1051-
		new buffer[32], id;
1051+
		new buffer[32], id;
1052-
1052+
1053-
		cache_get_field_content(index, "id", buffer, g_dbConnection);
1053+
		cache_get_field_content(index, "id", buffer, g_dbConnection);
1054-
		id = strval(buffer);
1054+
		id = strval(buffer);
1055-
1055+
1056-
		if((id + 1) >= MAX_FACTIONS)
1056+
		if((id + 1) >= MAX_FACTIONS)
1057-
			continue;
1057+
			continue;
1058-
1058+
1059-
		cache_get_field_content(index, "name", gFactionInfo[id][fact_Name], g_dbConnection);
1059+
		cache_get_field_content(index, "name", gFactionInfo[id][fact_Name], g_dbConnection);
1060-
		cache_get_field_content(index, "type", buffer, g_dbConnection);
1060+
		cache_get_field_content(index, "type", buffer, g_dbConnection);
1061-
		gFactionInfo[id][fact_Type] = strval(buffer);
1061+
		gFactionInfo[id][fact_Type] = strval(buffer);
1062-
1062+
1063-
		cache_get_field_content(index, "x", buffer, g_dbConnection);
1063+
		cache_get_field_content(index, "x", buffer, g_dbConnection);
1064-
		gFactionInfo[id][fact_Pos][0] = floatstr(buffer);
1064+
		gFactionInfo[id][fact_Pos][0] = floatstr(buffer);
1065-
		cache_get_field_content(index, "y", buffer, g_dbConnection);
1065+
		cache_get_field_content(index, "y", buffer, g_dbConnection);
1066-
		gFactionInfo[id][fact_Pos][1] = floatstr(buffer);
1066+
		gFactionInfo[id][fact_Pos][1] = floatstr(buffer);
1067-
		cache_get_field_content(index, "z", buffer, g_dbConnection);
1067+
		cache_get_field_content(index, "z", buffer, g_dbConnection);
1068-
		gFactionInfo[id][fact_Pos][2] = floatstr(buffer);
1068+
		gFactionInfo[id][fact_Pos][2] = floatstr(buffer);
1069-
1069+
1070-
        cache_get_field_content(index, "rank1", gFactionInfo[id][fact_Ranks][fact_Rank1], g_dbConnection);
1070+
        cache_get_field_content(index, "rank1", gFactionInfo[id][fact_Ranks][fact_Rank1], g_dbConnection);
1071-
        cache_get_field_content(index, "rank2", gFactionInfo[id][fact_Ranks][fact_Rank2], g_dbConnection);
1071+
        cache_get_field_content(index, "rank2", gFactionInfo[id][fact_Ranks][fact_Rank2], g_dbConnection);
1072-
        cache_get_field_content(index, "rank3", gFactionInfo[id][fact_Ranks][fact_Rank3], g_dbConnection);
1072+
        cache_get_field_content(index, "rank3", gFactionInfo[id][fact_Ranks][fact_Rank3], g_dbConnection);
1073-
        cache_get_field_content(index, "rank4", gFactionInfo[id][fact_Ranks][fact_Rank4], g_dbConnection);
1073+
        cache_get_field_content(index, "rank4", gFactionInfo[id][fact_Ranks][fact_Rank4], g_dbConnection);
1074-
        cache_get_field_content(index, "rank5", gFactionInfo[id][fact_Ranks][fact_Rank5], g_dbConnection);
1074+
        cache_get_field_content(index, "rank5", gFactionInfo[id][fact_Ranks][fact_Rank5], g_dbConnection);
1075-
        cache_get_field_content(index, "rank6", gFactionInfo[id][fact_Ranks][fact_Rank6], g_dbConnection);
1075+
        cache_get_field_content(index, "rank6", gFactionInfo[id][fact_Ranks][fact_Rank6], g_dbConnection);
1076-
        cache_get_field_content(index, "rank7", gFactionInfo[id][fact_Ranks][fact_Rank7], g_dbConnection);
1076+
        cache_get_field_content(index, "rank7", gFactionInfo[id][fact_Ranks][fact_Rank7], g_dbConnection);
1077-
        cache_get_field_content(index, "rank8", gFactionInfo[id][fact_Ranks][fact_Rank8], g_dbConnection);
1077+
        cache_get_field_content(index, "rank8", gFactionInfo[id][fact_Ranks][fact_Rank8], g_dbConnection);
1078-
        cache_get_field_content(index, "rank9", gFactionInfo[id][fact_Ranks][fact_Rank9], g_dbConnection);
1078+
        cache_get_field_content(index, "rank9", gFactionInfo[id][fact_Ranks][fact_Rank9], g_dbConnection);
1079-
        cache_get_field_content(index, "rank10", gFactionInfo[id][fact_Ranks][fact_Rank10], g_dbConnection);
1079+
        cache_get_field_content(index, "rank10", gFactionInfo[id][fact_Ranks][fact_Rank10], g_dbConnection);
1080-
	}
1080+
	}
1081-
	return 1;
1081+
	return 1;
1082
}
1083-
1083+
1084-
CMD:faction(playerid, params[])
1084+
CMD:faction(playerid, params[])
1085-
    cmd_faccao(playerid, params);
1085+
    cmd_faccao(playerid, params);
1086-
CMD:faccao(playerid, params[])
1086+
CMD:faccao(playerid, params[])
1087-
{
1087+
{
1088-
    if(gPlayerInfo[playerid][gPlayerStat] < PLAYER_STAT_PLAYING)
1088+
    if(gPlayerInfo[playerid][gPlayerStat] < PLAYER_STAT_PLAYING)
1089-
        return 1;
1089+
        return 1;
1090-
    if(gPlayerInfo[playerid][gPlayerFamily] == 0)
1090+
    if(gPlayerInfo[playerid][gPlayerFamily] == 0)
1091-
        return 1;
1091+
        return 1;
1092-
1092+
1093-
    SendClientMessage(playerid, 0xC0C0C0AA, "Membros Conectados:");
1093+
    SendClientMessage(playerid, 0xC0C0C0AA, "Membros Conectados:");
1094-
    new index = -1, buffer[64];
1094+
    new index = -1, buffer[64];
1095-
    while(++index < MAX_PLAYERS)
1095+
    while(++index < MAX_PLAYERS)
1096-
        if(gPlayerInfo[index][gPlayerStat] >= PLAYER_STAT_PLAYING)
1096+
        if(gPlayerInfo[index][gPlayerStat] >= PLAYER_STAT_PLAYING)
1097-
            if(gPlayerInfo[playerid][gPlayerFamily] == gPlayerInfo[index][gPlayerFamily])
1097+
            if(gPlayerInfo[playerid][gPlayerFamily] == gPlayerInfo[index][gPlayerFamily])
1098-
            {
1098+
            {
1099-
                //new realrank = gPlayerInfo[index][gPlayerFamilyRank] - 1;
1099+
                //new realrank = gPlayerInfo[index][gPlayerFamilyRank] - 1;
1100-
                format(buffer, sizeof buffer, "(ID: %d) {C0C0C0}%s %s.",
1100+
                format(buffer, sizeof buffer, "(ID: %d) {C0C0C0}%s %s.",
1101-
                    index,
1101+
                    index,
1102-
                    gPlayerInfo[index][gPlayerName],
1102+
                    gPlayerInfo[index][gPlayerName],
1103-
                    GetPlayerRank(playerid)
1103+
                    GetPlayerRank(playerid)
1104-
                );
1104+
                );
1105-
                SendClientMessage(playerid, 0x008000AA, buffer);
1105+
                SendClientMessage(playerid, 0x008000AA, buffer);
1106-
            }
1106+
            }
1107-
    return 1;
1107+
    return 1;
1108
}
1109-
1109+
1110-
CMD:f(playerid, params[])
1110+
CMD:f(playerid, params[])
1111-
{
1111+
{
1112-
    if(gPlayerInfo[playerid][gPlayerStat] < PLAYER_STAT_PLAYING)
1112+
    if(gPlayerInfo[playerid][gPlayerStat] < PLAYER_STAT_PLAYING)
1113-
        return 1;
1113+
        return 1;
1114-
    if(gPlayerInfo[playerid][gPlayerFamily] == 0)
1114+
    if(gPlayerInfo[playerid][gPlayerFamily] == 0)
1115-
        return 1;
1115+
        return 1;
1116-
    if(!params[0])
1116+
    if(!params[0])
1117-
    {
1117+
    {
1118-
        SendClientMessage(playerid, 0x00CAC5AA,
1118+
        SendClientMessage(playerid, 0x00CAC5AA,
1119-
            "FamilyCmd: {FFFFFF}/f(amilia) [texto] {C0C0C0}- Manda uma mensagem para a sua família."
1119+
            "FamilyCmd: {FFFFFF}/f(amilia) [texto] {C0C0C0}- Manda uma mensagem para a sua família."
1120-
        );
1120+
        );
1121-
        return 1;
1121+
        return 1;
1122-
    }
1122+
    }
1123-
1123+
1124-
    format(gstring, sizeof gstring,
1124+
    format(gstring, sizeof gstring,
1125-
        "(( %s %s: {FFFFFF}%s {00CAC5} ))",
1125+
        "(( %s %s: {FFFFFF}%s {00CAC5} ))",
1126-
        GetPlayerRank(playerid),
1126+
        GetPlayerRank(playerid),
1127-
        gPlayerInfo[playerid][gPlayerName],
1127+
        gPlayerInfo[playerid][gPlayerName],
1128-
        params
1128+
        params
1129-
    );
1129+
    );
1130-
1130+
1131-
    new index = -1;
1131+
    new index = -1;
1132-
    while(++index < MAX_PLAYERS)
1132+
    while(++index < MAX_PLAYERS)
1133-
    {
1133+
    {
1134-
        if(gPlayerInfo[index][gPlayerFamily] == gPlayerInfo[playerid][gPlayerFamily])
1134+
        if(gPlayerInfo[index][gPlayerFamily] == gPlayerInfo[playerid][gPlayerFamily])
1135-
            SendClientMessage(playerid, 0x00CAC5FF, gstring);
1135+
            SendClientMessage(playerid, 0x00CAC5FF, gstring);
1136-
    }
1136+
    }
1137-
    return 1;
1137+
    return 1;
1138
}
1139-
GetPlayerRank(playerid)
1139+
GetPlayerRank(playerid)
1140-
{
1140+
{
1141-
    new
1141+
    new
1142-
        rank[32] = "Civil",
1142+
        rank[32] = "Civil",
1143-
        pr       = gPlayerInfo[playerid][gPlayerFamilyRank];
1143+
        pr       = gPlayerInfo[playerid][gPlayerFamilyRank];
1144-
    if(!gPlayerInfo[playerid][gPlayerFamily])
1144+
    if(!gPlayerInfo[playerid][gPlayerFamily])
1145-
        return rank;
1145+
        return rank;
1146-
    if(!(0 < pr < 16))
1146+
    if(!(0 < pr < 16))
1147-
        return rank;
1147+
        return rank;
1148-
1148+
1149-
    pr -= 1;
1149+
    pr -= 1;
1150-
1150+
1151-
    format(rank, 32, "%s",
1151+
    format(rank, 32, "%s",
1152-
        gFactionInfo[gPlayerInfo[playerid][gPlayerFamily]][fact_Ranks][FACTION_RANK_INFO:pr]);
1152+
        gFactionInfo[gPlayerInfo[playerid][gPlayerFamily]][fact_Ranks][FACTION_RANK_INFO:pr]);
1153-
    return rank;
1153+
    return rank;
1154
}
1155-
1155+
1156-
//
1156+
//
1157-
//
1157+
//
1158-
// Admin System
1158+
// Admin System
1159-
//
1159+
//
1160-
//
1160+
//
1161-
forward r@Admin_Ban(playerid, targetid, days, reason[]);
1161+
forward r@Admin_Ban(playerid, targetid, days, reason[]);
1162-
CMD:ban(playerid, params[])
1162+
CMD:ban(playerid, params[])
1163-
{
1163+
{
1164-
    if(!Player_IsAdmin(playerid))
1164+
    if(!Player_IsAdmin(playerid))
1165-
        return 0;
1165+
        return 0;
1166-
1166+
1167-
    new targetid,
1167+
    new targetid,
1168-
        reason[120],
1168+
        reason[120],
1169-
        days;
1169+
        days;
1170-
1170+
1171-
    if(sscanf(params, "rs[120]I(-1)", targetid, reason, days))
1171+
    if(sscanf(params, "rs[120]I(-1)", targetid, reason, days))
1172-
    {
1172+
    {
1173-
        SendClientMessage(playerid, 0xFF6F6FAA, "AdmCmd: {FFFFFF}/ban [playerid] [motivo] [dias (= -1)] -{C0C0C0} Bane um player.");
1173+
        SendClientMessage(playerid, 0xFF6F6FAA, "AdmCmd: {FFFFFF}/ban [playerid] [motivo] [dias (= -1)] -{C0C0C0} Bane um player.");
1174-
        SendClientMessage(playerid, 0xC0C0C0FF, "          Para banir um jogador temporariamente, digite os dias. Para banir permanentemente, digite \"-1\" ou deixe em branco.");
1174+
        SendClientMessage(playerid, 0xC0C0C0FF, "          Para banir um jogador temporariamente, digite os dias. Para banir permanentemente, digite \"-1\" ou deixe em branco.");
1175-
        return 1;
1175+
        return 1;
1176-
    }
1176+
    }
1177-
1177+
1178-
    if(gPlayerInfo[playerid][gPlayerStat] < PLAYER_STAT_PLAYING)
1178+
    if(gPlayerInfo[playerid][gPlayerStat] < PLAYER_STAT_PLAYING)
1179-
        return SendClientMessage(playerid, 0xFF6F6FAA, "AdmCmd: {FFFFFF}/ban {C0C0C0}- O player não está logado!");
1179+
        return SendClientMessage(playerid, 0xFF6F6FAA, "AdmCmd: {FFFFFF}/ban {C0C0C0}- O player não está logado!");
1180-
1180+
1181-
    if(Player_IsAdmin(targetid))
1181+
    if(Player_IsAdmin(targetid))
1182-
    {
1182+
    {
1183-
        if(!(gPlayerInfo[playerid][gPlayerAttributes] & PLAYER_ATTRIB_LEAD_ADMIN))
1183+
        if(!(gPlayerInfo[playerid][gPlayerAttributes] & PLAYER_ATTRIB_LEAD_ADMIN))
1184-
        {
1184+
        {
1185-
            SendClientMessage(playerid, 0xFF6F6FAA, "AdmCmd: {FFFFFF}/ban {C0C0C0}- Bans em admins só podem ser adicionados por Lead-Admins!");
1185+
            SendClientMessage(playerid, 0xFF6F6FAA, "AdmCmd: {FFFFFF}/ban {C0C0C0}- Bans em admins só podem ser adicionados por Lead-Admins!");
1186-
            return 1;
1186+
            return 1;
1187-
        }
1187+
        }
1188-
    }
1188+
    }
1189-
1189+
1190-
    format(gstring, sizeof gstring,
1190+
    format(gstring, sizeof gstring,
1191-
        "INSERT INTO `record_info` (`pid`,`type`,`stamp`,`reason`,`time`,`admin`) VALUES(%d,%d,UNIX_TIMESTAMP(),'%s',%d,%d)",
1191+
        "INSERT INTO `record_info` (`pid`,`type`,`stamp`,`reason`,`time`,`admin`) VALUES(%d,%d,UNIX_TIMESTAMP(),'%s',%d,%d)",
1192-
        gPlayerInfo[targetid][gPlayerID], RECORD_TYPE_BAN, reason, days * 24 * 60 * 60, gPlayerInfo[playerid][gPlayerID]);
1192+
        gPlayerInfo[targetid][gPlayerID], RECORD_TYPE_BAN, reason, days * 24 * 60 * 60, gPlayerInfo[playerid][gPlayerID]);
1193-
    mysql_function_query(g_dbConnection, gstring, false, "r@Admin_Ban", "iiis", playerid, targetid, days, reason);
1193+
    mysql_function_query(g_dbConnection, gstring, false, "r@Admin_Ban", "iiis", playerid, targetid, days, reason);
1194-
    SendClientMessage(playerid, -1, "Processndo, aguarde...");
1194+
    SendClientMessage(playerid, -1, "Processndo, aguarde...");
1195-
    return 1;
1195+
    return 1;
1196
}
1197-
public r@Admin_Ban(playerid, targetid, days, reason[])
1197+
public r@Admin_Ban(playerid, targetid, days, reason[])
1198-
{
1198+
{
1199-
    mysql_store_result(g_dbConnection); new id = mysql_insert_id(g_dbConnection); mysql_free_result(g_dbConnection);
1199+
    mysql_store_result(g_dbConnection); new id = mysql_insert_id(g_dbConnection); mysql_free_result(g_dbConnection);
1200-
    if(days != -1)
1200+
    if(days != -1)
1201-
        format(gstring, sizeof gstring, "AdmCmd: %s foi banido por %s. Motivo: %s", gPlayerInfo[targetid][gPlayerName], gPlayerInfo[playerid][gPlayerName], reason);
1201+
        format(gstring, sizeof gstring, "AdmCmd: %s foi banido por %s. Motivo: %s", gPlayerInfo[targetid][gPlayerName], gPlayerInfo[playerid][gPlayerName], reason);
1202-
    else
1202+
    else
1203-
        format(gstring, sizeof gstring, "AdmCmd: %s foi banido temporariamente por %s. Motivo: %s", gPlayerInfo[targetid][gPlayerName], gPlayerInfo[playerid][gPlayerName], reason);
1203+
        format(gstring, sizeof gstring, "AdmCmd: %s foi banido temporariamente por %s. Motivo: %s", gPlayerInfo[targetid][gPlayerName], gPlayerInfo[playerid][gPlayerName], reason);
1204-
    SendClientMessageToAll(0xFF6F6FAA, gstring);
1204+
    SendClientMessageToAll(0xFF6F6FAA, gstring);
1205-
1205+
1206-
    format(gstring, sizeof gstring,
1206+
    format(gstring, sizeof gstring,
1207-
        "Você adicionou com sucesso um ban a %s (PID:%d) - Para consultas futuras, a ID do ban é: {C0C0C0}%d.",
1207+
        "Você adicionou com sucesso um ban a %s (PID:%d) - Para consultas futuras, a ID do ban é: {C0C0C0}%d.",
1208-
        gPlayerInfo[playerid][gPlayerName], gPlayerInfo[playerid][gPlayerID], id);
1208+
        gPlayerInfo[playerid][gPlayerName], gPlayerInfo[playerid][gPlayerID], id);
1209-
    SendClientMessage(playerid, -1, gstring);
1209+
    SendClientMessage(playerid, -1, gstring);
1210-
1210+
1211-
    Kick(targetid);
1211+
    Kick(targetid);
1212-
1212+
1213-
    return 1;
1213+
    return 1;
1214
}
1215-
1215+
1216-
1216+
1217-
1217+
1218-
1218+
1219-
//
1219+
//
1220-
//
1220+
//
1221-
// Local Functions
1221+
// Local Functions
1222-
//
1222+
//
1223-
#define prquick%0(%1) forward%0(%1);public%0(%1)
1223+
#define prquick%0(%1) forward%0(%1);public%0(%1)
1224-
Property_DisplayData(playerid, propertyid)
1224+
Property_DisplayData(playerid, propertyid)
1225-
{
1225+
{
1226-
	if(!gPropertyInfo[propertyid][prop_Loaded])
1226+
	if(!gPropertyInfo[propertyid][prop_Loaded])
1227-
		return SendClientMessage(playerid, -1, "{44436E}DEV_ERR: {FFFFFF}Propriedade não-carregada.");
1227+
		return SendClientMessage(playerid, -1, "{44436E}DEV_ERR: {FFFFFF}Propriedade não-carregada.");
1228-
	
1228+
	
1229-
	#define _prp gPropertyInfo[propertyid]
1229+
	#define _prp gPropertyInfo[propertyid]
1230-
	format(gstring, sizeof gstring, "PROPRIEDADE: %d [Nome: %s] | Dono: (PID)%d | Type: %d | Level: %d | Preço: %d",
1230+
	format(gstring, sizeof gstring, "PROPRIEDADE: %d [Nome: %s] | Dono: (PID)%d | Type: %d | Level: %d | Preço: %d",
1231-
		propertyid, _prp[prop_Name], _prp[prop_Owner], _prp[prop_Type], _prp[prop_Level], _prp[prop_Price]);
1231+
		propertyid, _prp[prop_Name], _prp[prop_Owner], _prp[prop_Type], _prp[prop_Level], _prp[prop_Price]);
1232-
	SendClientMessage(playerid, 0x9F9DD1FF, gstring);
1232+
	SendClientMessage(playerid, 0x9F9DD1FF, gstring);
1233-
	format(gstring, sizeof gstring, " -- ATRIBUTOS: Ativa: %d | Comprável: %d | Vendivel: %d | Entrável: %d | Saível: %d",
1233+
	format(gstring, sizeof gstring, " -- ATRIBUTOS: Ativa: %d | Comprável: %d | Vendivel: %d | Entrável: %d | Saível: %d",
1234-
		_prp[prop_Attrib]&PROPERTY_ATTRIB_ACTIVE,
1234+
		_prp[prop_Attrib]&PROPERTY_ATTRIB_ACTIVE,
1235-
		_prp[prop_Attrib]&PROPERTY_ATTRIB_BUYABLE,
1235+
		_prp[prop_Attrib]&PROPERTY_ATTRIB_BUYABLE,
1236-
		_prp[prop_Attrib]&PROPERTY_ATTRIB_SELLABLE,
1236+
		_prp[prop_Attrib]&PROPERTY_ATTRIB_SELLABLE,
1237-
		_prp[prop_Attrib]&PROPERTY_ATTRIB_ENTERABLE, 
1237+
		_prp[prop_Attrib]&PROPERTY_ATTRIB_ENTERABLE, 
1238-
		_prp[prop_Attrib]&PROPERTY_ATTRIB_EXITABLE);
1238+
		_prp[prop_Attrib]&PROPERTY_ATTRIB_EXITABLE);
1239-
	SendClientMessage(playerid, 0x9F9DD1FF, gstring);
1239+
	SendClientMessage(playerid, 0x9F9DD1FF, gstring);
1240-
	#undef _prp
1240+
	#undef _prp
1241-
	return 1;
1241+
	return 1;
1242
}
1243-
Property_SendDoorMessage(playerid, propertyid)
1243+
Property_SendDoorMessage(playerid, propertyid)
1244-
{
1244+
{
1245-
	if(gPropertyInfo[propertyid][prop_Attrib] & PROPERTY_ATTRIB_STATIC)
1245+
	if(gPropertyInfo[propertyid][prop_Attrib] & PROPERTY_ATTRIB_STATIC)
1246-
	{
1246+
	{
1247-
		//Property_SendDoorMessage_s(playerid, propertyid, gFactionInfo[gPropertyInfo[propertyid][prop_Owner]][fact_Name]);
1247+
		//Property_SendDoorMessage_s(playerid, propertyid, gFactionInfo[gPropertyInfo[propertyid][prop_Owner]][fact_Name]);
1248-
	}
1248+
	}
1249-
	else
1249+
	else
1250-
	{
1250+
	{
1251-
		format(gstring, sizeof gstring, "SELECT `name` FROM `player_info` WHERE `id`=%d", gPlayerInfo[playerid][gPlayerID]);
1251+
		format(gstring, sizeof gstring, "SELECT `name` FROM `player_info` WHERE `id`=%d", gPlayerInfo[playerid][gPlayerID]);
1252-
		mysql_function_query(g_dbConnection, gstring, true, "r@Property_SendDoorMessage", "ii", playerid, propertyid);
1252+
		mysql_function_query(g_dbConnection, gstring, true, "r@Property_SendDoorMessage", "ii", playerid, propertyid);
1253-
	}
1253+
	}
1254-
	return 1;
1254+
	return 1;
1255
}
1256-
1256+
1257-
prquick r@Property_SendDoorMessage(playerid, propertyid)
1257+
prquick r@Property_SendDoorMessage(playerid, propertyid)
1258-
{
1258+
{
1259-
	new buff[32];
1259+
	new buff[32];
1260-
	cache_get_field_content(0, "name", buff, g_dbConnection);
1260+
	cache_get_field_content(0, "name", buff, g_dbConnection);
1261-
	Property_SendDoorMessage_s(playerid, propertyid, buff);
1261+
	Property_SendDoorMessage_s(playerid, propertyid, buff);
1262-
	return 1;
1262+
	return 1;
1263
}
1264-
1264+
1265-
Property_SendDoorMessage_s(playerid, propertyid, owner[])
1265+
Property_SendDoorMessage_s(playerid, propertyid, owner[])
1266-
{
1266+
{
1267-
	format(gstring, sizeof gstring, "Bem-vindo {FFEA00}%s{FFFFFF} de {D6D6D6}%s{FFFFFF}", Property_GetTypeName(gPropertyInfo[propertyid][prop_Type]), owner);
1267+
	format(gstring, sizeof gstring, "Bem-vindo {FFEA00}%s{FFFFFF} de {D6D6D6}%s{FFFFFF}", Property_GetTypeName(gPropertyInfo[propertyid][prop_Type]), owner);
1268-
	SendClientMessage(playerid, -1, gstring);
1268+
	SendClientMessage(playerid, -1, gstring);
1269-
	SendClientMessage(playerid, -1, "     Digite {2DD2F7}/entrar{FFFFFF} ou pressione {2DD2F7}~k~~VEHICLE_ENTER_EXIT~{FFFFFF} para entrar.");
1269+
	SendClientMessage(playerid, -1, "     Digite {2DD2F7}/entrar{FFFFFF} ou pressione {2DD2F7}~k~~VEHICLE_ENTER_EXIT~{FFFFFF} para entrar.");
1270-
	return 1;
1270+
	return 1;
1271
}
1272-
1272+
1273-
Property_GetTypeName(propertytype)
1273+
Property_GetTypeName(propertytype)
1274-
{
1274+
{
1275-
	new buff[32];
1275+
	new buff[32];
1276-
	switch(propertytype) {
1276+
	switch(propertytype) {
1277-
		case PROPERTY_TYPE_INT:
1277+
		case PROPERTY_TYPE_INT:
1278-
			format(buff, sizeof buff, "ao lugar");
1278+
			format(buff, sizeof buff, "ao lugar");
1279-
		case PROPERTY_TYPE_HOUSE:
1279+
		case PROPERTY_TYPE_HOUSE:
1280-
			format(buff, sizeof buff, "à casa");
1280+
			format(buff, sizeof buff, "à casa");
1281-
		default:
1281+
		default:
1282-
			format(buff, sizeof buff, "PREGUIÇA E FODA");
1282+
			format(buff, sizeof buff, "PREGUIÇA E FODA");
1283-
	}
1283+
	}
1284-
	return buff;
1284+
	return buff;
1285
}
1286-
1286+
1287-
//
1287+
//
1288-
//
1288+
//
1289-
//
1289+
//
1290-
// Local Functions/Stocks
1290+
// Local Functions/Stocks
1291-
//
1291+
//
1292-
//
1292+
//
1293-
1293+
1294-
//
1294+
//
1295-
// Admins:
1295+
// Admins:
1296-
Player_IsAdmin(playerid)
1296+
Player_IsAdmin(playerid)
1297-
{
1297+
{
1298-
	if(gPlayerInfo[playerid][gPlayerStat] >= PLAYER_STAT_PLAYING)
1298+
	if(gPlayerInfo[playerid][gPlayerStat] >= PLAYER_STAT_PLAYING)
1299-
	{	
1299+
	{	
1300-
		return (gPlayerInfo[playerid][gPlayerAttributes] & PLAYER_ATTRIB_ADMIM) || (gPlayerInfo[playerid][gPlayerAttributes] & PLAYER_ATTRIB_DEV) || (gPlayerInfo[playerid][gPlayerAttributes] & PLAYER_ATTRIB_LEAD_ADMIN) || (gPlayerInfo[playerid][gPlayerAttributes] & PLAYER_ATTRIB_SEMI_ADMIN);
1300+
		return (gPlayerInfo[playerid][gPlayerAttributes] & PLAYER_ATTRIB_ADMIM) || (gPlayerInfo[playerid][gPlayerAttributes] & PLAYER_ATTRIB_DEV) || (gPlayerInfo[playerid][gPlayerAttributes] & PLAYER_ATTRIB_LEAD_ADMIN) || (gPlayerInfo[playerid][gPlayerAttributes] & PLAYER_ATTRIB_SEMI_ADMIN);
1301-
	}
1301+
	}
1302-
	return 0;
1302+
	return 0;
1303
}
1304-
1304+
1305-
// Y_Less / // // // /
1305+
// Y_Less / // // // /
1306-
SendClientMessageFormatted(playerid, color, fstring[], {Float, _}:...)
1306+
SendClientMessageFormatted(playerid, color, fstring[], {Float, _}:...)
1307-
{
1307+
{
1308-
  new n = numargs() * 4;
1308+
  new n = numargs() * 4;
1309-
1309+
1310-
  if (n == 3 * 4)
1310+
  if (n == 3 * 4)
1311-
  {
1311+
  {
1312-
        return SendClientMessage(playerid, color, fstring);
1312+
        return SendClientMessage(playerid, color, fstring);
1313-
  }
1313+
  }
1314-
  else
1314+
  else
1315-
  {
1315+
  {
1316-
        new message[128];
1316+
        new message[128];
1317-
        new arg_start;
1317+
        new arg_start;
1318-
        new arg_end;
1318+
        new arg_end;
1319-
        new i = 0;
1319+
        new i = 0;
1320-
1320+
1321-
        #emit CONST.pri  fstring
1321+
        #emit CONST.pri  fstring
1322-
        #emit ADD.C    0x4
1322+
        #emit ADD.C    0x4
1323-
        #emit STOR.S.pri arg_start // first parameters's offset
1323+
        #emit STOR.S.pri arg_start // first parameters's offset
1324-
1324+
1325-
        #emit LOAD.S.pri n
1325+
        #emit LOAD.S.pri n
1326-
        #emit ADD.C    0x8
1326+
        #emit ADD.C    0x8
1327-
        #emit STOR.S.pri arg_end  // last parameters's offset
1327+
        #emit STOR.S.pri arg_end  // last parameters's offset
1328-
1328+
1329-
        // pushing variable arguments
1329+
        // pushing variable arguments
1330-
        for (i = arg_end; i >= arg_start; i -= 4)
1330+
        for (i = arg_end; i >= arg_start; i -= 4)
1331-
        {
1331+
        {
1332-
            #emit LCTRL    5
1332+
            #emit LCTRL    5
1333-
            #emit LOAD.S.alt i
1333+
            #emit LOAD.S.alt i
1334-
            #emit ADD
1334+
            #emit ADD
1335-
            #emit LOAD.I
1335+
            #emit LOAD.I
1336-
            #emit PUSH.pri
1336+
            #emit PUSH.pri
1337-
        }
1337+
        }
1338-
        // pushing normal arguments
1338+
        // pushing normal arguments
1339-
        #emit PUSH.S  fstring // format string
1339+
        #emit PUSH.S  fstring // format string
1340-
        #emit PUSH.C  128   // sizeof(message)
1340+
        #emit PUSH.C  128   // sizeof(message)
1341-
        #emit PUSH.ADR message // the string which format() will write in
1341+
        #emit PUSH.ADR message // the string which format() will write in
1342-
        #emit PUSH.S  n    // number of arguments * 4, always must be passed for natives
1342+
        #emit PUSH.S  n    // number of arguments * 4, always must be passed for natives
1343-
        #emit SYSREQ.C format
1343+
        #emit SYSREQ.C format
1344-
1344+
1345-
        // clearing the stack
1345+
        // clearing the stack
1346-
        i = n / 4 + 1;
1346+
        i = n / 4 + 1;
1347-
        while (--i >= 0)
1347+
        while (--i >= 0)
1348-
        {
1348+
        {
1349-
            #emit STACK 0x4
1349+
            #emit STACK 0x4
1350-
        }
1350+
        }
1351-
1351+
1352-
        return SendClientMessage(playerid, color, message);
1352+
        return SendClientMessage(playerid, color, message);
1353-
  }
1353+
  }
1354
}