[TuT] Kako Napraviti War Garazu

Započeo [LOb]mistic144, Januar 02, 2013, 23:48:43 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Eto jedan Tutorial i Od Mene

Na Vrh Skrpite dodajte

new warg;
new warz;
new wark;
new war = 0;
new uWaru[MAX_PLAYERS];
new warTim[2];
new wSkor[2];
new warTime;
new wSmrti[MAX_PLAYERS];
new wUbistva[MAX_PLAYERS];

new Float:warSpawn1[][3] = {
{-1131.7413,1050.1171,1345.7476}, // pos 1
{-1132.8763,1022.7161,1345.7284}, // pos 2
{-1133.2491,1096.1432,1345.8014} // pos 3
};
new Float:warSpawn2[][3] = {
{-971.9217,1095.8650,1344.9910}, // pos 4
{-971.8383,1068.3083,1345.0140}, // pos 5
{-977.8536,1025.1980,1345.0186} // pos 6
};



Zatim ovo dodate u OnPlayerPickUpPickup

if(pickupid == warg)
{
      PlayerPlaySound(playerid,5024, 0, 0, 0);
      SendClientMessage(playerid,0xFFD700AA,"WG | WAR GARAZA | UÅ LI STE U WAR GARAZU ");
      SetPlayerPos(playerid,2038.90002441,-1297.80004883,10.60000038);
      return 1;
      }
if(pickupid == warz)
{
      PlayerPlaySound(playerid, 5026, 0, 0, 0);
   SendClientMessage(playerid,0xFFD700AA,"WG | WAR GARAZA IZASLI STE IZ WAR GARAZE");
      SetPlayerPos(playerid,2035.59997559,-1295.09997559,20.39999962);
      return 1;
      }
if(pickupid == wark)
{
      PlayerPlaySound(playerid, 1242, 0, 0, 0);
      SendClientMessage(playerid,0xFFD700AA,"WG | War:/warpozovi (id)/pokreniwar (id-id org)- id org je oznacen u zagradama/prekiniwar");
      SendClientMessage(playerid, LIGHTRED, "|_________________________________________________________________________________|");
SendClientMessage(playerid, 0x33CCFFAA, "1.Police Departament || 2.Federal Bureau of Investigation || 3.S.W.A.T || 4.MD ");
SendClientMessage(playerid, 0x33CCFFAA, "5.Yakuze || 6.L.C.N || 7.Gradonacalnik || 8.Hitman || 9.CNN || 10.Taxi || 12.Ballas");
SendClientMessage(playerid, 0x33CCFFAA, "13.Los Surenos || 14.Carbon Racer's || 15.GSF || 16.NGR || 17.Armija");
SendClientMessage(playerid, LIGHTRED, "|_________________________________________________________________________________|");
      return 1;
      }


Zatim ovo Dodate u OnGameModeInit

    warg = CreatePickup(19131,2,2035.9000244141,-1300.0999755859,20.89999961853);
warz = CreatePickup(19133,2,2039.19995117,-1292.40002441,10.69999981);
    wark = CreatePickup(19134,2,2047.09997559,-1296.30004883,10.89999962);


//-----------------------War Garaza-----------------//    // Ovo Su objekti za War Garazu
CreateDynamicObject(16773,1536.1457519,-1451.3265381,15.8847885,0.0000000,0.0000000,0.0000000); //object(door_savhangr1)(2)
CreateDynamicObject(14798,2045.5000000,-1297.5999756,11.1000004,0.0000000,0.0000000,0.0000000); //object(int_kbsgarage3)(1)
CreateDynamicObject(14797,2047.0999756,-1297.6999512,11.1999998,0.0000000,0.0000000,359.7500000); //object(int_kbsgarage3b)(3)
CreateDynamicObject(5061,2038.0000000,-1295.0000000,11.5000000,0.0000000,0.0000000,0.0000000); //object(lascarl)(1)
CreateDynamicObject(5061,2038.0000000,-1302.0000000,11.5000000,0.0000000,0.0000000,0.0000000); //object(lascarl)(2)
CreateDynamicObject(2947,1535.3859863,-1451.3601074,12.3828125,0.0000000,0.0000000,270.6756592); //object(cr_door_01)(1)


Zatim Ovo dodate U  OnPlayerDeath

if(killerid != INVALID_PLAYER_ID)
{
    new oruzije[32];
GetWeaponName(reason,oruzije,sizeof(oruzije));
if(uWaru[playerid] == 1 && war == 1)
{
    if(PlayerInfo[playerid][pMember] == warTim[0] || PlayerInfo[playerid][pLeader] == warTim[0])
    {
wSkor[1]++;
wUbistva[killerid]++;
wSmrti[playerid]++;
foreach(Player, i)
{
if(PlayerInfo[i][pLeader] == warTim[0] || PlayerInfo[i][pLeader] == warTim[1] || PlayerInfo[i][pMember] == warTim[0] || PlayerInfo[i][pMember] == warTim[1])
{
    format(string, sizeof(string), "{F3FF02}%s {FFFFFF}je ubio {F3FF02}%s | {FFFFFF}%s", GetPlayerNameEx(killerid), GetPlayerNameEx(playerid), oruzije);
SendClientMessage(i, 0xAFAFAFFF, string);
}
}
    }
    else if(PlayerInfo[playerid][pMember] == warTim[1] || PlayerInfo[playerid][pLeader] == warTim[1])
    {
        wSkor[0]++;
wUbistva[killerid]++;
wSmrti[playerid]++;
foreach(Player, i)
{
if(PlayerInfo[i][pLeader] == warTim[0] || PlayerInfo[i][pLeader] == warTim[1] || PlayerInfo[i][pMember] == warTim[0] || PlayerInfo[i][pMember] == warTim[1])
{
    format(string, sizeof(string), "{F3FF02}%s {FFFFFF}je ubio {F3FF02}%s | {FFFFFF}%s", GetPlayerNameEx(killerid), GetPlayerNameEx(playerid), oruzije);
SendClientMessage(i, 0xAFAFAFFF, string);
}
}
    }
}
}



Ovo Dodate na Dno Skripte

stock KrajWara()
{
new string[128], pid;
if(war == 1)
{
    foreach(Player, i)
    {
        if(uWaru[i])
        {
if(wSkor[0] > wSkor[1])
{
    pid = warTim[0];
    format(string, sizeof(string), "Pobjednik: ~g~%s", GetOrgNameEx(pid));
GameTextForPlayer(i, string, 15000, 5);
}
else if(wSkor[1] > wSkor[0])
{
    pid = warTim[1];
    format(string, sizeof(string), "Pobjednik: ~g~%s", GetOrgNameEx(pid));
GameTextForPlayer(i, string, 15000, 5);
}
else
{
    GameTextForPlayer(i, "Nerijeseno", 15000, 5);
}
foreach(Player, b)
{
    if(uWaru[b] == 1)
    {
        if(PlayerInfo[b][pMember] == warTim[0] || PlayerInfo[b][pLeader] == warTim[0])
        {
            format(string, sizeof(string), "{F81414}%s | {FFFFFF}Ubistva: %d | Smrti: %d |",GetPlayerNameEx(b), wUbistva[b], wSmrti[b]);
            SendClientMessage(i, -1, string);
        }
        else if(PlayerInfo[b][pMember] == warTim[1] || PlayerInfo[b][pLeader] == warTim[1])
        {
                            format(string, sizeof(string), "{F81414}%s | {FFFFFF}Ubistva: %d | Smrti: %d |",GetPlayerNameEx(b), wUbistva[b], wSmrti[b]);
            SendClientMessage(i, -1, string);
        }
    }
}
}
}
foreach(Player, i)
{
if(PlayerInfo[i][pLeader] == warTim[0] || PlayerInfo[i][pLeader] == warTim[1] || PlayerInfo[i][pMember] == warTim[0] || PlayerInfo[i][pMember] == warTim[1])
{
uWaru[i] = 0;
    SpawnPlayer(i);
}
}
war = 0;
  warTim[0] = 0;
    warTim[1] = 0;
}
return 1;
}
CMD:prekiniwar(playerid, params[])
{
    KrajWara();
return 1;
}
CMD:warpozovi(playerid, params[])
{
new id;
if(PlayerToPoint(15.0,playerid,2047.09997559,-1296.30004883,10.89999962))
{
if(PlayerInfo[playerid][pLeader] > 5 || PlayerInfo[playerid][pLeader] > 6 || PlayerInfo[playerid][pLeader] > 12 || PlayerInfo[playerid][pLeader] > 15 || PlayerInfo[playerid][pLeader] > 16)
{
    if(sscanf(params, "u", id)) SendClientMessage(playerid, 0xAFAFAFFF, ""COL_SVPLAVA"[OG] Pomoc"COL_WHITE": /warpozovi (ID Igraca)-morate isvoj unjeti ide dabi bili pozvani");
else
{
    uWaru[id] = 1;
    new string[128];
    format(string, sizeof(string), "{F81414}Lider {FFFFFF}%s {F81414}vas je pozvao u war!", GetPlayerNameEx(playerid));
SendClientMessage(id, 0xAFAFAFFF, string);
format(string, sizeof(string), "{F81414}Pozvali ste {FFFFFF}%s {F81414}u war!", GetPlayerNameEx(id));
SendClientMessage(playerid, 0xAFAFAFFF, string);
    }
}
}
else
{
     SendClientMessage(playerid, 0xAFAFAFFF, "Niste ovlasteni ili niste u War Garazi!");
}
return 1;
}
CMD:pokreniwar(playerid, params[])
{
new o1, o2, a[MAX_PLAYERS];
if(PlayerInfo[playerid][pLeader] > 5 || PlayerInfo[playerid][pLeader] > 6 || PlayerInfo[playerid][pLeader] > 12 || PlayerInfo[playerid][pLeader] > 15 || PlayerInfo[playerid][pLeader] > 16)
{
    if(war == 0)
    {
    if(sscanf(params, "dd", o1, o2)) SendClientMessage(playerid, 0xAFAFAFFF, ""COL_SVPLAVA"[OG] Pomoc"COL_WHITE": /pokreniwar (ID Orge 1) (ID Orge 2)");
else
{
    warTim[0] = o1;
    warTim[1] = o2;
    warTime = 0;
    wSkor[0] = 0;
    wSkor[1] = 0;
    war = 1;
foreach(Player, i)
{
    if(uWaru[i] == 1)
    {
        if(PlayerInfo[i][pLeader] != 0)
        {
            a[i] = PlayerInfo[i][pLeader];
        }
        else
        {
            a[i] = PlayerInfo[i][pMember];
        }
        if(a[i] == warTim[0] || a[i] == warTim[1])
{
    uWaru[i] = 1;
    wSmrti[i] = 0;
    wUbistva[i] = 0;
    SpawnPlayer(i);
    SendClientMessage(i, 0xAFAFAFFF, "{FFFFFF}Pokrenuli ste War!");
}
    }
}

    }
}
else
{
    SendClientMessage(playerid, 0xAFAFAFFF, "Vec je pokrenut war!");
}
}
else
{
     SendClientMessage(playerid, 0xAFAFAFFF, "Niste ovlasteni da koristite ovu komandu!");
}
return 1;
}
stock GetPlayerNameEx(playerid)
{
new string[64];
    GetPlayerName(playerid,string,24);
    new str[24];
    strmid(str,string,0,strlen(string),24);
    for(new i = 0; i < MAX_PLAYER_NAME; i++)
    {
        if (str[i] == '_') str[i] = ' ';
    }
    return str;
}
stock GetOrgNameEx(id)
{
new admtext[32];
if(id == 1) admtext = "MUP";
else if(id == 2)  admtext = "FBI";
else if(id == 3)  admtext = "SWAT";
else if(id == 4)  admtext = "Medicinska Sluzba";
else if(id == 5)  admtext = "Yakuza";
else if(id == 6)  admtext = "L C N";
else if(id == 7)  admtext = "Gradonacelnik";
else if(id == 8)  admtext = "Hitman";
else if(id == 9)  admtext = "LSN";
else if(id == 10)  admtext = "Taxi";
else if(id == 12)  admtext = "Ballas";
else if(id == 13)  admtext = "Los Surenos";
else if(id == 14)  admtext = "Blue Gang";
else if(id == 15)  admtext = "Grove Street";
else if(id == 16)  admtext = "Blue Gang";
else if(id == 17)  admtext = "Armija";
else admtext = "none";
return admtext;
}



Eto To je to Nadam se Da Sam Vam pomogao
Ako sto nije Uredu napisite mi u komentaru pa cu ispravit
Neke Slike:

http://www.zaslike.com/viewer.php?file=667p781dpsvc3t8yi6lc.png

http://www.zaslike.com/viewer.php?file=2ewspdfmxnwpb0nv7ls0.png

http://www.zaslike.com/viewer.php?file=xt2hmtcjjlv1e49igq65.png

http://www.zaslike.com/viewer.php?file=igi2kplfyz90psnnzngr.png


Ocjenite me od 1/10
Poslednja Izmena: Januar 03, 2013, 00:12:45 PRE PODNE od [WG:RP]mistic144
Trazimo Mapera Koji zna sto radi,koji je ozbiljan i da mi posalje neke radove na pm i koliko je spreman vremena dnevno odvojiti na mapanje.||Nagrada 1337 Admin||

Ovo ti ništa ne valja, samo je za GF, ništa nije objašnjeno, čista 0.
Lock.