Organizacije

Započeo black_dota, Jul 31, 2010, 14:01:12 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 3 gostiju pregledaju ovu temu.

black_dota

E ovako ja pravim neki DM gamemode i pratio sam one tutove sa samp wiki i odavde i sve lepo radi.E sada ja sam ubacivao neke komande i ubacivao jos neke org pod ono gTeam znate vec i ja sada imam GS Ballase i  Los Aztecas.E ovo je problem. Ja uzemm 2 skin od GS i chat mi bude od njega roze boje tj a trebao bi biti zelene a ako uzemm 3 skin on bude plave boje a treba biti zeleni.E sada kako ja da namestim da mi bude za prva 3 skina ime dok pricaju zelene boje za sledeca 3 roze i zadnja 3 plave evo koda:
//Dota's DM

#include <a_samp>
#include <a_objects>
#include <Streamer>

#define TEAM_GROVE 1
#define TEAM_BALLA 2
#define TEAM_AZTECA 3
#define TEAM_GROVE_COLOR 0x00FF00AA // Svetlo Zelena (u RGB formatu)
#define TEAM_BALLA_COLOR 0xFF00FFAA // Svetlo Ljubicasta
#define TEAM_AZTECA_COLOR 0x00FFFAFF // Svetlo Plava
#define COLOR_WHITE 0xFEFEFEFF


new GSKapija1;
new GSKapija2;
new gTeam[MAX_PLAYERS];

forward GSZatvori1();
forward GSZatvori2();

main()
{
print("\n----------------------------------");
print(" Death Match by Black Dota");
print("----------------------------------\n");
}

public OnGameModeInit()
{
DisableInteriorEnterExits();
SetGameModeText("Dota's DM");
AddPlayerClass(105, 2494.3167,-1685.0479,13.5111,14.4912, 5, 0, 22, 100, 32, 150);
AddPlayerClass(106, 2494.3167,-1685.0479,13.5111,14.4912, 5, 0, 22, 100, 32, 150);
AddPlayerClass(107, 2494.3167,-1685.0479,13.5111,14.4912, 5, 0, 22, 100, 32, 150);
AddPlayerClass(102, 2147.6904,-1484.8607,26.6241,88.0785, 5, 0, 22, 100, 32, 150);
AddPlayerClass(103, 2147.6904,-1484.8607,26.6241,88.0785, 5, 0, 22, 100, 32, 150);
AddPlayerClass(104, 2147.6904,-1484.8607,26.6241,88.0785, 5, 0, 22, 100, 32, 150);
AddPlayerClass(114, 1753.6218,-1894.3931,13.5571,273.8869, 5, 0, 22, 100, 32, 150);
AddPlayerClass(115, 1753.6218,-1894.3931,13.5571,273.8869, 5, 0, 22, 100, 32, 150);
AddPlayerClass(116, 1753.6218,-1894.3931,13.5571,273.8869, 5, 0, 22, 100, 32, 150);
SetGameModeText("Dota's DM");
AddPlayerClass(105, 1958.3783, 1343.1572, 15.3746, 269.1425, 5, 0, 22, 100, 32, 150);
AddPlayerClass(106, 1958.3783, 1343.1572, 15.3746, 269.1425, 5, 0, 22, 100, 32, 150);
AddPlayerClass(107, 1958.3783, 1343.1572, 15.3746, 269.1425, 5, 0, 22, 100, 32, 150);
AddPlayerClass(102, 1958.3783, 1343.1572, 15.3746, 269.1425, 5, 0, 22, 100, 32, 150);
AddPlayerClass(103, 1958.3783, 1343.1572, 15.3746, 269.1425, 5, 0, 22, 100, 32, 150);
AddPlayerClass(104, 1958.3783, 1343.1572, 15.3746, 269.1425, 5, 0, 22, 100, 32, 150);
AddStaticVehicleEx(492,2499.89794922,-1685.26562500,13.12575531,294.00000000,16,1,15); //Greenwood GS
AddStaticVehicleEx(492,2508.53027344,-1678.87609863,13.24687767,325.99963379,16,1,15); //Greenwood GS
AddStaticVehicleEx(492,2489.90380859,-1686.25903320,13.16074085,269.99963379,16,1,15); //Greenwood GS
AddStaticVehicleEx(492,2511.69140625,-1669.99975586,13.13621044,349.99731445,16,1,15); //Greenwood GS
AddStaticVehicleEx(492,2510.09838867,-1660.80871582,13.24375343,33.99694824,16,1,15); //Greenwood GS
AddStaticVehicleEx(492,2502.54028320,-1653.99365234,13.28663731,57.99169922,16,1,15); //Greenwood GS
AddStaticVehicleEx(492,2493.11254883,-1651.90380859,13.07582855,87.99133301,16,1,15); //Greenwood GS
AddStaticVehicleEx(492,2484.87524414,-1651.60607910,13.12026882,87.98950195,16,1,15); //Greenwood GS
GSKapija1 = CreateObject(2933,2480.68676758,-1688.17016602,14.23200989,0.00000000,0.00000000,355.25000000); //object(pol_comp_gate) (1) GS
CreateObject(974,2476.37036133,-1684.57629395,15.20279408,0.00000000,0.00000000,268.00000000); //object(tall_fence) (1) GS
CreateObject(974,2476.67089844,-1677.98706055,15.11619949,0.00000000,0.00000000,267.99499512); //object(tall_fence) (2) GS
CreateObject(974,2476.88769531,-1671.40148926,15.11725998,0.00000000,0.00000000,267.99499512); //object(tall_fence) (3) GS
GSKapija2 = CreateObject(2933,2477.08496094,-1663.79150391,14.04633617,0.00000000,0.00000000,267.75000000); //object(pol_comp_gate) (2) GS
CreateObject(974,2477.30737305,-1656.09826660,15.09491920,0.00000000,0.00000000,267.99499512); //object(tall_fence) (4) GS
CreateObject(974,2477.54858398,-1649.48339844,15.25368309,0.00000000,0.00000000,267.99499512); //object(tall_fence) (5) GS
CreateObject(2991,2518.70043945,-1672.58776855,13.91085148,0.00000000,0.00000000,0.00000000); //object(imy_bbox) (1) GS
CreateObject(2991,2518.62988281,-1674.64575195,13.97424221,0.00000000,0.00000000,0.00000000); //object(imy_bbox) (2) GS
CreateObject(2062,2520.18359375,-1672.09216309,15.10954285,0.00000000,0.00000000,0.00000000); //object(cj_oildrum2) (1) GS
CreateObject(2062,2519.20996094,-1672.07409668,15.10954285,0.00000000,0.00000000,0.00000000); //object(cj_oildrum2) (2) GS
CreateObject(2062,2518.23876953,-1672.10595703,15.10954285,0.00000000,0.00000000,0.00000000); //object(cj_oildrum2) (3) GS
CreateObject(2062,2517.19921875,-1672.08142090,15.10954285,0.00000000,0.00000000,0.00000000); //object(cj_oildrum2) (4) GS
CreateObject(2062,2520.10913086,-1675.20031738,15.17293358,0.00000000,0.00000000,0.00000000); //object(cj_oildrum2) (5) GS
CreateObject(2062,2519.09838867,-1675.18151855,15.17293358,0.00000000,0.00000000,0.00000000); //object(cj_oildrum2) (6) GS
CreateObject(2062,2518.09692383,-1675.18676758,15.17293358,0.00000000,0.00000000,0.00000000); //object(cj_oildrum2) (7) GS
CreateObject(2062,2517.07666016,-1675.14318848,15.17293358,0.00000000,0.00000000,0.00000000); //object(cj_oildrum2) (8) GS
CreateObject(2062,2520.23779297,-1673.08459473,15.10954285,0.00000000,0.00000000,0.00000000); //object(cj_oildrum2) (9) GS
CreateObject(2062,2520.17895508,-1674.22570801,15.17293358,0.00000000,0.00000000,0.00000000); //object(cj_oildrum2) (10) GS
CreateObject(2062,2516.19287109,-1675.24023438,13.48664284,0.00000000,0.00000000,0.00000000); //object(cj_oildrum2) (12) GS
CreateObject(2062,2520.37817383,-1677.57275391,14.30846882,0.00000000,0.00000000,0.00000000); //object(cj_oildrum2) (13) GS
CreateObject(931,2518.00097656,-1670.63635254,14.20492935,0.00000000,0.00000000,0.00000000); //object(rack3) (1) GS
CreateObject(931,2517.98388672,-1668.89562988,14.26996422,0.00000000,0.00000000,0.00000000); //object(rack3) (2) GS
CreateObject(931,2517.83129883,-1676.57470703,14.33067131,0.00000000,0.00000000,0.00000000); //object(rack3) (3) GS
CreateObject(1362,2516.26123047,-1668.33544922,13.42504120,0.00000000,0.00000000,0.00000000); //object(cj_firebin) (1) GS
CreateObject(1362,2517.39965820,-1668.52673340,15.93924332,0.00000000,0.00000000,0.00000000); //object(cj_firebin) (2) GS
CreateObject(2062,2516.32055664,-1671.93457031,13.42994976,0.00000000,0.00000000,0.00000000); //object(cj_oildrum2) (14) GS
CreateObject(1362,2516.24536133,-1669.29980469,13.43292999,0.00000000,0.00000000,0.00000000); //object(cj_firebin) (3) GS
CreateObject(1431,2514.69580078,-1675.14978027,13.24224472,0.00000000,0.00000000,0.00000000); //object(dyn_box_pile) (1) GS
CreateObject(1431,2514.71704102,-1671.79187012,13.15456581,0.00000000,0.00000000,0.00000000); //object(dyn_box_pile) (2) GS
CreateObject(1431,2514.68920898,-1672.58691406,13.17463303,0.00000000,0.00000000,0.00000000); //object(dyn_box_pile) (3) GS
CreateObject(1431,2516.28930664,-1676.75341797,13.56203365,0.00000000,0.00000000,268.00000000); //object(dyn_box_pile) (4) GS
CreateObject(3633,2515.03784180,-1676.83190918,13.28686810,0.00000000,0.00000000,0.00000000); //object(imoildrum4_las) (1) GS
CreateObject(3577,2517.92773438,-1666.08984375,13.95183563,0.00000000,0.00000000,0.00000000); //object(dockcrates1_la) (1) GS

return 1;
}

public OnGameModeExit()
{
return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783,1343.1572,15.3746);
SetPlayerCameraPos(playerid, 1952.4663,1343.2915,15.3746);
SetPlayerCameraLookAt(playerid, 1952.4663,1343.2915,15.3746);
SetPlayerTeamFromClass(playerid, classid);
return 1;
}

public OnPlayerConnect(playerid)
{
    new pname[MAX_PLAYER_NAME], string[22 + MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    format(string, sizeof(string), "%s se spojio na server.", pname);
    SendClientMessageToAll(0xAAAAAAAA, string);
return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    new pname[MAX_PLAYER_NAME], string[39 + MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    switch(reason)
    {
        case 0: format(string, sizeof(string), "%s je otisao sa servera. (Izgubljena konekcija)", pname);
        case 1: format(string, sizeof(string), "%s je otisao sa servera. (Odlazi)", pname);
        case 2: format(string, sizeof(string), "%s je otisao sa servera. (Kickovan)", pname);
    }
    SendClientMessageToAll(0xAAAAAAAA, string);
    return 1;
}

public OnPlayerSpawn(playerid)
{
return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}

public OnVehicleSpawn(vehicleid)
{
return 1;
}

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

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

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/Help", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,TEAM_GROVE_COLOR,"Ako si Grove kucaj /Grove !");
SendClientMessage(playerid,TEAM_BALLA_COLOR,"Ako si Ballas kucaj /Ballas !");
SendClientMessage(playerid,COLOR_WHITE,"Za ostale komande kucaj: /cmds !");
SendClientMessage(playerid,COLOR_WHITE,"Da pogledas pravila kucaj /Rules!");
return 1;
}
if (strcmp("/H", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,TEAM_GROVE_COLOR,"Ako si Grove kucaj /Grove !");
SendClientMessage(playerid,TEAM_BALLA_COLOR,"Ako si Ballas kucaj /Ballas !");
SendClientMessage(playerid,COLOR_WHITE,"Za ostale komande kucaj: /cmds !");
SendClientMessage(playerid,COLOR_WHITE,"Da pogledas pravila kucaj /Rules!");
return 1;
}
if (strcmp("/CMDS", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,COLOR_WHITE,"Komande:/GrovE i /GE = Prikazuju sve vezano za Grove!");
SendClientMessage(playerid,COLOR_WHITE,"Komande:/BallaS i /BS = Prikazuju sve vezano za Ballase!");
SendClientMessage(playerid,COLOR_WHITE,"Komande:/OpremE i /OE = Prikazuju sve Opreme koje se mogu uzeti!");
SendClientMessage(playerid,COLOR_WHITE,"Komande:/MoneY i /MY = Dodaju odredjenu kolicinu novca!");
SendClientMessage(playerid,COLOR_WHITE,"Komande:/Heal i /HP = Dopunjuju health!");
SendClientMessage(playerid,COLOR_WHITE,"Komande:/ArmoR i /AR = Stavljaju armor na igraca!");
SendClientMessage(playerid,COLOR_WHITE,"Komande:/OstalO i /OO = Prikazuju ostale komande!");
return 1;
}
if (strcmp("/GrovE",cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,COLOR_WHITE,"Komande:/GOprema i /GO daju clanu Grovea opremu od G!");
SendClientMessage(playerid,COLOR_WHITE,"Komande:/GreenWood i /GW daju clanu Grovea auto Greenwood!");
SendClientMessage(playerid,COLOR_WHITE,"Komande:/GSkin i /GS daju clanu Grovea skin od G!");
return 1;
}
if (strcmp("/GE",cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,COLOR_WHITE,"Komande:/GOprema i /GO daju clanu Grovea opremu od G!");
SendClientMessage(playerid,COLOR_WHITE,"Komande:/GreenWood i /GW daju clanu Grovea auto Greenwood!");
SendClientMessage(playerid,COLOR_WHITE,"Komande:/GSkin i /GS daju clanu Grovea skin od G!");
return 1;
}
if (strcmp("/BallaS",cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,COLOR_WHITE,"Komande:/BOprema i /BO daju clanu Ballasa opremu od B!");
SendClientMessage(playerid,COLOR_WHITE,"Komande:/SlamWan i /SW daju clanu Ballasa auto Slamwan!");
SendClientMessage(playerid,COLOR_WHITE,"Komande:/BSkin i /BS daju clanu Ballasa skin od B!");
return 1;
}
    if (strcmp("/BS",cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,COLOR_WHITE,"Komande:/BOprema i /BO daju clanu Ballasa opremu od B!");
SendClientMessage(playerid,COLOR_WHITE,"Komande:/SlamWan i /SW daju clanu Ballasa auto Slamwan!");
SendClientMessage(playerid,COLOR_WHITE,"Komande:/BSkin i /BS daju clanu Ballasa skin od B!");
return 1;
}
if(strcmp("/Rules",cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,COLOR_WHITE,"Pravila:");
SendClientMessage(playerid,COLOR_WHITE,"Ovako,sva slova u komandama koja su velika znaci da je to ta komanda samo skracena.");
SendClientMessage(playerid,COLOR_WHITE,"Dakle ovo je DeathMatch server kojeg je napravio : Dota Black koji uci da skripta i ovo mu je prvi gamemode.");
SendClientMessage(playerid,COLOR_WHITE,"Nemamo puno pravila ali Grove Street i Ballasi su najveci neprijatelji i oni treba da se ubijaju ali da izbegavaju civile.");
SendClientMessage(playerid,COLOR_WHITE,"Nadamo se da cete uzivati.");
SendClientMessage(playerid,COLOR_WHITE,"by Dota!");
return 1;
}
if(strcmp("/RLS",cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,COLOR_WHITE,"Pravila:");
SendClientMessage(playerid,COLOR_WHITE,"Ovako,sva slova u komandama koja su velika znaci da je to ta komanda samo skracena.");
SendClientMessage(playerid,COLOR_WHITE,"Dakle ovo je DeathMatch server kojeg je napravio : Dota Black koji uci da skripta i ovo mu je prvi gamemode.");
SendClientMessage(playerid,COLOR_WHITE,"Nemamo puno pravila ali Grove Street i Ballasi su najveci neprijatelji i oni treba da se ubijaju ali da izbegavaju civile.");
SendClientMessage(playerid,COLOR_WHITE,"Nadamo se da cete uzivati.");
SendClientMessage(playerid,COLOR_WHITE,"by Dota!");
return 1;
}
if(strcmp("/Die",cmdtext, true, 10) == 0)
{
    SetPlayerHealth(playerid,0);
    return 1;
}
if(strcmp("/D",cmdtext, true, 10) == 0)
{
    SetPlayerHealth(playerid,0);
    return 1;
}
if(strcmp("/GS1",cmdtext, true, 10) == 0)
{
    MoveObject(GSKapija1,2480.6865234375,-1688.169921875,10.732063293457,2.0);
      SetTimer("GSKapija2", 5000, 0);
    return 1;
}
if(strcmp("/GS2",cmdtext, true, 10) == 0)
{
      MoveObject(GSKapija2,2476.7673339844,-1672.4587402344,14.046336174011,2.0);
      SetTimer("GSKapija1", 5000, 0);
    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)
{
    SetPlayerToTeamColor(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 0;
}

SetPlayerTeamFromClass(playerid, classid)
{
if (classid == 0)
{
gTeam[playerid] = TEAM_GROVE;
}
if (classid == 1)
{
gTeam[playerid] = TEAM_BALLA;
}
if (classid == 2)
{
    gTeam[playerid] = TEAM_AZTECA;
}
}

SetPlayerToTeamColor(playerid)
{
if (gTeam[playerid] == TEAM_GROVE)
{
SetPlayerColor(playerid, TEAM_GROVE_COLOR);
}
if (gTeam[playerid] == TEAM_BALLA)
{
SetPlayerColor(playerid, TEAM_BALLA_COLOR);
}
  else if (gTeam[playerid] == TEAM_AZTECA)
  {
      SetPlayerColor(playerid, TEAM_AZTECA_COLOR);
}
}

public GSZatvori1()
{
MoveObject(GSKapija1,2480.68676758,-1688.17016602,14.23200989,2.0);
return 1;
}

public GSZatvori2()
{
MoveObject(GSKapija2,2477.08496094,-1663.79150391,14.04633617,2.0);
return 1;
}


I zasto mi se vrata nezatvore?To jeste glupo pitanje ali zasto ako neko moze sve ovo da objasni hvala mu

kolko ja vidim jos neznas ovo napraviti akda napravis kod ballasa moras staviti naprimer gTeam[playerid] = BALAS; a naj pre kod define trebas staviti #define BALAS 1
i kada stavis svoju komandu sada cu ti lakose pojasniti ovako if(strcmp(cmd, "/balas", true) == 0) {
SendClientMessage(playerid, BOJA, "Sada si clan BALASA-a!!");
        SendClientMessage(playerid, BOJA, "Komande su ti:Tvoje komande");
        gTeam[playerid] = BALAS;
        GameTextForAll("Igrac je sada BALAS!!",6000,4);
SetPlayerColor(playerid, BOJA);
SetPlayerScore(playerid,Score ako zelis);
SetPlayerPos(playerid, pozicija de se stvara);
GivePlayerWeapon(playerid, oruzije, metkovi);
SetPlayerSkin(playerid, skin);
return 1;
}

black_dota

nzm ja sam citao sa samp wiki sta je pisalo

EDIT:DOk nisam ubacio los aztecas bilo je da uzmes ballas skin i on te sam ubaci u njih

EDIT 2: Meni ne treba komanda sa kojom cu ja postati deo bande nego cim uzemm neki skin on m eodma ubaci ako shvatate

EDIT 3:Snasao sam se :)
Poslednja Izmena: Jul 31, 2010, 17:02:09 POSLE PODNE od black_dota

ok nego da te pitam jeli ti kada restartujes server jel ti ostane ista org ?

black_dota

Citat: [AdmTeam]_jovan poslato Jul 31, 2010, 17:10:55 POSLE PODNE
ok nego da te pitam jeli ti kada restartujes server jel ti ostane ista org ?
Ne kontam kako to mislis ? Pravim nesto sto si mi ti rekao nesto slicno nisam jos sve zavrsio ali mi radi/ostane

EDIT: A mislis dali mi igrac ostaje u org? Vidi ja uzmem neki peti skin od bilo koje org i onda kucam npr /gsm da budem member gsa
Poslednja Izmena: Jul 31, 2010, 17:27:36 POSLE PODNE od black_dota

vidi znaci ako sada ti ukucas /balas on te ubaci u balase ti izadjes sa servera restartujes server i opet udjes i dali ce on ostati u balasima ?

black_dota

nzm nisam probao mislim da ne ostane