Wysłany: 2012-02-29, 01:00
tanq0811
Wiek: 32 Na forum: 5232 dni Posty: 12
Siema.
Zrobilem komende na wyjscie z areny na ktorej jest blok cmd. I chce zrobic tak aby poza arena jak wklepie ta cmd wyskoczyl mi napis ze nie jestem na arenie.
Tu jest cmd
Kod: if(BlockCmd[playerid] == 1 & strcmp(cmdtext, "/exit", true))
return SendClientMessage(playerid, COLOR_RED, "Nie mo?esz u?ywa? teraz komend. Wpisz /underexit aby wyj??.");
Teraz 2 problem to jak zrobic cos takiego zeby spawnowalo mnie po smierci na tej arenie. Mam cos takiego w onplayerspawn ale to nie dziala. Arena jest w skrypcie i nie bedzie nigdy w mapie.
Kod: if(OnArenaFight[playerid] == 1)
{
SetPlayerInterior(playerid, 0);
ResetPlayerWeapons(playerid);
new rand = random(sizeof(FightArena));
SetPlayerPos(playerid, FightArena[rand][0], FightArena[rand][1], FightArena[rand][2]);
return 1;
}
Wysłany: 2012-02-29, 07:01
NET366
;7
Wiek: 29 Na forum: 5756 dni Posty: 100
Nick w MP: NET366
Piwa : 1505
1. Musisz dac w cmd /underexit warunek
2. Zobacz czy nie dajesz tego pod spawnem z mapy
Wysłany: 2012-02-29, 13:51
tanq0811
Wiek: 32 Na forum: 5232 dni Posty: 12
1.
Mam cos takiego :
Kod: if (strcmp(cmdtext, "/underexit", true)==0) {
{
if(OnArenaFight[playerid] == 0)
{
SendClientMessage(playerid, COLOR_RED, "Nie jestes na Figt Arenie");
return 1;
}
BlockCmd[playerid] = 0;
OnArenaFight[playerid] = 0;
OnPlayerSpawn(playerid);
GameTextForPlayer(playerid,"~w~Opusciles Fight ~r~Arene",1500,5);
}
return 1;
}
I do tego to:
Kod: if(BlockCmd[playerid] == 1 & strcmp(cmdtext, "/underexit", true))
return SendClientMessage(playerid, COLOR_RED, "Nie mo?esz u?ywa? teraz komend. Wpisz /underexit aby wyj??.");
I robi sie cos takiego ze dziala git ale jak nie jestem na arenie i wpisuje /underexit to pokazuje mi ze nie moge uzywac cmd a powinno pokazac ze nie jestem na arenie.
2.
Co do 2 to nie rozumiem jak pod spawnem mapy. To jest skrypt i nie chce zeby mial cos wspolnego z mapa chce by dzialal tak jak powinien. Na wszelki wypadek zamieszczam caly callback
Kod: public OnPlayerSpawn(playerid)
{
iSetPlayerRandomSpawn(playerid);
GivePlayerWeapon(playerid, 24, 1000);
return 1;
}
public iSetPlayerRandomSpawn(playerid)
{
if(OnArenaFight[playerid] == 0)
{
new rand = random(sizeof(sRandomPlayerSpawns));
SetPlayerPos(playerid, sRandomPlayerSpawns[rand][0], sRandomPlayerSpawns[rand][1], sRandomPlayerSpawns[rand][2]); // Warp the player
}
else if(OnArenaFight[playerid] == 1)
{
SetPlayerInterior(playerid, 0);
ResetPlayerWeapons(playerid);
new rand = random(sizeof(FightArena));
SetPlayerPos(playerid, FightArena[rand][0], FightArena[rand][1], FightArena[rand][2]);
}
return 1;
}
Tak to wyglada. Pomozcie pls bo juz siwieja mi wlosy od tego
[ Dodano : 2012-03-01, 11:23 ]
Pomoze ktos ?
Wysłany: 2012-03-01, 22:22
Biker_
Wiek: 29 Na forum: 5246 dni Posty: 126
Piwa : 16
Do??czam si? do pro?by mam taki kod
Kod: if(!GetPVarInt(playerid, "IsPlayerInMinigunArea"))
{
new rand = random(sizeof(RandomMinigunSpawns));
SetPlayerPos(playerid, RandomMinigunSpawns[rand][0], RandomMinigunSpawns[rand][1], RandomMinigunSpawns[rand][2]);
}
w OnPlayerSpawn
ale jak mam to to za ka?dym spawnem respi mnie na arenie
Wysłany: 2012-03-02, 15:42
NET366
;7
Wiek: 29 Na forum: 5756 dni Posty: 100
Nick w MP: NET366
Piwa : 1505
Kod:
if (strcmp(cmdtext, "/underexit", true)==0) {
{
if(OnArenaFight[playerid] == 0)
{
SendClientMessage(playerid, COLOR_RED, "Nie jestes na Figt Arenie");
}
else
{
BlockCmd[playerid] = 0;
OnArenaFight[playerid] = 0;
OnPlayerSpawn(playerid);
GameTextForPlayer(playerid,"~w~Opusciles Fight ~r~Arene",1500,5);
}
return 1;
}
Kod:
public OnPlayerSpawn(playerid)
{
if(OnArenaFight[playerid] == 1)// ten kawalek kodu musi byc zawsze pod "public OnPlayerSpawn"
{
SetPlayerInterior(playerid, 0);
ResetPlayerWeapons(playerid);
new rand2 = random(sizeof(FightArena));
SetPlayerPos(playerid, FightArena[rand2][0], FightArena[rand2][1], FightArena[rand2][2]);
return 0;
}
new rand = random(sizeof(sRandomPlayerSpawns));
SetPlayerPos(playerid, sRandomPlayerSpawns[rand][0], sRandomPlayerSpawns[rand][1], sRandomPlayerSpawns[rand][2]); // Warp the player
// reszte kodu
return 1;
}
zobacz tak
PS. UP pokaz wiecej kodu
Tagi: arena :: /exit :: respawn :: niej :: smierci
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: