[Pomoc] war spawn nece

Započeo [GU:RP] Ivica, Novembar 21, 2012, 23:07:08 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:cyber
Detaljan opis problema:imam war sistem sve suoer radi osim spawna dakle budemo u waru frend me ubije trebao bi se ja spawnat na mapi koja je zadana ali se ne spawnan ako sam u banid ili nekog ogr tu se spawnan ili ako nisam u nicemu spawn se na kolodvoru ali sam u waru i trebam opet da se spawnanm ali nista molim vas hitno pomoc
Dio skripte:
Neke slike/video za lakse dobivanje pomoci(neobavezno):


molim vas zna netko aniste shvatili poslije smrti se ne spawnam u waru a trebam


da imam to ali imam vise mapa i igram na svima kako da u jednom ubacim ako je recimo u farma maoi ubije ga igrac u waru i opet se spawn ili ako je u skladistu ubije ga se opet se spawna u skladistu


Dodas unewove :

new uwaru[MAX_PLAYERS];
i onda dodas u komandi za ulazak u war :
uwaru[playerid] = 1;

i onda pod OnPlayerSpawn dodas


if(uwaru[playerid] == 1)
{
SetPlayerPos(playerid,X,Y,Z);
}
ODSUTAN

daniele imam to sve samo drufa definicna IgracuWaru

evo ovo mi je pod onplayerspawn

if(WarAktivan == true && IgracUWaru[playerid] == 1)
{
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid, 7007);
if(WarMapa == 1)
{
    if(WarTim1 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(FarmaTim1));
        SetPlayerPos(playerid, FarmaTim1[rand][0], FarmaTim1[rand][1], FarmaTim1[rand][2]);
        SetPlayerFacingAngle(playerid, FarmaTim1[rand][3]);
}
else if(WarTim2 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(FarmaTim2));
        SetPlayerPos(playerid, FarmaTim2[rand][0], FarmaTim2[rand][1], FarmaTim2[rand][2]);
        SetPlayerFacingAngle(playerid, FarmaTim2[rand][3]);
}
else
{
    SCM(playerid, GRAD2, "(greska) ID tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else if(WarMapa == 2)
{
    if(WarTim1 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(Brod1Tim1));
        SetPlayerPos(playerid, Brod1Tim1[rand][0], Brod1Tim1[rand][1], Brod1Tim1[rand][2]);
        SetPlayerFacingAngle(playerid, Brod1Tim1[rand][3]);
}
else if(WarTim2 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(Brod1Tim2));
        SetPlayerPos(playerid, Brod1Tim2[rand][0], Brod1Tim2[rand][1], Brod1Tim2[rand][2]);
        SetPlayerFacingAngle(playerid, Brod1Tim2[rand][3]);
}
else
{
    SCM(playerid, GRAD2, "(greska) ID tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else if(WarMapa == 3)
{
    if(WarTim1 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(Brod2Tim1));
        SetPlayerPos(playerid, Brod2Tim1[rand][0], Brod2Tim1[rand][1], Brod2Tim1[rand][2]);
        SetPlayerFacingAngle(playerid, Brod2Tim1[rand][3]);
}
else if(WarTim2 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(Brod2Tim2));
        SetPlayerPos(playerid, Brod2Tim2[rand][0], Brod2Tim2[rand][1], Brod2Tim2[rand][2]);
        SetPlayerFacingAngle(playerid, Brod2Tim2[rand][3]);
}
else
{
    SCM(playerid, GRAD2, "(greska) ID tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else if(WarMapa == 4)
{
    if(WarTim1 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(BullSeloTim1));
        SetPlayerPos(playerid, BullSeloTim1[rand][0], BullSeloTim1[rand][1], BullSeloTim1[rand][2]);
        SetPlayerFacingAngle(playerid, BullSeloTim1[rand][3]);
}
else if(WarTim2 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(BullSeloTim2));
        SetPlayerPos(playerid, BullSeloTim2[rand][0], BullSeloTim2[rand][1], BullSeloTim2[rand][2]);
        SetPlayerFacingAngle(playerid, BullSeloTim2[rand][3]);
}
else
{
    SCM(playerid, GRAD2, "(greska) ID tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else if(WarMapa == 5)
{
    if(WarTim1 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(UrbanTim1));
        SetPlayerPos(playerid, UrbanTim1[rand][0], UrbanTim1[rand][1], UrbanTim1[rand][2]);
        SetPlayerFacingAngle(playerid, UrbanTim1[rand][3]);
}
else if(WarTim2 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(UrbanTim2));
        SetPlayerPos(playerid, UrbanTim2[rand][0], UrbanTim2[rand][1], UrbanTim2[rand][2]);
        SetPlayerFacingAngle(playerid, UrbanTim2[rand][3]);
}
else
{
    SCM(playerid, GRAD2, "(greska) ID tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else if(WarMapa == 6)
{
    if(WarTim1 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(SkladisteTim1));
        SetPlayerPos(playerid, SkladisteTim1[rand][0], SkladisteTim1[rand][1], SkladisteTim1[rand][2]);
        SetPlayerFacingAngle(playerid, SkladisteTim1[rand][3]);
}
else if(WarTim2 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(SkladisteTim2));
        SetPlayerPos(playerid, SkladisteTim2[rand][0], SkladisteTim2[rand][1], SkladisteTim2[rand][2]);
        SetPlayerFacingAngle(playerid, SkladisteTim2[rand][3]);
}
else
{
    SCM(playerid, GRAD2, "(greska) ID tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else if(WarMapa == 7)
{
    if(WarTim1 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(DesertTim1));
        SetPlayerPos(playerid, DesertTim1[rand][0], DesertTim1[rand][1], DesertTim1[rand][2]);
        SetPlayerFacingAngle(playerid, DesertTim1[rand][3]);
}
else if(WarTim2 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(DesertTim2));
        SetPlayerPos(playerid, DesertTim2[rand][0], DesertTim2[rand][1], DesertTim2[rand][2]);
        SetPlayerFacingAngle(playerid, DesertTim2[rand][3]);
}
else
{
    SCM(playerid, GRAD2, "(greska) ID tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else if(WarMapa == 8)
{
    if(WarTim1 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(TvornicaTim1));
        SetPlayerPos(playerid, TvornicaTim1[rand][0], TvornicaTim1[rand][1], TvornicaTim1[rand][2]);
        SetPlayerFacingAngle(playerid, TvornicaTim1[rand][3]);
}
else if(WarTim2 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(TvornicaTim2));
        SetPlayerPos(playerid, TvornicaTim2[rand][0], TvornicaTim2[rand][1], TvornicaTim2[rand][2]);
        SetPlayerFacingAngle(playerid, TvornicaTim2[rand][3]);
}
else
{
    SCM(playerid, GRAD2, "(greska) ID tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else if(WarMapa == 9)
{
    if(WarTim1 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(Farma2Tim1));
        SetPlayerPos(playerid, Farma2Tim1[rand][0], Farma2Tim1[rand][1], Farma2Tim1[rand][2]);
        SetPlayerFacingAngle(playerid, Farma2Tim1[rand][3]);
}
else if(WarTim2 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(Farma2Tim2));
        SetPlayerPos(playerid, Farma2Tim2[rand][0], Farma2Tim2[rand][1], Farma2Tim2[rand][2]);
        SetPlayerFacingAngle(playerid, Farma2Tim2[rand][3]);
}
else
{
    SCM(playerid, GRAD2, "(greska) ID tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else if(WarMapa == 10)
{
    if(WarTim1 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(RuinsTim1));
        SetPlayerPos(playerid, RuinsTim1[rand][0], RuinsTim1[rand][1], RuinsTim1[rand][2]);
        SetPlayerFacingAngle(playerid, RuinsTim1[rand][3]);
}
else if(WarTim2 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(RuinsTim2));
        SetPlayerPos(playerid, RuinsTim2[rand][0], RuinsTim2[rand][1], RuinsTim2[rand][2]);
        SetPlayerFacingAngle(playerid, RuinsTim2[rand][3]);
}
else
{
    SCM(playerid, GRAD2, "(greska) ID tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
  else return SCM(playerid, GRAD2, "(greska) Nepoznata mapa, nemoguce spawnati se!");
GivePlayerWeapon(playerid, 24, 100);
GivePlayerWeapon(playerid, 29, 1000);
GivePlayerWeapon(playerid, 31, 1000);
GivePlayerWeapon(playerid, 33, 50);
SetPlayerHealth(playerid, 100);
}

molim vas zna li netko sve sam pokusao i citav dan pokusavam da rijesim,ali bezuspjesno


Kako bi bilo da ispraznis svoje postansko sanduce odnosno da obrises poruke, vec 2 dana mi saljes PM, a ne mogu da ti odgovorim jer ti je pun Inbox  ::) ::)



evo dio za spawn di treba

if(WarAktivan == true && IgracUWaru[playerid] == 1)
{
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid, 7007);
if(WarMapa == 1)
{
    if(WarTim1 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(FarmaTim1));
        SetPlayerPos(playerid, FarmaTim1[rand][0], FarmaTim1[rand][1], FarmaTim1[rand][2]);
        SetPlayerFacingAngle(playerid, FarmaTim1[rand][3]);
}
else if(WarTim2 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(FarmaTim2));
        SetPlayerPos(playerid, FarmaTim2[rand][0], FarmaTim2[rand][1], FarmaTim2[rand][2]);
        SetPlayerFacingAngle(playerid, FarmaTim2[rand][3]);
}
else
{
    SCM(playerid, GRAD2, "(greska) ID tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else if(WarMapa == 2)
{
    if(WarTim1 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(Brod1Tim1));
        SetPlayerPos(playerid, Brod1Tim1[rand][0], Brod1Tim1[rand][1], Brod1Tim1[rand][2]);
        SetPlayerFacingAngle(playerid, Brod1Tim1[rand][3]);
}
else if(WarTim2 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(Brod1Tim2));
        SetPlayerPos(playerid, Brod1Tim2[rand][0], Brod1Tim2[rand][1], Brod1Tim2[rand][2]);
        SetPlayerFacingAngle(playerid, Brod1Tim2[rand][3]);
}
else
{
    SCM(playerid, GRAD2, "(greska) ID tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else if(WarMapa == 3)
{
    if(WarTim1 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(Brod2Tim1));
        SetPlayerPos(playerid, Brod2Tim1[rand][0], Brod2Tim1[rand][1], Brod2Tim1[rand][2]);
        SetPlayerFacingAngle(playerid, Brod2Tim1[rand][3]);
}
else if(WarTim2 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(Brod2Tim2));
        SetPlayerPos(playerid, Brod2Tim2[rand][0], Brod2Tim2[rand][1], Brod2Tim2[rand][2]);
        SetPlayerFacingAngle(playerid, Brod2Tim2[rand][3]);
}
else
{
    SCM(playerid, GRAD2, "(greska) ID tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else if(WarMapa == 4)
{
    if(WarTim1 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(BullSeloTim1));
        SetPlayerPos(playerid, BullSeloTim1[rand][0], BullSeloTim1[rand][1], BullSeloTim1[rand][2]);
        SetPlayerFacingAngle(playerid, BullSeloTim1[rand][3]);
}
else if(WarTim2 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(BullSeloTim2));
        SetPlayerPos(playerid, BullSeloTim2[rand][0], BullSeloTim2[rand][1], BullSeloTim2[rand][2]);
        SetPlayerFacingAngle(playerid, BullSeloTim2[rand][3]);
}
else
{
    SCM(playerid, GRAD2, "(greska) ID tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else if(WarMapa == 5)
{
    if(WarTim1 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(UrbanTim1));
        SetPlayerPos(playerid, UrbanTim1[rand][0], UrbanTim1[rand][1], UrbanTim1[rand][2]);
        SetPlayerFacingAngle(playerid, UrbanTim1[rand][3]);
}
else if(WarTim2 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(UrbanTim2));
        SetPlayerPos(playerid, UrbanTim2[rand][0], UrbanTim2[rand][1], UrbanTim2[rand][2]);
        SetPlayerFacingAngle(playerid, UrbanTim2[rand][3]);
}
else
{
    SCM(playerid, GRAD2, "(greska) ID tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else if(WarMapa == 6)
{
    if(WarTim1 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(SkladisteTim1));
        SetPlayerPos(playerid, SkladisteTim1[rand][0], SkladisteTim1[rand][1], SkladisteTim1[rand][2]);
        SetPlayerFacingAngle(playerid, SkladisteTim1[rand][3]);
}
else if(WarTim2 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(SkladisteTim2));
        SetPlayerPos(playerid, SkladisteTim2[rand][0], SkladisteTim2[rand][1], SkladisteTim2[rand][2]);
        SetPlayerFacingAngle(playerid, SkladisteTim2[rand][3]);
}
else
{
    SCM(playerid, GRAD2, "(greska) ID tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else if(WarMapa == 7)
{
    if(WarTim1 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(DesertTim1));
        SetPlayerPos(playerid, DesertTim1[rand][0], DesertTim1[rand][1], DesertTim1[rand][2]);
        SetPlayerFacingAngle(playerid, DesertTim1[rand][3]);
}
else if(WarTim2 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(DesertTim2));
        SetPlayerPos(playerid, DesertTim2[rand][0], DesertTim2[rand][1], DesertTim2[rand][2]);
        SetPlayerFacingAngle(playerid, DesertTim2[rand][3]);
}
else
{
    SCM(playerid, GRAD2, "(greska) ID tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else if(WarMapa == 8)
{
    if(WarTim1 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(TvornicaTim1));
        SetPlayerPos(playerid, TvornicaTim1[rand][0], TvornicaTim1[rand][1], TvornicaTim1[rand][2]);
        SetPlayerFacingAngle(playerid, TvornicaTim1[rand][3]);
}
else if(WarTim2 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(TvornicaTim2));
        SetPlayerPos(playerid, TvornicaTim2[rand][0], TvornicaTim2[rand][1], TvornicaTim2[rand][2]);
        SetPlayerFacingAngle(playerid, TvornicaTim2[rand][3]);
}
else
{
    SCM(playerid, GRAD2, "(greska) ID tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else if(WarMapa == 9)
{
    if(WarTim1 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(Farma2Tim1));
        SetPlayerPos(playerid, Farma2Tim1[rand][0], Farma2Tim1[rand][1], Farma2Tim1[rand][2]);
        SetPlayerFacingAngle(playerid, Farma2Tim1[rand][3]);
}
else if(WarTim2 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(Farma2Tim2));
        SetPlayerPos(playerid, Farma2Tim2[rand][0], Farma2Tim2[rand][1], Farma2Tim2[rand][2]);
        SetPlayerFacingAngle(playerid, Farma2Tim2[rand][3]);
}
else
{
    SCM(playerid, GRAD2, "(greska) ID tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else if(WarMapa == 10)
{
    if(WarTim1 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(RuinsTim1));
        SetPlayerPos(playerid, RuinsTim1[rand][0], RuinsTim1[rand][1], RuinsTim1[rand][2]);
        SetPlayerFacingAngle(playerid, RuinsTim1[rand][3]);
}
else if(WarTim2 == PlayerInfo[playerid][Clan])
    {
        new rand = random(sizeof(RuinsTim2));
        SetPlayerPos(playerid, RuinsTim2[rand][0], RuinsTim2[rand][1], RuinsTim2[rand][2]);
        SetPlayerFacingAngle(playerid, RuinsTim2[rand][3]);
}
else
{
    SCM(playerid, GRAD2, "(greska) ID tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
  else return SCM(playerid, GRAD2, "(greska) Nepoznata mapa, nemoguce spawnati se!");
GivePlayerWeapon(playerid, 24, 100);
GivePlayerWeapon(playerid, 29, 1000);
GivePlayerWeapon(playerid, 31, 1000);
GivePlayerWeapon(playerid, 33, 50);
SetPlayerHealth(playerid, 100);
}

sad mi radi war spawn ali mi nece spawnat igrace ako su u org mafiji bandi mal sam preuredivao al mi sad nece to jel moguce spawn za org mafiju bandu svesti na jednu varijablu