[GameMode] Base DM/4Fun
#1

Eae galera blz? hoje venho postar meu primeiro gamemode, (sem ser editado) й uma base sу, entгo vamos lб.

Informaзхes:

Comandos do servidor:

/Comandos - comandos do server
/Teles - teleportes do server
/Regras - regras do servidor (vocк edita)
/Contato - meus contantos (Lucas_HenryK)
/Creditos - Criadores do gamemode
/Pm - Enviar mensagem privada por (humildadeforever)
/Kits - Kits de armas
/Cores - cores para nick
/Grana - fazer R$1,500
/horas - mostrar as horas


Contem:

sistema de spec player ao morrer
text draw.
todas as skin do samp


Em fim ta ai, Usem e Abusem.

Bugs? Fala ai
Dicas pra v2? Post!

Creditos:[/B]
Eu (Lucas_HenryK)
Synchro (Ajuda no /kit01 02 03)
sistema de Pm por (humildadeforever)

Code:

pawn Код:
// Usem e Abuse :]

// ~~~~~~~~~~~~~~~~| COMEЗANDO |~~~~~~~~~~~~~~~~

//INCLUDES
#include <a_samp>

//NEWS
new Text:Baixo;

//DEFINES
#define Vermelho 0xFF230AFF
#define Amarelo 0xEDED26FF
#define Verde 0x1CD622FF
#define Azul 0x0597F2FF
#define Rosa 0xF000ECFF
#define Laranja 0xFAAC02FF
#define Roxo 0x9B02FAFF
#define Branco 0xFFFFFFFF
#define Cinza 0x6B6A67FF
#define CorTele 0x05E3A4FF

//FORWARDS
forward SpecM(playerid);

// ~~~~~~~~~~~~~~~~| MAIN |~~~~~~~~~~~~~~~~

main()
{
    print("\n----------------------------------");
    print("Base GM");
    print("----------------------------------\n");
}

public OnGameModeInit()
{
    SetGameModeText("Base Dm/4Fun");
    for(new skins = 1; skins < 299; skins++)//TODAS SKIN DO SA-MP
    {
        AddPlayerClass(skins,1958.3783,1343.1572,15.3746,270.1425,24,100000,26,100000,32,100000); //MUDE AS CORDENAS PARA SUA PREFERENCIA
    }
    //OBJETOS
    //DRAG DA MORTE
    AddStaticVehicleEx(522,44.27782059,3055.70849609,24.93441200,86.00000000,16,1,15);
    AddStaticVehicleEx(522,44.56273270,3058.69970703,24.93441200,85.99548340,2,1,15);
    AddStaticVehicleEx(522,44.71268082,3064.82592773,24.93441200,85.99548340,6,1,15);
    AddStaticVehicleEx(522,44.64665604,3061.38281250,24.93441200,85.99548340,3,1,15);
    AddStaticVehicleEx(522,44.89160156,3067.94433594,24.93441200,85.99548340,-1,1,15);
    AddStaticVehicleEx(522,45.11065674,3070.87011719,24.93441200,85.99548340,1,1,15);
    AddStaticVehicleEx(522,44.99685287,3073.88476562,24.93441200,85.99548340,85,1,15);
    AddStaticVehicleEx(411,11.93315887,3051.63183594,25.10777473,0.00000000,1,1,15);
    AddStaticVehicleEx(411,17.91270065,3051.32373047,25.07403374,0.00000000,2,1,15);
    AddStaticVehicleEx(411,24.54581642,3051.24487305,25.07403374,0.00000000,-1,-1,15);
    AddStaticVehicleEx(411,30.70973587,3051.18481445,25.07403374,0.00000000,-1,1,15);
    AddStaticVehicleEx(411,37.23207092,3050.75585938,25.07403374,0.00000000,115,1,15);
    AddStaticVehicleEx(411,5.37945843,3051.82250977,25.07403374,0.00000000,85,1,15);
    AddStaticVehicleEx(411,-1.01855469,3052.05468750,25.07403374,0.00000000,86,1,15);
    AddStaticVehicleEx(411,-7.49804688,3052.49218750,25.07403374,0.00000000,6,1,15);
    CreateObject(5147,-109.10321045,3070.09594727,34.14023209,0.00000000,0.00000000,358.00000000);
    CreateObject(5147,-332.61477661,3077.89111328,34.04950714,0.00000000,0.00000000,177.99499512);
    CreateObject(5297,-463.89257812,3082.43164062,30.00524712,0.00000000,0.00000000,177.99499512);
    CreateObject(8040,7.84570312,3066.41699219,25.03965950,0.00000000,0.00000000,177.99499512);
    CreateObject(1655,-515.39941406,3088.50390625,35.73102951,7.99804688,0.00000000,85.99548340);
    CreateObject(1655,-516.02636719,3080.98925781,35.70161438,7.99255371,0.00000000,85.99548340);
    CreateObject(792,25.66711998,3065.57446289,24.44590950,0.00000000,0.00000000,0.00000000);
    CreateObject(792,19.05048752,3066.17504883,24.44590950,0.00000000,0.00000000,0.00000000);
    CreateObject(792,12.05343723,3066.20361328,24.44590950,0.00000000,0.00000000,0.00000000);
    CreateObject(792,4.73000479,3066.41821289,24.44590950,0.00000000,0.00000000,0.00000000);
    CreateObject(792,-9.78918552,3066.73632812,24.44590950,0.00000000,0.00000000,0.00000000);
    CreateObject(792,-2.59147215,3066.45947266,24.44590950,0.00000000,0.00000000,0.00000000);
    CreateObject(3506,-5.29214382,3066.33227539,24.19590950,0.00000000,0.00000000,0.00000000);
    CreateObject(3506,1.20226526,3066.23681641,24.44590950,0.00000000,0.00000000,0.00000000);
    CreateObject(3506,9.44432354,3066.13305664,24.44590950,0.00000000,0.00000000,0.00000000);
    CreateObject(3506,15.51919556,3066.29125977,24.44590950,0.00000000,0.00000000,0.00000000);
    CreateObject(3506,22.23913193,3065.63647461,24.44590950,0.00000000,0.00000000,0.00000000);
    CreateObject(1583,-31.02725983,3076.07641602,25.96166611,0.00000000,0.00000000,86.00000000);
    CreateObject(1584,-30.96490097,3058.67065430,26.06430244,0.00000000,0.00000000,266.00000000);
    CreateObject(1597,-29.99482727,3080.69580078,26.93141556,0.00000000,0.00000000,358.00000000);
    CreateObject(1597,-31.70486832,3053.88134766,26.93141556,0.00000000,0.00000000,357.99499512);
    CreateObject(3434,-105.06059265,3069.39575195,59.56906891,0.00000000,0.00000000,82.00000000);
    CreateObject(3092,-241.23805237,3075.27905273,35.96473312,0.00000000,270.00000000,21.99975586);
    CreateObject(1559,-518.68530273,3085.05078125,39.21833420,0.00000000,0.00000000,0.00000000);
    CreateObject(7073,9.93693256,3082.41552734,42.54078674,0.00000000,0.00000000,268.00000000);
    CreateObject(7392,26.60207558,3080.76684570,32.24411011,0.00000000,0.00000000,88.00000000);
    CreateObject(7392,-3.72801352,3082.46484375,32.29080963,0.00000000,0.00000000,265.99645996);
    //AEROPORTO ABANDONADO
    AddStaticVehicleEx(511,415.10000610,2502.50000000,18.60000038,90.00000000,1,-1,15); //Beagle
    AddStaticVehicleEx(476,203.30000305,2542.50000000,18.70000076,90.00000000,16,-1,15); //Rustler
    AddStaticVehicleEx(513,243.39999390,2542.19995117,17.89999962,181.99993896,17,1,15); //Stunt
    AddStaticVehicleEx(513,268.39999390,2542.89990234,17.89999962,181.99951172,65,-1,15); //Stunt
    AddStaticVehicleEx(520,325.20001221,2541.60009766,18.00000000,179.99993896,-1,-1,15); //Hydra
    AddStaticVehicleEx(520,290.10000610,2540.89990234,18.00000000,179.99450684,-1,-1,15); //Hydra
    AddStaticVehicleEx(425,348.60000610,2539.39990234,17.89999962,181.99993896,-1,-1,15); //Hunter
    AddStaticVehicleEx(447,366.10000610,2538.00000000,17.20000076,179.99963379,-1,-1,15); //Seasparrow
    AddStaticVehicleEx(487,382.39999390,2538.19995117,17.29999924,181.99993896,-1,-1,15); //Maverick
    AddStaticVehicleEx(522,415.70001221,2519.69995117,16.70000076,90.00000000,-1,-1,15); //NRG-500
    CreateObject(8357,327.29998779,2502.19995117,16.10000038,0.00000000,0.00000000,270.00000000); //object(vgssairportland14) (4)
    CreateObject(8357,125.80000305,2502.19995117,16.10000038,0.00000000,0.00000000,269.99499512); //object(vgssairportland14) (5)
    CreateObject(8251,420.79998779,2502.19995117,20.00000000,0.00000000,0.00000000,180.00000000); //object(pltschlhnger02_lvs) (1)
    CreateObject(987,422.10000610,2481.80004883,15.50000000,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (1)
    CreateObject(987,433.89999390,2481.60009766,15.50000000,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (2)
    CreateObject(987,410.79998779,2482.10009766,15.50000000,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (3)
    CreateObject(987,399.20001221,2482.00000000,15.50000000,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (4)
    CreateObject(987,387.89999390,2482.10009766,15.50000000,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (5)
    CreateObject(987,375.79998779,2481.69995117,15.50000000,0.00000000,0.00000000,2.00000000); //object(elecfence_bar) (6)
    CreateObject(987,363.79998779,2481.80004883,15.50000000,0.00000000,0.00000000,359.99951172); //object(elecfence_bar) (7)
    CreateObject(987,352.00000000,2481.69995117,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (8)
    CreateObject(987,340.10000610,2481.89990234,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (9)
    CreateObject(987,328.20001221,2481.89990234,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (10)
    CreateObject(987,316.39999390,2481.80004883,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (11)
    CreateObject(987,305.00000000,2481.80004883,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (12)
    CreateObject(987,293.29998779,2481.89990234,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (13)
    CreateObject(987,281.70001221,2481.89990234,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (14)
    CreateObject(987,270.50000000,2482.10009766,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (15)
    CreateObject(987,258.89999390,2482.00000000,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (16)
    CreateObject(987,249.60000610,2481.89990234,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (17)
    CreateObject(987,237.80000305,2482.00000000,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (18)
    CreateObject(987,226.00000000,2481.89990234,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (19)
    CreateObject(987,214.80000305,2482.10009766,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (20)
    CreateObject(987,202.89999390,2482.00000000,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (21)
    CreateObject(987,191.00000000,2482.19995117,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (22)
    CreateObject(987,179.19999695,2482.30004883,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (23)
    CreateObject(987,167.39999390,2482.30004883,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (24)
    CreateObject(987,155.50000000,2482.19995117,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (25)
    CreateObject(987,144.00000000,2482.39990234,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (26)
    CreateObject(987,132.00000000,2482.19995117,15.60000038,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (27)
    CreateObject(987,120.09999847,2482.30004883,15.60000038,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (28)
    CreateObject(987,107.80000305,2482.10009766,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (29)
    CreateObject(987,96.00000000,2482.10009766,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (30)
    CreateObject(987,84.30000305,2482.19995117,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (31)
    CreateObject(987,71.90000153,2482.19995117,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (32)
    CreateObject(987,60.90000153,2482.19995117,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (33)
    CreateObject(987,49.20000076,2482.10009766,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (35)
    CreateObject(987,37.59999847,2482.00000000,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (36)
    CreateObject(987,28.50000000,2482.00000000,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (37)
    CreateObject(987,20.50000000,2481.89990234,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (38)
    CreateObject(8357,126.50000000,2542.00000000,16.20000076,0.00000000,0.00000000,269.99450684); //object(vgssairportland14) (6)
    CreateObject(8357,336.20001221,2542.00000000,16.10000038,0.00000000,0.00000000,269.99450684); //object(vgssairportland14) (7)
    CreateObject(8251,209.50000000,2542.10009766,20.10000038,0.00000000,0.00000000,179.99450684); //object(pltschlhnger02_lvs) (2)
    CreateObject(8357,-2.79999995,2502.19995117,16.00000000,0.00000000,0.00000000,269.99450684); //object(vgssairportland14) (8)
    CreateObject(8357,-13.10000038,2542.00000000,15.80000019,0.00000000,0.00000000,269.99450684); //object(vgssairportland14) (9)
    CreateObject(987,8.89999962,2481.89990234,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (41)
    CreateObject(987,-2.40000010,2481.80004883,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (42)
    CreateObject(987,-11.00000000,2482.00000000,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (43)
    CreateObject(987,-19.60000038,2482.00000000,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (44)
    CreateObject(987,-28.89999962,2481.89990234,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (45)
    CreateObject(987,-40.40000153,2482.00000000,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (46)
    CreateObject(987,-50.40000153,2482.00000000,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (47)
    CreateObject(987,-61.20000076,2481.89990234,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (48)
    CreateObject(987,-72.90000153,2482.00000000,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (49)
    CreateObject(987,-83.59999847,2482.00000000,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (50)
    CreateObject(987,-93.50000000,2482.00000000,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (51)
    CreateObject(987,-105.09999847,2482.30004883,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (52)
    CreateObject(987,-109.00000000,2482.50000000,15.50000000,0.00000000,0.00000000,359.99450684); //object(elecfence_bar) (54)
    //TEXT DRAW
    Baixo = TextDrawCreate(0.0,438.0," /CONTATO /COMANDOS /CREDITOS /TELES /PM - VISITE: FORUM.SA-MP.COM");
    TextDrawColor(Baixo,0xFF8000FF);
    TextDrawFont(Baixo,2);
    TextDrawAlignment(Baixo,1);
    TextDrawBackgroundColor(Baixo,0x00000000);
    TextDrawLetterSize(Baixo,0.4,0.8);
    TextDrawUseBox(Baixo,1);
    TextDrawBoxColor(Baixo,0x00000044);
    return 1;
}

public OnGameModeExit()
{
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid,1678.9169,1447.8788,47.7780);
    SetPlayerFacingAngle(playerid,271.9625);
    SetPlayerCameraPos(playerid,1682.4458,1448.0004,49.6016);
    SetPlayerCameraLookAt(playerid,1678.9169,1447.8788,47.7780);
    return 1;
}

public OnPlayerConnect(playerid)
{
    SendClientMessage(playerid, Vermelho, "|=============================================================|");
    SendClientMessage(playerid, Azul, "                  [INFO]: Esse GM/Servidor Foi Criado Por Lucas_HenryK");
    SendClientMessage(playerid, Amarelo, "                       [AJUDA]: Para Ajuda Inciante Digite /COMANDOS");
    SendClientMessage(playerid, Verde, "           [IMPORTANTE]: Siga As Regras Do Serivor Para Nгo Ser Banido!");
    SendClientMessage(playerid, Vermelho, "|=============================================================|");
    new str[256];
    new NomeP[24];
    TextDrawShowForPlayer(playerid, Baixo);
    GetPlayerName(playerid,NomeP,MAX_PLAYER_NAME);
    format(str, sizeof(str),"[SERVER]: --> %s [ID:%d] Entrou No Servidor!",NomeP,playerid);
    SendClientMessageToAll(-1,str);
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    new str[256];
    new NomeP[24];
    TextDrawDestroy(Baixo);
    GetPlayerName(playerid,NomeP,MAX_PLAYER_NAME);
    format(str, sizeof(str),"[SERVER]: --> %s [ID:%d] Saiu Do Servidor!",NomeP,playerid);
    SendClientMessageToAll(-1,str);
    return 1;
}

public OnPlayerSpawn(playerid)
{
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    SetPlayerVirtualWorld(playerid,0);
    TogglePlayerSpectating(playerid, true);
    PlayerSpectatePlayer(playerid, killerid, 1);
    GameTextForPlayer(playerid, "~y~Olha quem te matou~r~!!", 3000, 1);
    SetTimerEx("SpecM", 5000, false, "d", playerid);
    return 1;
}

public SpecM(playerid)
{
     TogglePlayerSpectating(playerid, false);
     return 1;
}

public OnVehicleSpawn(vehicleid)
{
    return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
    return 1;
}

public OnPlayerText(playerid, text[])
{
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    // ~~~~~~~~~~~~~~~~~~| COMANDOS DE PLAYERS |~~~~~~~~~~~~~~~~~~
    ///COMANDOS
    if (strcmp("/comandos", cmdtext, true, 11) == 0)
    {
    new comandos[1000];
    strins(comandos,"{02C0E6}/Teles - {EDED26}teleportes do server\n",strlen(comandos));
    strins(comandos,"{02C0E6}/Creditos - {EDED26}criador do Gamemode\n",strlen(comandos));
    strins(comandos,"{02C0E6}/Regras - {EDED26}regras do server\n",strlen(comandos));
    strins(comandos,"{02C0E6}/Comandos - {EDED26}comandos do server\n",strlen(comandos));
    strins(comandos,"{02C0E6}/PM - {EDED26}enviar mensagem privada\n",strlen(comandos));
    strins(comandos,"{02C0E6}/Cores - {EDED26}cores para seu nick\n",strlen(comandos));
    strins(comandos,"{02C0E6}/Kits - {EDED26}kits de armas para comprar\n",strlen(comandos));
    strins(comandos,"{02C0E6}/Horas - {EDED26}ver as hrs (horario de brasilia)\n",strlen(comandos));
    strins(comandos,"{02C0E6}/Contato - {EDED26}Meus contatos (Lucas_HenryK)\n",strlen(comandos));
    strins(comandos,"{02C0E6}/Grana - {EDED26}vocк ganha R$1.500 de dinheiro\n",strlen(comandos));
    ShowPlayerDialog(playerid,2, DIALOG_STYLE_MSGBOX, "{FFFFFF}Comandos de jogadores: ",comandos, "Ok", "Fechar");
    return 1;
    }
    //TELEPORTES
    if (strcmp("/teles", cmdtext, true, 22) == 0)
    {
    new teles[500];
    strins(teles,"{02C0E6}/LV - {EDED26}Vai atй las venturas\n",strlen(teles));
    strins(teles,"{02C0E6}/SF - {EDED26}Vai atй san fierro\n",strlen(teles));
    strins(teles,"{02C0E6}/LV - {EDED26}Vai atй los santost\n",strlen(teles));
    strins(teles,"{02C0E6}/DRIFT - {EDED26}Pista de drift\n",strlen(teles));
    strins(teles,"{02C0E6}/RDM - {EDED26}Rampa da Morte\n",strlen(teles));
    strins(teles,"{02C0E6}/AEROAB - {EDED26}Aeroporto abandonado\n",strlen(teles));
    ShowPlayerDialog(playerid,3, DIALOG_STYLE_MSGBOX, "{FFFFFF}Teleportes: ",teles, "Ok", "Fechar");
    return 1;
    }
    //CONTATO
    if (strcmp("/contato", cmdtext, true, 33) == 0)
    {
    new contato[500];
    strins(contato,"{FFFFFF}MSN: {0597F2}lucash.8@hotmail.com\n",strlen(contato));
    strins(contato,"{FFFFFF}SITE: {0597F2}forum.sa-mp.com\n{FFFFFF}USER: {0597F2}Lucas_HenryK\n",strlen(contato));
    ShowPlayerDialog(playerid,8, DIALOG_STYLE_MSGBOX, "{FFFFFF}Contato: ",contato, "Ok", "Fechar");
    return 1;
    }
    //CREDITOS
    if (strcmp("/creditos", cmdtext, true, 44) == 0)
    {
    new creditos[500];
    strins(creditos,"{FFFFFF}GameMode feito por - {1CD622}Lucas_HenryK, Com a ajuda\n",strlen(creditos));
    strins(creditos,"{FFFFFF}de {1CD622}forum.sa-mp.com PT-BR e Synchro.\n",strlen(creditos));
    ShowPlayerDialog(playerid,4, DIALOG_STYLE_MSGBOX, "{FFFFFF}Creditos: ",creditos, "Ok", "Fechar");
    return 1;
    }
    //REGRAS
    if (strcmp("/regras", cmdtext, true, 55) == 0)
    {
    new regras[500];
    strins(regras,"{FF230A}EM DESENVOLVIMENTO!\n",strlen(regras));
    ShowPlayerDialog(playerid,5, DIALOG_STYLE_MSGBOX, "{FFFFFF}Regras: ",regras, "Ok", "Fechar");
    return 1;
    }
    //KITS
    if (strcmp("/kits", cmdtext, true, 66) == 0)
    {
    new kits[500];
    strins(kits,"{1CD622}[/KIT01] - {FFFFFF}Swan Off, Tec9, Gases e Taco de BaseBall. {EB3300}(CUSTO: R$5,000)\n",strlen(kits));
    strins(kits,"{1CD622}[/KIT02] - {FFFFFF}Combat Shotgun, Mp5, Granadas, e Katana. {EB3300}(CUSTO: R$4,600)\n",strlen(kits));
    strins(kits,"{1CD622}[/KIT03] - {FFFFFF}Shot Gun, Micro Uzi, Motolovs e Serra Eletrica. {EB3300}(CUSTO: R$3,800)\n",strlen(kits));
    ShowPlayerDialog(playerid,7, DIALOG_STYLE_MSGBOX, "{FFFFFF}Kits Diponiveis: ",kits, "Ok", "Fechar");
    return 1;
    }
    //KIT 01
    if (strcmp("/kit01", cmdtext, true, 77) == 0)
    {
    if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid, Vermelho, "[ERRO]: Vocк nгo tem grana suficiente!");
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid,26,1000);
    GivePlayerWeapon(playerid,32,1000);
    GivePlayerWeapon(playerid,17,1000);
    GivePlayerWeapon(playerid,5,1000);
    GivePlayerMoney(playerid, -5000);
    SendClientMessage(playerid, Amarelo, "[INFO]: Kit adquirido com sucesso!!");
    return 1;
    }
    //KIT 01
    if (strcmp("/kit02", cmdtext, true, 88) == 0)
    {
    if(GetPlayerMoney(playerid) < 4600) return SendClientMessage(playerid, Vermelho, "[ERRO]: Vocк nгo tem grana suficiente!");
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid,27,1000);
    GivePlayerWeapon(playerid,29,1000);
    GivePlayerWeapon(playerid,16,1000);
    GivePlayerWeapon(playerid,9,1000);
    SendClientMessage(playerid, Amarelo, "[INFO]: Kit adquirido com sucesso!!");
    return 1;
    }
    //KIT 03
    if (strcmp("/kit03", cmdtext, true, 99) == 0)
    {
    if(GetPlayerMoney(playerid) < 3800) return SendClientMessage(playerid, Vermelho, "[ERRO]: Vocк nгo tem grana suficiente!");
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid,25,1000);
    GivePlayerWeapon(playerid,28,1000);
    GivePlayerWeapon(playerid,18,1000);
    GivePlayerWeapon(playerid,8,1000);
    SendClientMessage(playerid, Amarelo, "[INFO]: Kit adquirido com sucesso!!");
    return 1;
    }
    //CORES PARA NICK
    if (strcmp("/cores", cmdtext, true, 111) == 0)
    {
    new cores[500];
    strins(cores,"{FF230A}/Vermelho {EDED26}/Armarelo {1CD622}/Verde {0597F2}/Azul\n{F000EC}/Rosa {FAAC02}/Laranja {9B02FA}/Roxo {FFFFFF}/Branco {6B6A67}/Cinza\n",strlen(cores));
    ShowPlayerDialog(playerid,6, DIALOG_STYLE_MSGBOX, "{FFFFFF}Cores Diponiveis: ",cores, "Ok", "Fechar");
    return 1;
    }
    //COR VERMELHA
    if (strcmp("/vermelho", cmdtext, true, 222) == 0)
    {
    SetPlayerColor(playerid,0xFF230AFF);
    return 1;
    }
    //COR AMARELA
    if (strcmp("/amarelo", cmdtext, true, 333) == 0)
    {
    SetPlayerColor(playerid,0xEDED26FF);
    return 1;
    }
    //COR VERDE
    if (strcmp("/verde", cmdtext, true, 444) == 0)
    {
    SetPlayerColor(playerid,0x1CD622FF);
    return 1;
    }
    //COR AZUL
    if (strcmp("/azul", cmdtext, true, 555) == 0)
    {
    SetPlayerColor(playerid,0x0597F2FF);
    return 1;
    }
    //COR ROSA
    if (strcmp("/rosa", cmdtext, true, 666) == 0)
    {
    SetPlayerColor(playerid,0xF000ECFF);
    return 1;
    }
    //COR LARANJA
    if (strcmp("/laranja", cmdtext, true, 777) == 0)
    {
    SetPlayerColor(playerid,0xFAAC02FF);
    return 1;
    }
    //COR ROXO
    if (strcmp("/roxo", cmdtext, true, 888) == 0)
    {
    SetPlayerColor(playerid,0x9B02FAFF);
    return 1;
    }
    //COR BRANCO
    if (strcmp("/branco", cmdtext, true, 999) == 0)
    {
    SetPlayerColor(playerid,0xFFFFFFFF);
    return 1;
    }
    //COR CINZA
    if (strcmp("/cinza", cmdtext, true, 987) == 0)
    {
    SetPlayerColor(playerid,0x6B6A67FF);
    return 1;
    }
    //HORAS
    if (strcmp("/horas", cmdtext, true, 654) == 0)
    {
    new string[64], hour,minuite,second; gettime(hour,minuite,second);
    format(string, sizeof(string), "~g~|~w~%d:%d~g~|", hour, minuite);
    return GameTextForPlayer(playerid, string, 6000, 3);
    }
    //GRANA
    if (strcmp("/grana", cmdtext, true, 321) == 0)
    {
    GivePlayerMoney(playerid,1500);
    SendClientMessage(playerid, Verde, "[INFO]: Vocк ganho R$1.500!");
    return 1;
    }
    //LOS SANTOS
    if (strcmp("/ls", cmdtext, true, 123) == 0)
    {
    new NomeP[MAX_PLAYER_NAME];
    new string[256];
    SetPlayerInterior(playerid,0);
    GetPlayerName(playerid,NomeP,MAX_PLAYER_NAME);
    format(string, sizeof(string),"%s foi para los santos (/LS)",NomeP);
    SendClientMessageToAll(CorTele,string);
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER){
    SetVehiclePos(GetPlayerVehicleID(playerid),1535.0038,-1672.3691,18.0423);
    PutPlayerInVehicle(playerid,GetPlayerVehicleID(playerid),0);
    SetVehicleZAngle(GetPlayerVehicleID(playerid),89.5350);
    return 1;
    }
    SetPlayerPos(playerid,1535.0038,-1672.3691,13.0423);
    return 1;
    }
    //LAS VENTURAS
    if (strcmp("/lv", cmdtext, true, 456) == 0)
    {
    new NomeP[MAX_PLAYER_NAME];
    new string[256];
    SetPlayerInterior(playerid,0);
    GetPlayerName(playerid,NomeP,MAX_PLAYER_NAME);
    format(string, sizeof(string),"%s foi para las venturas (/LV)",NomeP);
    SendClientMessageToAll(CorTele,string);
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER){
    SetVehiclePos(GetPlayerVehicleID(playerid),2137.3298,2149.6741,10.3303);
    PutPlayerInVehicle(playerid,GetPlayerVehicleID(playerid),0);
    SetVehicleZAngle(GetPlayerVehicleID(playerid),147.1717);
    return 1;
    }
    SetPlayerPos(playerid,2137.3298,2149.6741,10.3303);
    return 1;
    }
    //SAN FIERRO
    if (strcmp("/sf", cmdtext, true, 689) == 0)
    {
    new NomeP[MAX_PLAYER_NAME];
    new string[256];
    SetPlayerInterior(playerid,0);
    GetPlayerName(playerid,NomeP,MAX_PLAYER_NAME);
    format(string, sizeof(string),"%s foi para san fierro (/SF)",NomeP);
    SendClientMessageToAll(CorTele,string);
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER){
    SetVehiclePos(GetPlayerVehicleID(playerid),-1990.6663,286.7029,38.7145);
    PutPlayerInVehicle(playerid,GetPlayerVehicleID(playerid),0);
    SetVehicleZAngle(GetPlayerVehicleID(playerid),92.1285);
    return 1;
    }
    SetPlayerPos(playerid,-1990.6663,286.7029,38.7145);
    return 1;
    }
    //DRIFT
    if (strcmp("/drift", cmdtext, true, 852) == 0)
    {
    new NomeP[MAX_PLAYER_NAME];
    new string[256];
    SetPlayerInterior(playerid,0);
    GetPlayerName(playerid,NomeP,MAX_PLAYER_NAME);
    format(string, sizeof(string),"%s foi para pista de drift (/DRIFT)",NomeP);
    SendClientMessageToAll(CorTele,string);
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER){
    SetVehiclePos(GetPlayerVehicleID(playerid),-333.5709,1526.9032,80.3594);
    PutPlayerInVehicle(playerid,GetPlayerVehicleID(playerid),0);
    SetVehicleZAngle(GetPlayerVehicleID(playerid),259.0366);
    return 1;
    }
    SetPlayerPos(playerid,-333.5709,1526.9032,75.3594);
    return 1;
    }
    //RAMPA DA MORTE
    if (strcmp("/rdm", cmdtext, true, 258) == 0)
    {
    SetPlayerPos(playerid,33.7602,3065.8135,25.2740);
    SetVehiclePos(playerid,33.7602,3065.8135,25.2740);
    new NameP[MAX_PLAYER_NAME];
    new string[256];
    GetPlayerName(playerid, NameP, MAX_PLAYER_NAME);
    format(string, sizeof(string), "%s foi para rampa da morte -> (/RDM)", NameP);
    SendClientMessageToAll(CorTele,string);
    return 1;
    }
    //AERO AB
    if (strcmp("/aeroab", cmdtext, true, 357) == 0)
    {
    SetPlayerPos(playerid,419.2701,2524.7063,17.0844);
    SetVehiclePos(playerid,419.2701,2524.7063,17.0844);
    new NameP[MAX_PLAYER_NAME];
    new string[256];
    GetPlayerName(playerid, NameP, MAX_PLAYER_NAME);
    format(string, sizeof(string), "%s foi para aero abandonado -> (/AEROAB)", NameP);
    SendClientMessageToAll(CorTele,string);
    return 1;
    }
    //SE MATAR
    if (strcmp("/kill", cmdtext, true, 753) == 0)
    {
    SetPlayerHealth(playerid, 0);
    new NameP[MAX_PLAYER_NAME];
    new string[256];
    GetPlayerName(playerid, NameP, MAX_PLAYER_NAME);
    format(string, sizeof(string), "%s se matou -> (/KILL)", NameP);
    SendClientMessageToAll(CorTele,string);
    return 1;
    }
    //MENSAGEM PRIVADA
    new cmd[156], tmp[156], idx;
    cmd = strtok(cmdtext, idx);
    if (strcmp("/pm", cmdtext, true, 951) == 0)
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp)) return SendClientMessage(playerid,Vermelho, "[ERRO]: /pm [id] [mensagem]");
    new giveplayerid, msg[128];
    giveplayerid = ReturnUser(tmp);
    if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid,-1, "Jogador nгo conectado");
    if(playerid == giveplayerid) return SendClientMessage(playerid,Vermelho, "[ERRO]: Ain que burro, voce nгo pode mandar mensagem pra vocк mesmo ");
    new length = strlen(cmdtext);
    while ((idx < length) && (cmdtext[idx] <= ' '))
    {
    idx++;
    }
    new offset = idx;
    new result[64];
    while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
    {
    result[idx - offset] = cmdtext[idx];
    idx++;
    }
    result[idx - offset] = EOS;
    if(!strlen(result)) return SendClientMessage(playerid,Vermelho, "[ERRO]: Digite uma mensagem !");
    new nomeplayerid[MAX_PLAYER_NAME], nomegiveplayerid[MAX_PLAYER_NAME];
    GetPlayerName(playerid, nomeplayerid, sizeof(nomeplayerid));
    GetPlayerName(giveplayerid, nomegiveplayerid, sizeof(nomegiveplayerid));
    format(msg,sizeof(msg),"[MP] de %s: %s", nomeplayerid,result);
    GameTextForPlayer(giveplayerid, "~g~NOVA MP RECEBIDA.", 2000, 1);
    SendClientMessage(giveplayerid, 0xE6E612FF, msg);
    format(msg,sizeof(msg),"[MP] para %s: %s",nomegiveplayerid,result);
    GameTextForPlayer(playerid, "~g~MP ENVIADA", 2000, 1);
    SendClientMessage(playerid,0xE0E000FF, msg);
    return 1;
    }
    return 0;
}

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[])
{
    return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    return 1;
}
stock strtok(const string[], &index)
{
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' '))
    {
        index++;
    }

    new offset = index;
    new result[20];
    while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
    {
        result[index - offset] = string[index];
        index++;
    }
    result[index - offset] = EOS;
    return result;
}


stock ReturnUser(text[], playerid = INVALID_PLAYER_ID)
{
        new pos = 0;
        while (text[pos] < 0x21)
        {
                if (text[pos] == 0) return INVALID_PLAYER_ID;
                pos++;
        }
        new userid = INVALID_PLAYER_ID;
        if ((text[pos]))
        {
                userid = strval(text[pos]);
                if (userid >=0 && userid < MAX_PLAYERS)
                {
                        if(!IsPlayerConnected(userid))
                        {
                                userid = INVALID_PLAYER_ID;
                        }
                        else
                        {
                                return userid;
                        }
                }
        }
        new len = strlen(text[pos]);
        new count = 0;
        new name[MAX_PLAYER_NAME];
        for (new i = 0; i < MAX_PLAYERS; i++)
        {
                if (IsPlayerConnected(i))
                {
                        GetPlayerName(i, name, sizeof (name));
                        if (strcmp(name, text[pos], true, len) == 0)
                        {
                                if (len == strlen(name))
                                {
                                        return i;
                                }
                                else
                                {
                                        count++;
                                        userid = i;
                                }
                        }
                }
        }
        if (count != 1)
        {
                if (playerid != INVALID_PLAYER_ID)
                {
                        if (count)
                        {
                                SendClientMessage(playerid, 0xFF0000AA, "Multiple users found, please narrow search.");
                        }
                        else
                        {
                                SendClientMessage(playerid, 0xFF0000AA, "No matching user found.");
                        }
                }
                userid = INVALID_PLAYER_ID;
        }
        return userid;
}
Reply
#2

Ta faltando usuбrios nos crйditos ai.

Enfim, o gamemode estб bom pra base, mais tente se atualizar um pouco, vocк poderia ter feito usando SSCANF e ZCMD.
Reply
#3

Achei meio simples atй para uma base.
Reply
#4

Quote:
Originally Posted by Douglas_FusioN
Посмотреть сообщение
Achei meio simples atй para uma base.
Ele fez com um intuito de ser como base para novos gamemodes, veja o titulo do tуpico.
Reply
#5

Quote:
Originally Posted by Đeagle
Посмотреть сообщение
Ele fez com um intuito de ser como base para novos gamemodes, veja o titulo do tуpico.
Quote:
Originally Posted by Douglas_FusioN
Посмотреть сообщение
Achei meio simples atй para uma base.
Entгo oque eu disse?
Achei simples atй para uma Base!
#Topic
Como й seu primeiro Gamemode, sugiro seguir em frente com ele, se se esforзar pode ir longe.
@edit
Pode melhorar em coisas como:
Falta sistema de Registro/Login salvamento.
Poderia botar como o sistema de escolha de cor em Dialog List.
Teleportes;
Todos aqueles mapas foram feitos por vocк?
Reply
#6

Era pra ter codado mais man faltou umas coisas pow =/
mas ta bom pra base ^^

________________________
QUER UM GAMEMODE? UM FILTER SCRIPT? UM MOD?
VISITE-NOS: http://www.sampknd.blogspot.com.br/


QUER UM HOST DE QUALIDADE E NГO ACHA?
AQUI ESTБ: http://www.hosterbrasil.com/


________________________
Reply
#7

Quote:
Originally Posted by Douglas_FusioN
Посмотреть сообщение
Entгo oque eu disse?
Achei simples atй para uma Base!
#Topic
Como й seu primeiro Gamemode, sugiro seguir em frente com ele, se se esforзar pode ir longe.
@edit
Pode melhorar em coisas como:
Falta sistema de Registro/Login salvamento.
Poderia botar como o sistema de escolha de cor em Dialog List.
Teleportes;
Todos aqueles mapas foram feitos por vocк?
Meu amiguinho.
Aquilo й uma BASE, vocк sabe o que й uma BASE?
Nуs usamos BASE, para iniciar um novo projeto, por exemplo o GF, muitos RPG's/RP's usam o GF como BASE, e ele nгo й lб grande e sofisticado.

Reply
#8

Quote:
Originally Posted by Đeagle
Посмотреть сообщение
Meu amiguinho.
Aquilo й uma BASE, vocк sabe o que й uma BASE?
Nуs usamos BASE, para iniciar um novo projeto, por exemplo o GF, muitos RPG's/RP's usam o GF como BASE, e ele nгo й lб grande e sofisticado.

Amiguinho nгo, pois nгo vou com sua cara.
Entгo meu deus, acho que nгo esta no nнvel de uma base!
Quer que eu faзa um desenho para vocк ficar feliz?
Se e para usar do jeito que esta como base й melhor clicar em new.
Sem ofensas ao criador do GM, jб disse oque falta.
Reply
#9

Quote:
Originally Posted by Douglas_FusioN
Посмотреть сообщение
Amiguinho nгo, pois nгo vou com sua cara.
Entгo meu deus, acho que nгo esta no nнvel de uma base!
Quer que eu faзa um desenho para vocк ficar feliz?
Se e para usar do jeito que esta como base й melhor clicar em new.
Sem ofensas ao criador do GM, jб disse oque falta.
Meu caro.
Se vocк nгo vai com minha cara, fazer o que nй? inveja ta atona.
Se quiser desenhar, avondade.
Й outra, antes de vocк vim criticar trabalhos de outros usuбrios, veja os seus tуpicos.
Reply
#10

Quote:
Originally Posted by Đeagle
Посмотреть сообщение
Ta faltando usuбrios nos crйditos ai.

Enfim, o gamemode estб bom pra base, mais tente se atualizar um pouco, vocк poderia ter feito usando SSCANF e ZCMD.
Nem tinha reparado seu post, mais quem estб faltando?
PS: v2 estб por vim, e jбesta com sscanf e zcmd !!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)