[REÅ ENO] oko smrti u areni

Započeo Ole, Jun 20, 2016, 17:43:22 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Ole

*

Skripta koju koristim:moja
Detaljan opis problema:kako da napravim da kad igrac umre u nekoj od arena npr.minigundm da se stvori opet u njoj jer sad kad umre stvori se na spawnu.
Dio skripte:[pawn]CMD:minigundm(playerid, params[])
{
if(minigun[playerid] == 0)
               {
                  SetPlayerTeam(playerid, -1);
                      SetPlayerSkin(playerid, 189);
                      SetPlayerHealth(playerid, 100);
                      SetPlayerArmour(playerid, 100);
                      SetPlayerColor(playerid, 0xFFFFFFFF);
                      SetPlayerPos(playerid, 329.8999878,465.6000061,2.0000000);
                      SetPlayerInterior(playerid, 15);
                  ResetPlayerWeapons(playerid);
                  GivePlayerWeapon(playerid, 38, 999999);
                  new name[MAX_PLAYER_NAME];
                  GetPlayerName(playerid, name, sizeof(name));
                  new string[128];
                  format(string, sizeof(string), "%s je usao u Minigun Arenu (/minigundm)!", name);
                   SendClientMessageToAll(orange, string);
                   SendClientMessage(playerid,red -1, "/kill da izadjes iz arene!");
                }
                else return SendClientMessage(playerid, RED,"Ne mozes se pridruziti u Minigun DM! Pokusaj kasnije!");

return 1;
}[/pawn]
Neke slike/video za lakse dobivanje pomoci(neobavezno):///
Poslednja Izmena: Jun 21, 2016, 12:04:51 POSLE PODNE od â–… â–† â–ˆ Rudimental â–ˆ â–† â–…

[pawn]   
[pawn]new uareni[MAX_PLAYERS];

kod komande dodas

uareni[playerid] = 1;

onda dodas kad izlazi iz arene dodas uareni[playerid] = 0;
i to je to dodas kod onplayerconnect uareni[playerid] = 0;


onplayerdeath

if(uareni[playerid] == 1)
{

//ovdeja dodas spawn areni
SetPlayerPos(playerid, 329.8999878,465.6000061,2.0000000);
}

onplayerspawn

if(uareni[playerid] == 1)
{

//ovdeja dodas spawn areni
SetPlayerPos(playerid, 329.8999878,465.6000061,2.0000000);
}[/pawn]
Poslednja Izmena: Jun 20, 2016, 18:26:09 POSLE PODNE od Ilcev1

Ole

*

hvala brate ali gdje da dodam [pawn]SetPlayerPos(playerid, 329.8999878,465.6000061,2.0000000);[/pawn]

Citat: Ole poslato Jun 20, 2016, 18:28:52 POSLE PODNE
hvala brate ali gdje da dodam [pawn]SetPlayerPos(playerid, 329.8999878,465.6000061,2.0000000);[/pawn]
Na OnPlayerDeath dodas provjeru da li je u areni If(uareni[playerid==1) i ako jeste onda to setplayerposition i vec sta jos hoces da mu das opet minigun ili sta vec.
KOPAJ KRIPTOVALUTU TELEFONOM! >>> SAZNAJ VIŠE <<<
POČNI RADITI KAO PREDAVAČ ENGLESKOG JEZIKA! >>> SAZNAJ VIŠE <<<

Ole

*

sve sam tako uradio i sad kad umre u areni spawnuje ga brzo na spawnu  :'( :'(

Definises u publicu OnPlayerSpawn to sto ti je on rekao.. Ali definisi negde odma na pocetku publica.

Ispravka u onplayerspawn, dobro Rudi kaze, moja je greska, radio sam na jednom gamemodu upravo cackao nesto oko onplayerdeath pa mi ostalo hahaha. Ako imas i dalje probleme najbolje da nam kopiras onplayerspawn da vidimo sta ima tu
KOPAJ KRIPTOVALUTU TELEFONOM! >>> SAZNAJ VIŠE <<<
POČNI RADITI KAO PREDAVAČ ENGLESKOG JEZIKA! >>> SAZNAJ VIŠE <<<

Ole

*

sad me spawnuje na obicnom spawnu ali mi ostane skin iz arene  :-X
[pawn]public OnPlayerSpawn(playerid)
{
        if(uareni[playerid] == 1)
   {
         SetPlayerTeam(playerid, -1);
            SetPlayerSkin(playerid, 189);
            SetPlayerHealth(playerid, 100);
            SetPlayerArmour(playerid, 100);
            SetPlayerColor(playerid, 0xFFFFFFFF);
            SetPlayerPos(playerid, 329.8999878,465.6000061,2.0000000);
            SetPlayerInterior(playerid, 15);
            GivePlayerWeapon(playerid, 38, 999999);
    }

   SetPlayerHealth(playerid, 99999.0);
   SetTimerEx("SpawnProtection", 10000, false, "i", playerid);
   SendClientMessage(playerid, red, "*Imas Anti-Spawn kill 10 sekundi!");
   
   AntiSK[playerid] = 1;
   SetPlayerVirtualWorld(playerid, 0);
   SetPlayerInterior(playerid, 0);
   ResetPlayerWeapons(playerid);
   GivePlayerWeapons(playerid);
   UpdateLabelText(playerid);
   TextDrawShowForPlayer(playerid, TeamText[playerid]);
   TextDrawHideForPlayer(playerid, CountText[playerid]);
   UpdateTextdraw(playerid);
   if(FirstSpawn[playerid] == 1)[/pawn]
[pawn]CMD:minigundm(playerid, params[])
{
if(minigun[playerid] == 0)
               {
                    uareni[playerid] = 1;
                  SetPlayerTeam(playerid, -1);
                      SetPlayerSkin(playerid, 189);
                      SetPlayerHealth(playerid, 100);
                      SetPlayerArmour(playerid, 100);
                      SetPlayerColor(playerid, 0xFFFFFFFF);
                      SetPlayerPos(playerid, 329.8999878,465.6000061,2.0000000);
                      SetPlayerInterior(playerid, 15);
                  ResetPlayerWeapons(playerid);
                  GivePlayerWeapon(playerid, 38, 999999);
                  new name[MAX_PLAYER_NAME];
                  GetPlayerName(playerid, name, sizeof(name));
                  new string[128];
                  format(string, sizeof(string), "%s je usao u Minigun Arenu (/minigundm)!", name);
                   SendClientMessageToAll(orange, string);
                   SendClientMessage(playerid,red -1, "/kill da izadjes iz arene!");
                }
                else return SendClientMessage(playerid, RED,"Ne mozes se pridruziti u Minigun DM! Pokusaj kasnije!");
                
return 1;
}[/pawn]
Poslednja Izmena: Jun 20, 2016, 19:48:45 POSLE PODNE od Ole


Ole

*

Citat: Ilcev1 poslato Jun 20, 2016, 19:51:24 POSLE PODNE
je imas promenje spawn u kucu ili na spawnu?
ovo je dm srw dakle na spawnu tima

Citat: Ole poslato Jun 20, 2016, 19:51:58 POSLE PODNE
Citat: Ilcev1 poslato Jun 20, 2016, 19:51:24 POSLE PODNE
je imas promenje spawn u kucu ili na spawnu?
ovo je dm srw dakle na spawnu tima
ahm jel imas facebook? moracu da vidim gde ti je problem preku tw-a

Ovdje se radi o Call Of Duty Modu prijevod jel tako ?

Ole

*

Citat: Mate poslato Jun 20, 2016, 20:28:32 POSLE PODNE
Ovdje se radi o Call Of Duty Modu prijevod jel tako ?
neke stvari su uzete iz tog moda...


if(uareni[playerid] == 1)
{
SetPlayerTeam(playerid, -1);
SetPlayerSkin(playerid, 189);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SetPlayerColor(playerid, 0xFFFFFFFF);
SetPlayerPos(playerid, 329.8999878,465.6000061,2.0000000);
SetPlayerInterior(playerid, 15);
GivePlayerWeapon(playerid, 38, 999999);
TextDrawShowForPlayer(playerid, TeamText[playerid]);
TextDrawHideForPlayer(playerid, CountText[playerid]);
UpdateTextdraw(playerid);
return true;
    }

Fali ti i return 1; evo kao sto je @MadDogâ,,¢ dao primer.