12.05.2012, 20:12
(
Last edited by Jake_Dunlapp; 13/05/2012 at 04:36 PM.
)
Descriзгo:Gamemode Base Para Estudos,Posso Garantir Que Й Uma Boa Base
Atualizado V2.1
pawn Code:
//##########################//
//#Gamemode By Lucas Rawr #//
//# Tdm Max #//
//##########################//
#include a_samp
#include zcmd
#include sscanf
#include dini
#define AZUL 0x0000FFAA
#define VERMELHO 0xFF0000AA
#define AMARELO 0xFFFF00AA
#define LARANJA 0xFF6A00AA
#define VERDE 0x00FF00AA
#define CASTANHO 0x855600AA
#define CINZENTO 0x9E9E9EAA
#define ROSA 0xFF00FFAA
#define PRETO 0x000000AA
#define BRANCO 0xFFFFFFAA
#define REGISTRO 1
#define LOGIN 2
#define CONTAS "Players/%s.ini"
new Matou[MAX_PLAYERS];
new Morreu[MAX_PLAYERS];
new Logou[MAX_PLAYERS];
new alerta[256];
forward menssagem1(playerid);
forward menssagem2(playerid);
forward menssagem3(playerid);
forward menssagem4(playerid);
native PlayAudioStreamForPlayer(playerid, url[]);
native StopAudioStreamForPlayer(playerid);
main()
{
print("\n----------------------------------");
print(" TDM MAX ");
print("----------------------------------\n");
}
/*===============================================================================================================*/
public OnGameModeInit()
{
//[CONFIGS]
SetGameModeText("TDM MAX");
SendRconCommand("hostname TDM MAX V2");
SendRconCommand("mapname LS/LV/SF");
SendRconCommand("website http://forum.sa-mp.com");
//Times
AddPlayerClass(285, -1615.7268,686.2352,7.1875, 269.1425, 0, 0, 0, 0, 0, 0);//Swat
AddPlayerClass(104, -1818.8645,-183.8867,9.3984, 269.1425, 0, 0, 0, 0, 0, 0);//Ballas 1
AddPlayerClass(102,-1818.8645,-183.8867,9.3984,354.6368,0,0,0,0,0,0);//Ballas 2
AddPlayerClass(103,-1818.8645,-183.8867,9.3984,354.6368,0,0,0,0,0,0);//Ballas 3
AddPlayerClass(261,-1676.8533,426.2572,7.1797,226.6179,0,0,0,0,0,0);//Caminhoneiro 1
AddPlayerClass(206,-1676.8533,426.2572,7.1797,226.6179,0,0,0,0,0,0);//Caminhoneiro 2
AddPlayerClass(107,2491.3367,-1668.5125,13.3438,73.6107,0,0,0,0,0,0);//Groove 1
AddPlayerClass(105,2491.3367,-1668.5125,13.3438,73.6107,0,0,0,0,0,0);//Groove 2
AddPlayerClass(106,2491.3367,-1668.5125,13.3438,73.6107,0,0,0,0,0,0);//Groove 3
AddPlayerClass(66,2787.6633,-1610.8257,10.9219,322.3763,0,0,0,0,0,0);//Drifter 1
AddPlayerClass(29,2787.6633,-1610.8257,10.9219,322.3763,0,0,0,0,0,0);//Drifter 2
AddPlayerClass(108,2829.5027,-1183.8802,24.8454,274.4592,0,0,0,0,0,0);//Vagos 1
AddPlayerClass(109,2829.5027,-1183.8802,24.8454,274.4592,0,0,0,0,0,0);//Vagos 2
AddPlayerClass(110,2829.5027,-1183.8802,24.8454,274.4592,0,0,0,0,0,0);//Vagos 3
AddPlayerClass(253,1807.9846,-1691.1407,13.5444,156.0180,0,0,0,0,0,0);//Taxi 1
AddPlayerClass(255,1807.9846,-1691.1407,13.5444,156.0180,0,0,0,0,0,0);//Taxi 2
//Carros E Objetos//
//Aqui Em Baixo Ficara Carros De Times E Objetos//
AddStaticVehicleEx(405,2498.39990234,-1679.90002441,13.39999962,0.00000000,44,1,15); //Sentinel
AddStaticVehicleEx(405,2492.10009766,-1680.50000000,13.30000019,0.00000000,44,1,15); //Sentinel
AddStaticVehicleEx(405,2488.80004883,-1680.50000000,13.30000019,0.00000000,44,1,15); //Sentinel
AddStaticVehicleEx(522,2486.00000000,-1680.00000000,13.00000000,0.00000000,44,44,15); //NRG-500
AddStaticVehicleEx(522,2484.89990234,-1680.00000000,13.00000000,0.00000000,44,44,15); //NRG-500
AddStaticVehicleEx(522,2483.89990234,-1680.00000000,13.00000000,0.00000000,44,44,15); //NRG-500
AddStaticVehicleEx(411,2482.00000000,-1680.69995117,13.10000038,0.00000000,44,1,15); //Infernus
AddStaticVehicleEx(405,2796.80004883,-1580.30004883,10.89999962,272.00000000,1,1,15); //Sentinel
AddStaticVehicleEx(405,2796.89941406,-1589.09960938,10.89999962,271.99951172,1,1,15); //Sentinel
AddStaticVehicleEx(405,2796.79980469,-1584.69921875,10.89999962,271.99951172,1,1,15); //Sentinel
AddStaticVehicleEx(522,2796.69995117,-1567.40002441,10.60000038,272.00000000,1,1,15); //NRG-500
AddStaticVehicleEx(522,2796.69921875,-1576.00000000,10.60000038,271.99951172,1,1,15); //NRG-500
AddStaticVehicleEx(522,2796.69921875,-1571.59960938,10.60000038,271.99951172,1,1,15); //NRG-500
AddStaticVehicleEx(411,2796.39990234,-1562.80004883,10.69999981,270.00000000,1,1,15); //Infernus
AddStaticVehicleEx(405,2808.50000000,-1180.80004883,25.39999962,270.00000000,6,1,15); //Sentinel
AddStaticVehicleEx(405,2808.39941406,-1186.39941406,25.29999924,270.00000000,6,1,15); //Sentinel
AddStaticVehicleEx(405,2808.50000000,-1183.59960938,25.39999962,270.00000000,6,1,15); //Sentinel
AddStaticVehicleEx(522,2826.00000000,-1196.40002441,24.70000076,0.00000000,6,6,15); //NRG-500
AddStaticVehicleEx(522,2830.79980469,-1196.50000000,24.29999924,0.00000000,6,6,15); //NRG-500
AddStaticVehicleEx(522,2828.39990234,-1196.50000000,24.50000000,0.00000000,6,6,15); //NRG-500
AddStaticVehicleEx(411,2830.60009766,-1180.90002441,24.60000038,6.00000000,6,1,15); //Infernus
AddStaticVehicleEx(597,-1611.90002441,653.50000000,7.09999990,0.00000000,53,-1,15); //Police Car (SFPD)
AddStaticVehicleEx(597,-1621.89941406,653.29980469,7.09999990,0.00000000,53,-1,15); //Police Car (SFPD)
AddStaticVehicleEx(597,-1617.69921875,653.39941406,7.09999990,0.00000000,53,-1,15); //Police Car (SFPD)
AddStaticVehicleEx(523,-1605.09997559,653.50000000,6.80000019,0.00000000,-1,-1,15); //HPV1000
AddStaticVehicleEx(523,-1594.80004883,653.40002441,6.80000019,0.00000000,-1,-1,15); //HPV1000
AddStaticVehicleEx(599,-1590.80004883,653.09997559,7.59999990,0.00000000,-1,53,15); //Police Ranger
AddStaticVehicleEx(403,-1704.09997559,395.10000610,7.90000010,0.00000000,3,1,15); //Linerunner
AddStaticVehicleEx(403,-1694.59997559,395.89999390,7.90000010,0.00000000,3,1,15); //Linerunner
AddStaticVehicleEx(403,-1699.50000000,395.29998779,7.90000010,0.00000000,3,1,15); //Linerunner
AddStaticVehicleEx(403,-1689.90002441,396.29998779,7.90000010,0.00000000,3,1,15); //Linerunner
AddStaticVehicleEx(435,-1657.09997559,438.29998779,7.80000019,230.00000000,3,1,15); //Trailer 1
AddStaticVehicleEx(435,-1654.30004883,442.00000000,7.80000019,229.99877930,3,1,15); //Trailer 1
AddStaticVehicleEx(435,-1660.90002441,434.00000000,7.80000019,229.99877930,3,1,15); //Trailer 1
AddStaticVehicleEx(435,-1650.80004883,446.29998779,7.80000019,229.99877930,3,1,15); //Trailer 1
AddStaticVehicleEx(405,-1821.09997559,-153.89999390,9.39999962,0.00000000,5,1,15); //Sentinel
AddStaticVehicleEx(405,-1824.39941406,-153.69921875,9.39999962,0.00000000,5,1,15); //Sentinel
AddStaticVehicleEx(405,-1817.69995117,-154.00000000,9.39999962,0.00000000,5,1,15); //Sentinel
AddStaticVehicleEx(522,-1829.80004883,-170.60000610,9.00000000,90.00000000,5,1,15); //NRG-500
AddStaticVehicleEx(522,-1829.69921875,-169.29980469,8.89999962,90.00000000,5,1,15); //NRG-500
AddStaticVehicleEx(405,2495.29980469,-1680.29980469,13.30000019,0.00000000,44,1,15); //Sentinel
AddStaticVehicleEx(405,2501.00000000,-1679.69995117,13.39999962,0.00000000,44,1,15); //Sentinel
AddStaticVehicleEx(487,2530.30004883,-1676.80004883,20.20000076,0.00000000,44,1,15); //Maverick
AddStaticVehicleEx(405,2797.10009766,-1593.19995117,10.89999962,271.99951172,1,1,15); //Sentinel
AddStaticVehicleEx(405,2797.10009766,-1597.00000000,10.89999962,271.99951172,1,1,15); //Sentinel
AddStaticVehicleEx(405,2816.19995117,-1181.00000000,25.29999924,270.00000000,6,1,15); //Sentinel
AddStaticVehicleEx(405,2816.79980469,-1186.29980469,25.20000076,270.00000000,6,1,15); //Sentinel
AddStaticVehicleEx(487,2781.69995117,-1610.19995117,11.19999981,0.00000000,1,-1,15); //Maverick
AddStaticVehicleEx(487,2816.10009766,-1168.69995117,32.90000153,0.00000000,6,-1,15); //Maverick
AddStaticVehicleEx(420,1771.09997559,-1700.40002441,13.30000019,0.00000000,6,-1,15); //Taxi
AddStaticVehicleEx(420,1775.00000000,-1700.30004883,13.30000019,0.00000000,6,-1,15); //Taxi
AddStaticVehicleEx(420,1778.90002441,-1700.19995117,13.30000019,0.00000000,6,-1,15); //Taxi
AddStaticVehicleEx(420,1782.69995117,-1700.40002441,13.30000019,0.00000000,6,-1,15); //Taxi
AddStaticVehicleEx(420,1786.80004883,-1700.30004883,13.30000019,0.00000000,6,-1,15); //Taxi
AddStaticVehicleEx(409,1789.90002441,-1700.09997559,13.39999962,0.00000000,6,-1,15); //Stretch
AddStaticVehicleEx(487,1795.80004883,-1696.19995117,13.80000019,0.00000000,6,1,15); //Maverick
AddStaticVehicleEx(599,-1586.59997559,653.09997559,7.59999990,0.00000000,-1,53,15); //Police Ranger
AddStaticVehicleEx(523,-1599.79980469,653.59960938,6.80000019,0.00000000,-1,-1,15); //HPV1000
AddStaticVehicleEx(497,-1680.30004883,705.79998779,30.89999962,0.00000000,53,-1,15); //Police Maverick
AddStaticVehicleEx(487,-1678.40002441,417.60000610,12.69999981,0.00000000,3,1,15); //Maverick
AddStaticVehicleEx(405,-1817.50000000,-160.50000000,9.39999962,0.00000000,5,1,15); //Sentinel
AddStaticVehicleEx(405,-1824.29980469,-160.89941406,9.39999962,0.00000000,5,1,15); //Sentinel
AddStaticVehicleEx(411,-1818.69995117,-183.30000305,9.19999981,0.00000000,5,1,15); //Infernus
AddStaticVehicleEx(487,-1820.09997559,-191.50000000,13.80000019,88.00000000,5,-1,15); //Maverick
CreateObject(7096,2828.69995117,-1168.59997559,29.00000000,0.00000000,0.00000000,178.00000000); //object(vrockstairs) (1)
CreateObject(7096,2516.00000000,-1672.90002441,18.39999962,0.00000000,0.00000000,0.00000000); //object(vrockstairs) (2)
CreateObject(7096,-1673.50000000,436.29998779,9.19999981,0.00000000,0.00000000,224.00000000); //object(vrockstairs) (4)
//AutoMensagens
//Mude O Tempo Das Mensagens Logo Abaixo Detalhe Tempo Em MiliSegundos!
SetTimer("menssagem1",120000,1);
SetTimer("menssagem2",85000,1);
SetTimer("menssagem3",125000,2);
SetTimer("menssagem4",150000,2);
return 1;
}
public menssagem1()
{
format(alerta,sizeof(alerta),"~r~]]]~w~Viu alguem usando hack? reporte em: ~g~/report~r~]]]");
GameTextForAll(alerta,5000,5);
return 1;
}
public menssagem2()
{
format(alerta,sizeof(alerta),"{00FF00}Gamemode By Lucas Rawr.");
SendClientMessageToAll(VERMELHO,alerta);
return 1;
}
public menssagem3()
{
format(alerta,sizeof(alerta),"{00FF00}Gamemode By Lucas Rawr.");
SendClientMessageToAll(VERMELHO,alerta);
return 1;
}
public menssagem4()
{
format(alerta,sizeof(alerta),"{FFD700}Edite Aqui!!!!!!!!!!!.");
SendClientMessageToAll(AMARELO,alerta);
return 1;
}
/*===============================================================================================================*/
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerInterior(playerid,14);
SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
SetPlayerFacingAngle(playerid, 270.0);
SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
ApplyAnimation(playerid, "DANCING", "DAN_Left_A", 4.0, 1, 0, 0, 0, 0);
//Logo Abaixo Fica As Classids Que Designarгo Qual Time O Player Farб Parte
if(classid == 0) {
SetPlayerColor(playerid, 0x483D8BAA);
GameTextForPlayer(playerid,"~b~Swat",5000,6); }
if(classid == 1 || classid == 2 || classid == 3){
SetPlayerColor(playerid, 0xA020F0AA);
GameTextForPlayer(playerid,"~p~Ballas",5000,6);
}
if(classid == 4 || classid == 5){
SetPlayerColor(playerid, 0xFF0000AA);
GameTextForPlayer(playerid,"~G~Grove Street",5000,6);
}
if(classid == 6 || classid == 7 || classid == 8){
SetPlayerColor(playerid, 0x32CD32AA);
GameTextForPlayer(playerid,"~G~Grove Street",5000,6);
}
if(classid == 9 || classid == 10){
SetPlayerColor(playerid, 0xDCDCDCAA);
GameTextForPlayer(playerid,"~w~Drifters",5000,6);
}
if(classid == 11 || classid == 12 || classid == 13){
SetPlayerColor(playerid, 0xFFFF00AA);
GameTextForPlayer(playerid,"~Y~Los Vagos",5000,6);
}
if(classid == 14 || classid == 15){
SetPlayerColor(playerid, 0xFFD700AA);
GameTextForPlayer(playerid,"~Y~Taxistas",5000,6);
}
return 1;
}
/*===============================================================================================================*/
public OnPlayerConnect(playerid)
{
PlayAudioStreamForPlayer(playerid, "http://somafm.com/tags.pls");//Esse Link Й O Stream Que O Player Ouvirб Ao Entrar
new pname[MAX_PLAYER_NAME];
new string [125];
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
SetPlayerColor(playerid, 0xFFFFFFFF);
format(string, sizeof(string), "{FFFF00}[TDM] {FFFFFF}%s {CD853F} Entrou No Servidor!!!", pname);
SendClientMessageToAll(0x00FFFFFF, string);
new Nome[MAX_PLAYER_NAME];
GetPlayerName(playerid, Nome, sizeof(Nome));
new String[100];
format(String, sizeof(String), CONTAS, Nome);
if(!dini_Exists(String))
{
format(String, sizeof(String), "{7FFFD4}Nick: {1E90FF}%s {1E90FF}Nгo Registrado\n\n{FFFFFF} Digite Uma Senha Para Continuar", Nome);
ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_INPUT, "Registro", String, "Registrar", "Cancelar");
}
else
{
format(String, sizeof(String), "{7FFFD4}Nick: {1E90FF}%s {1E90FF}Registrado\n\n{FFFFFF} Digite Sua Senha Para Logar", Nome);
ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Registro", String, "Logar", "Cancelar");
}
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new pname[MAX_PLAYER_NAME];
new string [125];
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
format(string, sizeof(string), "{FFFF00}[TDM] {FFFFFF}%s {CD853F}Saiu Do Servidor =/.", pname);
SendClientMessageToAll(0x00FFFFFF, string);
SalvarPlayer(playerid);
return 1;
}
public OnPlayerSpawn(playerid)
{
StopAudioStreamForPlayer(playerid);
//Logo Abaixo Fica As Armas Que O Player Vai Receber Quando Spawnar//
GivePlayerWeapon(playerid, 4, 1);
GivePlayerWeapon(playerid, 24, 1000);
GivePlayerWeapon(playerid, 26, 1000);
GivePlayerWeapon(playerid, 28, 1000);
GivePlayerWeapon(playerid, 30, 1000);
GivePlayerWeapon(playerid, 34, 1000);
GivePlayerWeapon(playerid, 45, 1);
//Interior Do Player//
SetPlayerInterior(playerid,0);
return 1;
}
/*===============================================================================================================*/
public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid,playerid,reason);
if(IsPlayerConnected(killerid))
{
Matou[killerid]++;
}
Morreu[playerid]++;
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
/*===============================================================================================================*/
public OnPlayerCommandText(playerid, cmdtext[])
{
//Comandos Aqui Ficara Todos Os Comandos Do Gamemode//
//-------------------------------[SUICIDIO]---------------------------------
if (strcmp("/kill", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, VERMELHO, "Vocк se suicidou.");
}
//-------------------------------[CRЙDITOS]---------------------------------
if (strcmp ("/creditos", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"{00FF00} [BUD]{FFA500}Creditos{00FF00}[BUD]","|=====Creditos Do Servidor=====| {FFFF00}Creditos A Lucas Rawr Por Fazer Todo O Gamemode ! Skype: lucas.rawr2 !!","Fechar","");
}
//Registro//
if (strcmp("/status", cmdtext, true, 8) == 0)
{
Status(playerid);
return 1;
}
return SendClientMessage(playerid,AZUL,"{00FFFF}[TDM]{FFFFFF}Esse Comando Nгo Existe!");
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveRaceCheckpoint(playerid)
{
return 1;
}
public OnRconCommand(cmd[])
{
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
public OnObjectMoved(objectid)
{
return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
public OnVehicleMod(playerid, vehicleid, componentid)
{
return 1;
}
public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
return 1;
}
public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}
public OnPlayerExitedMenu(playerid)
{
return 1;
}
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
return 1;
}
public OnRconLoginAttempt(ip[], password[], success)
{
return 1;
}
public OnPlayerUpdate(playerid)
{
return 1;
}
public OnPlayerStreamIn(playerid, forplayerid)
{
return 1;
}
public OnPlayerStreamOut(playerid, forplayerid)
{
return 1;
}
public OnVehicleStreamIn(vehicleid, forplayerid)
{
return 1;
}
public OnVehicleStreamOut(vehicleid, forplayerid)
{
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == REGISTRO)
{
if(response)
{
if(!strlen(inputtext))
{
new Nome[MAX_PLAYER_NAME];
GetPlayerName(playerid, Nome, sizeof(Nome));
new String[100];
format(String, sizeof(String), "{7FFFD4}Nick: {1E90FF}%s {1E90FF}Nгo Registrado\n\n{FFFFFF} Digite Uma Senha Para Continuar", Nome);
ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_INPUT, "Registro", String, "Registrar", "Cancelar");
SendClientMessage(playerid,0x1E90FFAA,"Senha invalida, digite uma senha vбlida");
return 1;
}
new Nome[MAX_PLAYER_NAME];
GetPlayerName(playerid, Nome, sizeof(Nome));
new String[100];
format(String, sizeof(String), CONTAS, Nome);
dini_Create(String);
dini_Set(String,"Senha",inputtext);
dini_IntSet(String,"Dinheiro",0);
dini_IntSet(String,"Vida", 100);
dini_IntSet(String,"Colete", 100);
dini_IntSet(String,"Matou",0);
dini_IntSet(String,"Morreu",0);
dini_IntSet(String,"Logou",0);
ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Login", "{1E90FF}Pronto vocк se registrou agora digite Sua Senha Para Logar-Se", "Logar", "Cancelar");
return 1;
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "Vocк Foi Kickado Porque Nгo Quis Se Registrar!!");
Kick(playerid);
return 1;
}
}
if(dialogid == LOGIN)
{
if(response)
{
if(!strlen(inputtext))
{
new Nome[MAX_PLAYER_NAME];
GetPlayerName(playerid, Nome, sizeof(Nome));
new String[100];
format(String, sizeof(String), "{7FFFD4}Nick: {1E90FF}%s {1E90FF}Registrado\n\n{FFFFFF} Digite Sua Senha Para Logar", Nome);
ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Registro", String, "Logar", "Cancelar");
SendClientMessage(playerid,0x1E90FFAA,"Senha Incorreta !");
return 1;
}
new Nome[MAX_PLAYER_NAME];
GetPlayerName(playerid, Nome, sizeof(Nome));
new String[100];
format(String, sizeof(String), CONTAS, Nome);
if(!strcmp(inputtext,dini_Get(String,"Senha"),false))
{
SetarPlayer(playerid);
Logou[playerid]++;
SendClientMessage(playerid,0x00FF00AA,"Vocк Foi Logado Com Sucesso > Escolha Sua Skin!");
return 1;
}
else
{
SendClientMessage(playerid,0x00FF00AA,"Senha incorreta digite-a novamente");
format(String, sizeof(String), "{7FFFD4}Nick: {1E90FF}%s {1E90FF}Registrado\n\n{FFFFFF} Digite Sua Senha Para Logar", Nome);
ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Registro", String, "Logar", "Cancelar");
}
return 1;
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "Vocк nгo quis se logar, por este motivo serб Kickado");
Kick(playerid);
return 1;
}
}
return 1;
}
SalvarPlayer(playerid)
{
new Float:Vida;
new Float:Colete;
GetPlayerHealth(playerid, Vida);
GetPlayerArmour(playerid, Colete);
new Nome[MAX_PLAYER_NAME];
GetPlayerName(playerid, Nome, sizeof(Nome));
new String[50];
format(String, sizeof(String), CONTAS, Nome);
dini_IntSet(String,"Dinheiro", GetPlayerMoney(playerid));
dini_FloatSet(String,"Vida", Vida);
dini_FloatSet(String,"Colete", Colete);
dini_IntSet(String,"Matou", Matou[playerid]);
dini_IntSet(String,"Morreu", Morreu[playerid]);
dini_IntSet(String,"Logou", Logou[playerid]);
return 1;
}
SetarPlayer(playerid)
{
new Nome[MAX_PLAYER_NAME];
GetPlayerName(playerid, Nome, sizeof(Nome));
new String[50];
format(String, sizeof(String), CONTAS, Nome);
GivePlayerMoney(playerid, dini_Int(String,"Dinheiro"));
SetPlayerHealth(playerid, dini_Int(String,"Vida"));
SetPlayerArmour(playerid, dini_Int(String,"Colete"));
Matou[playerid] = dini_Int(String, "Matou");
Morreu[playerid] = dini_Int(String, "Morreu");
Logou[playerid] = dini_Int(String, "Logou");
return 1;
}
Status(playerid)
{
new Nome[MAX_PLAYER_NAME];
GetPlayerName(playerid, Nome, sizeof(Nome));
new String[128];
SendClientMessage(playerid, 0xFF0000AA, "================================================");
format(String, sizeof(String),"Status De %s",Nome);
SendClientMessage(playerid, 0xFFFF00AA,String);
format(String, sizeof(String),"Dinheiro: %d", GetPlayerMoney(playerid));
SendClientMessage(playerid, 0x1E90FFAA,String);
format(String, sizeof(String),"Matou: %d",Matou[playerid]);
SendClientMessage(playerid, 0x1E90FFAA,String);
format(String, sizeof(String),"Morreu: %d",Morreu[playerid]);
SendClientMessage(playerid, 0x1E90FFAA,String);
format(String, sizeof(String),"Vocк Jб Logou %d Vezes Neste Servidor",Logou[playerid]);
SendClientMessage(playerid, 0x1E90FFAA,String);
SendClientMessage(playerid, 0xFF0000AA, "================================================");
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}
//COMANDOS ZCMD//
//REPORT//
CMD:report(playerid,params[]){
new id,text[128],result[128];
if(sscanf(params,"ds[128]",id,text))
SendClientMessage(playerid,-1,"USE: /report [id] [razгo]");
if(!IsPlayerConnected(id))
SendClientMessage(playerid,-1,"Jogador nгo connectado.");
for(new i = 0; i<MAX_PLAYERS; ++i){
if(IsPlayerAdmin(i)){
new pName[24],iName[25];
GetPlayerName(playerid,pName,24);
GetPlayerName(id,iName,24);
format(result,sizeof(result),"%s(%d) {FFFF00}Reportou %s(%d) Motivo: %s",pName,playerid,iName,id,text);
SendClientMessage(i,-1,result);
}
}
SendClientMessage(playerid,-1,"[TDM]{00FFFF}O reporte foi enviado com sucesso.");
return 1;
}
//Pm//
CMD:pm(playerid,params[])
{
new
mString[50],
iName[25],
pName[25],
text,
id
;
if(sscanf(params,"us[128]",id,text))
return SendClientMessage(playerid,-1,"USE: /pm [id] [texto]");
if(!IsPlayerConnected(id))
return SendClientMessage(playerid,-1,"*Jogador offline");
GetPlayerName(playerid,pName,sizeof(pName));
GetPlayerName(id,iName,sizeof(iName));
format(mString,sizeof(mString),"Nova PM de %s | Texto: %s",pName,text);
SendClientMessage(id,-1,mString);
format(mString,sizeof(mString),"PM enviada com sucesso! Destinatario %s",iName);
SendClientMessage(playerid,-1,mString);
return true;
}