Wie schalte ich das autom. verlieren von Leben in dem Script aus (WoS 4.0.2) ?
Dieses Hunger oder was das ist. Das ist total lästig, wenn man dauernd zum BSN
oder sonstwo hin muss ._.
WoS 4.0.2 - Autom. Leben verlieren
- Narushi
- Geschlossen
- Erledigt
Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!
Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
-
-
Guck mal bei Timer2, ich glaub so hieß die Stelle...
-
bin mir nicht wirklich sicher
SetTimer("Timer2",1000, 1); // UpdateClock + Streamcheckpoint + Othertimer
UpdateClock + Streamcheckpoint + Othertimer?
-
ja und othertimer da musst du mal durchgucken, zur not schreib den Timer2 hier rein
-
okay ich finde es nicht x.x.. hier ist Timer2::
Function Timer2()
{
new string[255];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(KickPlayer[i]==1) { Kick(i); }
else if(KickPlayer[i]==2) { Ban(i); }
//if(GetPlayerPing(i) >= 500 && PlayerInfo[i][pAdmin] < 1) { Kick(i); }
if(Spectate[i] < 253 && Spectate[i] != 255)
{
FreezePlayer(i);
new targetid = Spectate[i];
if(IsPlayerConnected(targetid))
{
TogglePlayerSpectating(i, 1);
if(PlayerInfo[i][pAdmin] >= 1)
{
new Float:health;
new name[MAX_PLAYER_NAME];
GetPlayerName(targetid, name, sizeof(name));
GetPlayerHealth(targetid, health);
format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~y~%s(ID:%d)~n~~y~Leben:%.1f",name,targetid,health);
GameTextForPlayer(i, string, 2500, 3);
}
if(IsPlayerInAnyVehicle(targetid))
{
new carid = GetPlayerVehicleID(targetid);
PlayerSpectateVehicle(i, carid);
}
else
{
PlayerSpectatePlayer(i, targetid);
}
if(GetPlayerInterior(targetid) == 0)
{
SetPlayerInterior(i,0);
}
else if(GetPlayerInterior(targetid) > 0)
{
SetPlayerInterior(i,GetPlayerInterior(targetid));
}
}//Targetid connected
}
if(Spectate[i] == 253)
{
UnFreezePlayer(i);
TogglePlayerSpectating(i, 0);
SetPlayerInterior(i,Unspec[i][sPint]);
PlayerInfo[i][pInt] = Unspec[i][sPint];
PlayerInfo[i][pLocal] = Unspec[i][sLocal];
Unspec[i][sLocal] = 255;
SetSpawnInfo(i, PlayerInfo[i][pTeam], PlayerInfo[i][pModel], Unspec[i][sPx], Unspec[i][sPy], Unspec[i][sPz]-1.0, 1.0, -1, -1, -1, -1, -1, -1);
gTeam[i] = PlayerInfo[i][pTeam];
SetPlayerToTeamColor(i);
MedicBill[i] = 0;
if(PlayerInfo[i][pDonateRank] > 0)
{
SetSpawnInfo(i, PlayerInfo[i][pTeam], PlayerInfo[i][pModel], Unspec[i][Coords][0], Unspec[i][Coords][1], Unspec[i][Coords][2], 10.0, -1, -1, -1, -1, -1, -1);
SpawnPlayer(i);
SetCameraBehindPlayer(i);
}
else
{
SpawnPlayer(i);
}
Spectate[i] = 255;
}
if(Spectate[i] == 254)
{
UnFreezePlayer(i);
SetPlayerInterior(i,Unspec[i][sPint]);
PlayerInfo[i][pInt] = Unspec[i][sPint];
PlayerInfo[i][pLocal] = Unspec[i][sLocal];
SetPlayerPos(i, Unspec[i][sPx], Unspec[i][sPy], Unspec[i][sPz]);
Spectate[i] = 255;
}
if(Spectate[i] == 256)
{
SetPlayerToTeamColor(i);
Spectate[i] = 255;
}
if(Spectate[i] == 257)
{
Spectate[i] = 254;
}
}
}
SetPlayerUnjail();
{
new Hour,Minute,Sec,String[12];
gettime(Hour,Minute,Sec);
format(String,sizeof(String),"%02d:%02d",Hour,Minute);
TextDrawSetString(Uhrzeit,String);
if(Hour == 0 && Minute == 0)
{
new year,month,day,DString[100],mtext[20], dtext[20];
getdate(year, month, day);
if(month == 1) { mtext = "01"; }
else if(month == 2) { mtext = "02"; }
else if(month == 3) { mtext = "03"; }
else if(month == 4) { mtext = "04"; }
else if(month == 5) { mtext = "05"; }
else if(month == 6) { mtext = "06"; }
else if(month == 7) { mtext = "07"; }
else if(month == 8) { mtext = "08"; }
else if(month == 9) { mtext = "09"; }
else if(month == 10) { mtext = "10"; }
else if(month == 11) { mtext = "11"; }
else if(month == 12) { mtext = "12"; }
if(day == 1) { dtext = "01"; }
else if(day == 2) { dtext = "02"; }
else if(day == 3) { dtext = "03"; }
else if(day == 4) { dtext = "04"; }
else if(day == 5) { dtext = "05"; }
else if(day == 6) { dtext = "06"; }
else if(day == 7) { dtext = "07"; }
else if(day == 8) { dtext = "08"; }
else if(day == 9) { dtext = "09"; }
else if(day == 10) { dtext = "10"; }
else if(day == 11) { dtext = "11"; }
else if(day == 12) { dtext = "12"; }
else if(day == 13) { dtext = "13"; }
else if(day == 14) { dtext = "14"; }
else if(day == 15) { dtext = "15"; }
else if(day == 16) { dtext = "16"; }
else if(day == 17) { dtext = "17"; }
else if(day == 18) { dtext = "18"; }
else if(day == 19) { dtext = "19"; }
else if(day == 20) { dtext = "20"; }
else if(day == 21) { dtext = "21"; }
else if(day == 22) { dtext = "22"; }
else if(day == 23) { dtext = "23"; }
else if(day == 24) { dtext = "24"; }
else if(day == 25) { dtext = "25"; }
else if(day == 26) { dtext = "26"; }
else if(day == 27) { dtext = "27"; }
else if(day == 28) { dtext = "28"; }
else if(day == 29) { dtext = "29"; }
else if(day == 30) { dtext = "30"; }
else if(day == 31) { dtext = "31"; }
format(DString, sizeof(DString), "%s.%s.%d", dtext, mtext, year);
TextDrawSetString(Datum,DString);
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(TextSpams[i] > 0)
{
TextSpams[i]--;
}
if(CMDSpams[i] > 0)
{
CMDSpams[i]--;
}
if(IsPlayerConnected(i))
{
if(PlayerStoned[i] >= 2)
{
return 1;
}
new stern = WantedLevel[i];
SetPlayerWantedLevel(i,stern);
WantedPoints[i] = stern * 2;
}
}
SetWorldTime(Hour+2);//ZEITOMG
}
{
for(new i; i<GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i))
{
if(CheckPointShown[i] == 1)
{
DisablePlayerCheckpoint(i);
CheckPointShown[i] = 0;
}
if(DisplayForPlayer(i))
{
if(GetDistanceToClosestInside(i) < GetDistanceToClosestOutside(i) && GetDistanceToClosestInside(i) < 15.0)
{
new cpid = GetClosestInsideID(i);
SetPlayerCheckpoint(i,CPs[cpid][ExitX],CPs[cpid][ExitY],CPs[cpid][ExitZ],1.5);
CheckPointShown[i] = 1;
}
if(GetDistanceToClosestOutside(i) < GetDistanceToClosestInside(i) && GetDistanceToClosestOutside(i) < 15.0)
{
new cpid = GetClosestOutsideID(i);
SetPlayerCheckpoint(i,CPs[cpid][EnterX],CPs[cpid][EnterY],CPs[cpid][EnterZ],1.5);
CheckPointShown[i] = 1;
}
}
}
}
}
{
new Float:maxspeed = 250.0;
new plname[MAX_PLAYER_NAME];
new Float:oldposx, Float:oldposy, Float:oldposz;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(SafeTime[i] > 0)
{
SafeTime[i]--;
}
if(SafeTime[i] == 1)
{
if(gPlayerAccount[i] == 1 && gPlayerLogged[i] == 0)
{
SendClientMessage(i, COLOR_WHITE, "Bitte log dich ein.");
}
}
if(GetPlayerState(i) == 2)
{
GetPlayerPos(i, TelePos[i][3], TelePos[i][4], TelePos[i][5]);
if(TelePos[i][5] > 550.0)
{
TelePos[i][0] = 0.0;
TelePos[i][1] = 0.0;
}
if(TelePos[i][0] != 0.0)
{
new Float:xdist = TelePos[i][3]-TelePos[i][0];
new Float:ydist = TelePos[i][4]-TelePos[i][1];
new Float:sqxdist = xdist*xdist;
new Float:sqydist = ydist*ydist;
new Float:distance = (sqxdist+sqydist)/31;
if(distance > maxspeed && PlayerInfo[i][pAdmin] < 1)
{
new tmpcar = GetPlayerVehicleID(i);
if(!IsAPlane(tmpcar))
{
GetPlayerName(i, plname, sizeof(plname));
format(string, 256, "Warnung: [%d]%s %.0f km/h",i,plname,distance);
ABroadCast(COLOR_YELLOW,string,1);
}
}}
if(TelePos[i][5] < 550.0 && TelePos[i][3] != 0.0)
{
TelePos[i][0] = TelePos[i][3];
TelePos[i][1] = TelePos[i][4];
}
}
if(PlayerInfo[i][pLocal] != 255 && PlayerInfo[i][pInt] != 0)
{
new house = PlayerInfo[i][pLocal];
GetPlayerPos(i, oldposx, oldposy, oldposz);
if(oldposz != 0.0)
{
if(oldposz < 600.0)
{
if(house > 10000)
{
if (!IsPlayerInRangeOfPoint(i,6.0,1040.6,-1021.0,31.7) && house == 10001 ||!IsPlayerInRangeOfPoint(i,6.0,-2720.5,217.5,4.1) && house == 10002 ||!IsPlayerInRangeOfPoint(i,6.0,2644.6,-2044.9,13.3) && house == 10003)
{
new oldcash = gSpentCash[i];
new Total = GetPlayerMoney(i) - oldcash;
printf("Total %d = GetPlayerMoney(playerid) %d - oldcash %d",Total,GetPlayerMoney(i),oldcash);
new name[MAX_PLAYER_NAME];
GetPlayerName(i, name, sizeof(name));
format(string,128,"<< %s hat den HausUpgradeladen mit €%d verlassen >>",name,Total);
PayLog(string);
gSpentCash[i] = 0;
TelePos[i][0] = 0.0;
TelePos[i][1] = 0.0;
PlayerInfo[i][pLocal] = 255;
SetPlayerInterior(i,0);
PlayerInfo[i][pInt] = 0;
Spectate[i] = 255;
}
}
}
}
}
if(CellTime[i] > 0)
{
if (CellTime[i] == cchargetime)
{
CellTime[i] = 1;
if(Mobile[Mobile[i]] == i)
{
CallCost[i] = CallCost[i]+callcost;
}
}
CellTime[i] = CellTime[i] +1;
if (Mobile[Mobile[i]] == 255 && CellTime[i] == 5)
{
if(IsPlayerConnected(Mobile[i]))
{
new called[MAX_PLAYER_NAME];
GetPlayerName(Mobile[i], called, sizeof(called));
//format(string, sizeof(string), "* %s's Handy klingelt.", called);
//new handyname[20];
if(PlayerInfo[i][pHandyID] == 7) { format(handyname, sizeof(handyname), "Google HTC Magic"); }
else if(PlayerInfo[i][pHandyID] == 6) { format(handyname, sizeof(handyname), "iPhone"); }
else if(PlayerInfo[i][pHandyID] == 5) { format(handyname, sizeof(handyname), "BlackBerry BOLD"); }
else if(PlayerInfo[i][pHandyID] == 4) { format(handyname, sizeof(handyname), "Motorola Q9h"); }
else if(PlayerInfo[i][pHandyID] == 3) { format(handyname, sizeof(handyname), "Sony Ericsson C905"); }
else if(PlayerInfo[i][pHandyID] == 2) { format(handyname, sizeof(handyname), "Nokia N95"); }
else if(PlayerInfo[i][pHandyID] == 1) { format(handyname, sizeof(handyname), "Nokia 6500"); }
else { format(handyname, sizeof(handyname), "Nokia 3300"); }
format(string, sizeof(string), "* %s's %s klingelt.", called, handyname);
RingTone[Mobile[i]] = 10;
ProxDetector(30.0, Mobile[i], string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
}
}
if(CellTime[i] == 0 && CallCost[i] > 0)
{
format(string, sizeof(string), "~w~Der Anruf kostet dich~n~ €5 Handyguthaben");
//GivePlayerMoney(i, -CallCost[i]);
if(PlayerInfo[i][pHandyVer] == 0) PlayerInfo[i][pHandyGeld] -= 5;
GameTextForPlayer(i, string, 5000, 1);
CallCost[i] = 0;
}
if(TransportTime[i] > 0)
{//Taxi driver and passenger only
if(TransportTime[i] >= 16)
{
TransportTime[i] = 1;
if(TransportDriver[i] < 999)
{
if(IsPlayerConnected(TransportDriver[i]))
{
TransportCost[i] += TransportValue[TransportDriver[i]];
TransportCost[TransportDriver[i]] = TransportCost[i];
}
}
}
TransportTime[i] += 1;
format(string, sizeof(string), "~r~%d ~w~: ~g~€%d",TransportTime[i],TransportCost[i]);
GameTextForPlayer(i, string, 15000, 6);
}
}
}
}
return 1;
}Function Timer3()
{
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
PlayerUpdate(i);
if(PlayerInfo[i][pJob] > 0)
{
if(PlayerInfo[i][pContractTime] < 25)
{
PlayerInfo[i][pContractTime] ++;
}
}
}
}
}
new rand = random(sizeof(WetterRandom));
new stringw[16];
wetterid = WetterRandom[rand][0];
format(stringw, sizeof(stringw), "weather %d", wetterid);
SendRconCommand(stringw);
printf("Wetter ID: %d", wetterid);
return 1;
} -
Okei, nichts was dem entsprechen würde, was steht denn da alles drinnen? (Bei SetPlayerUnjail)
-
kA ich schick mal, ist nicht die komplette Funktion aber der Rest war nur so ein Fraktionskram. /Frakkammer und so
Function SetPlayerUnjail()
{
new plname[MAX_PLAYER_NAME];
new string[256];if (LottoTimer > 0)
LottoTimer--;
if (LottoTimer == 1)
{
OOCOff(COLOR_WHITE, "[Lotto]: Die Super Ziehung wurde gestartet!");
new rand = random(90);
if(rand < 70) { rand += 3; }
Lotto(rand);
}
if(KartingPlayers >= 2 && KartingRound != 1 && StartingKartRound != 1)
{
StartingKartRound = 1;
SetTimer("PrepareKarting", 15000, 0);
}
if(KartingRound != 0 && KartingPlayers < 2)
{
StartingKartRound = 0;
KartingRound = 0;
EndingKartRound = 1;
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
NDMZONE(i);
NagelBand_Timer();
new newcar = GetPlayerVehicleID(i);
new level = PlayerInfo[i][pLevel];
if(level >= 0 && level >= 2) { PlayerInfo[i][pPayCheck] += 1; }
else if(level >= 3 && level <= 4) { PlayerInfo[i][pPayCheck] += 2; }
else if(level >= 5 && level <= 6) { PlayerInfo[i][pPayCheck] += 3; }
else if(level >= 7 && level <= 8) { PlayerInfo[i][pPayCheck] += 4; }
else if(level >= 9 && level <= 10) { PlayerInfo[i][pPayCheck] += 5; }
else if(level >= 11 && level <= 12) { PlayerInfo[i][pPayCheck] += 6; }
else if(level >= 13 && level <= 14) { PlayerInfo[i][pPayCheck] += 7; }
else if(level >= 15 && level <= 16) { PlayerInfo[i][pPayCheck] += 8; }
else if(level >= 17 && level <= 18) { PlayerInfo[i][pPayCheck] += 9; }
else if(level >= 19 && level <= 20) { PlayerInfo[i][pPayCheck] += 10; }
else if(level >= 21) { PlayerInfo[i][pPayCheck] += 11; }
if(PlayerInfo[i][pJailed] > 0)
{
if(PlayerInfo[i][pJailTime] > 0)
{
PlayerInfo[i][pJailTime]--;
}
if(PlayerInfo[i][pJailTime] <= 0)
{
PlayerInfo[i][pJailTime] = 0;
if(PlayerInfo[i][pJailed] == 1)
{
SetPlayerInterior(i,0);
SetPlayerPos(i,1551.2737,-1675.5720,15.7766);
SetPlayerFacingAngle(i,-1587.2474);
}
else if(PlayerInfo[i][pJailed] == 2)
{
SetPlayerInterior(i, 0);
SetPlayerVirtualWorld(i, 0);
SetPlayerPos(i, 1808.6899,-1569.0588,13.4676);
}
PlayerInfo[i][pJailed] = 0;
SendClientMessage(i, COLOR_GRAD1,"Deine Gefängniszeit ist um.");
format(string, sizeof(string), "~g~Du bist frei!~n~~w~Bitte benimm dich in der Zukunft!");
GameTextForPlayer(i, string, 5000, 1);
if(gTeam[i] == 4) { gTeam[i] = 3; }
ClearCrime(i);
}
}
else if (LottoTimer == 120)
{
format(string, sizeof(string), "[Lotto]: Die Lotterie Ziehung beginnt in 2 Minuten, Jackpot: %d", Jackpot);
SendClientMessage(i,COLOR_GREEN,string);
SendClientMessage(i,COLOR_GREEN,"[Lotto]: Gib /Lotto [Nummer] um einen Lotterie-Schein zu kaufen.");
}
else if (LottoTimer == 60)
{
format(string, sizeof(string), "[Lotto]: Die Lotterie Ziehung beginnt in 1 Minute, Jackpot: %d", Jackpot);
SendClientMessage(i,COLOR_GREEN,string);
SendClientMessage(i,COLOR_GREEN,"[Lotto]: Gib /Lotto [Nummer] um einen Lotterie-Schein zu kaufen.");
}
if(GetPlayerMoney(i) - CurrentMoney[i] >= 50000 && PlayerInfo[i][pAdmin] < 1)
{
if(ConsumingMoney[i])
{
CurrentMoney[i] = GetPlayerMoney(i);
ConsumingMoney[i] = 0;
}
else
{
GetPlayerName(i, plname, sizeof(plname));
format(string, 256, "Warnung: [%d]%s hat mehr als €50000/s gespawnt,**Erst Person checken vor Ban** (/check).",i,plname);
ABroadCast(COLOR_YELLOW,string,1);
PayLog(string);
CurrentMoney[i] = GetPlayerMoney(i);
}
}
else
{
CurrentMoney[i] = GetPlayerMoney(i);
}
if(IsABoat(newcar))
{
if(PlayerInfo[i][pBoatLic] < 1 && GetPlayerState(i) == 2)
{
RemovePlayerFromVehicle(i);
}
}
else if(IsAPlane(newcar))
{
if(PlayerInfo[i][pFlyLic] < 1 && GetPlayerState(i) == 2)
{
if(TakingLesson[i] == 1) { }
else { RemovePlayerFromVehicle(i); }
}
}
else if(IsANewbie(newcar))
{
if(PlayerInfo[i][pNewLic] == 0 && GetPlayerState(i) == 2) { }
if(PlayerInfo[i][pNewLic] == 0 && GetPlayerState(i) == 2) { }
}
else if(IsANoLicVehicle(newcar)) { }
else
{
if(PlayerInfo[i][pCarLic] < 1 && IsPlayerInAnyVehicle(i) && GetPlayerState(i) == 2)
{
if(TakingLesson[i] == 1) { }
else
{
}
}
}//Done with car check
if(UsedFind[i] >= 1)
{
UsedFind[i] += 1;
if(UsedFind[i] >= 120)
{
UsedFind[i] = 0;
}
}
if(MedicTime[i] > 0)
{
if(MedicTime[i] == 3)
{
SetPlayerInterior(i, 5);
new Float:X, Float:Y, Float:Z;
GetPlayerPos(i, X,Y,Z);
SetPlayerCameraPos(i, X + 3, Y, Z);
SetPlayerCameraLookAt(i,X,Y,Z);
}
MedicTime[i] ++;
if(MedicTime[i] >= NeedMedicTime[i])
{
new cut = deathcost; //PlayerInfo[playerid][pLevel]*deathcost;
GivePlayerMoney(i, -cut);
UnFreezePlayer(i);
MedicBill[i] = 0;
MedicTime[i] = 0;
NeedMedicTime[i] = 0;
PlayerInfo[i][pDeaths] += 1;
PlayerFixRadio(i);
SpawnPlayer(i);
}
}
if(PlayerTazeTime[i] >= 1)
{
PlayerTazeTime[i] += 1;
if(PlayerTazeTime[i] == 15)
{
PlayerTazeTime[i] = 0;
}
else
{
new Float:angle;
GetPlayerFacingAngle(i, angle);
SetPlayerFacingAngle(i, angle + 180);
}
}
if(PlayerDrunk[i] >= 5)
{
PlayerDrunkTime[i] += 1;
if(PlayerDrunkTime[i] == 8)
{
PlayerDrunkTime[i] = 1338;
SetPlayerDrunkLevel (i, 30000);
}
if(PlayerDrunkTime[i] == 1338)
{
PlayerDrunkTime[i] = 0;
SetPlayerDrunkLevel (i, 0);
}
}
new Float:HP;
if(GetPlayerHealth(i, HP) > 161)
{
SetPlayerHealth(i, 160);
}
if(PlayerStoned[i] >= 2)
{
SetPlayerTime(i,22,10);
SetPlayerDrunkLevel(i,50000);
SetPlayerWeather(i,-66);
PlayerStoned[i] += 1;
if(PlayerStoned[i] >= 900)//zeit in sekunden
{
PlayerStoned[i] = 1337;
}
if(PlayerStoned[i] == 1337)
{
PlayerStoned[i] = 0;
SetPlayerDrunkLevel(i,0);
SetPlayerWeather(i,12);
GameTextForPlayer(i, "~w~Du bist ~n~nichtmehr~p~ Stoned", 4000, 1);
}
}
if(PlayerInfo[i][pCarTime] > 0)
{
if(PlayerInfo[i][pCarTime] <= 0)
{
PlayerInfo[i][pCarTime] = 0;
}
else
{
PlayerInfo[i][pCarTime] -= 1;
}
}
if(PlayerInfo[i][pMulltime] > 0)
{
if(PlayerInfo[i][pMulltime] <= 0)
{
PlayerInfo[i][pMulltime] = 0;
}
else
{
PlayerInfo[i][pMulltime] -= 1;
}
}
if(PlayerInfo[i][pFlugTime] > 0)
{
if(PlayerInfo[i][pFlugTime] <= 0)
{
PlayerInfo[i][pFlugTime] = 0;
}
else
{
PlayerInfo[i][pFlugTime] -= 1;
}
}
if(PlayerInfo[i][pFarmTime] > 0)
{
if(PlayerInfo[i][pFarmTime] <= 0)
{
PlayerInfo[i][pFarmTime] = 0;
}
else
{
PlayerInfo[i][pFarmTime] = -1;
}
}
if(BoxWaitTime[i] > 0)
{
if(BoxWaitTime[i] >= BoxDelay)
{
BoxDelay = 0;
BoxWaitTime[i] = 0;
PlayerPlaySound(i, 1057, 0.0, 0.0, 0.0);
GameTextForPlayer(i, "~g~Match Gestartet", 5000, 1);
UnFreezePlayer(i);
RoundStarted = 1;
}
else
{
format(string, sizeof(string), "%d", BoxDelay - BoxWaitTime[i]);
GameTextForPlayer(i, string, 1500, 6);
BoxWaitTime[i] += 1;
}
}
if(RoundStarted > 0)
{
if(PlayerBoxing[i] > 0)
{
new trigger = 0;
new Lost = 0;
new Float:angle;
new Float:health;
GetPlayerHealth(i, health);
if(health < 12)
{
if(i == Boxer1) { Lost = 1; trigger = 1; }
else if(i == Boxer2) { Lost = 2; trigger = 1; }
}
if(health < 28) { GetPlayerFacingAngle(i, angle); SetPlayerFacingAngle(i, angle + 85); }
if(trigger)
{
new winner[MAX_PLAYER_NAME];
new loser[MAX_PLAYER_NAME];
new titel[MAX_PLAYER_NAME];
if(Lost == 1)
{
if(IsPlayerConnected(Boxer1) && IsPlayerConnected(Boxer2))
{
SetPlayerPos(Boxer1, 765.8433,3.2924,1000.7186); SetPlayerPos(Boxer2, 765.8433,3.2924,1000.7186);
SetPlayerInterior(Boxer1, 5); SetPlayerInterior(Boxer2, 5);
GetPlayerName(Boxer1, loser, sizeof(loser));
GetPlayerName(Boxer2, winner, sizeof(winner));
if(PlayerInfo[Boxer1][pJob] == 12) { PlayerInfo[Boxer1][pLoses] += 1; }
if(PlayerInfo[Boxer2][pJob] == 12) { PlayerInfo[Boxer2][pWins] += 1; }
if(TBoxer < 255)
{
if(IsPlayerConnected(TBoxer))
{
if(TBoxer != Boxer2)
{
if(PlayerInfo[Boxer2][pJob] == 10)
{
TBoxer = Boxer2;
GetPlayerName(TBoxer, titel, sizeof(titel));
new nstring[MAX_PLAYER_NAME];
format(nstring, sizeof(nstring), "%s", titel);
strmid(Titel[TitelName], nstring, 0, strlen(nstring), 255);
Titel[TitelWins] = PlayerInfo[TBoxer][pWins];
Titel[TitelLoses] = PlayerInfo[TBoxer][pLoses];
SaveBoxer();
format(string, sizeof(string), "Boxing News: %s hat den Kampf gegen den Champion %s gewonnen und ist nun der neue Boxing Champion.", titel, loser);
OOCOff(COLOR_WHITE,string);
}
else
{
SendClientMessage(Boxer2, COLOR_LIGHTBLUE, "* Du könntest der Champion sein, wenn es dein Beruf wäre !");
}
}
else
{
GetPlayerName(TBoxer, titel, sizeof(titel));
format(string, sizeof(string), "Boxing News: Boxing Champion %s hat den Kampf gegen %s gewonnen.", titel, loser);
OOCOff(COLOR_WHITE,string);
Titel[TitelWins] = PlayerInfo[TBoxer][pWins];
Titel[TitelLoses] = PlayerInfo[Boxer2][pLoses];
SaveBoxer();
}
}
}//TBoxer
format(string, sizeof(string), "* Du hast den Kampf gegen %s verloren.", winner);
SendClientMessage(Boxer1, COLOR_LIGHTBLUE, string);
GameTextForPlayer(Boxer1, "~r~Du hast verloren", 3500, 1);
format(string, sizeof(string), "* Du hast den Kampf gegen %s gewonnen.", loser);
SendClientMessage(Boxer2, COLOR_LIGHTBLUE, string);
GameTextForPlayer(Boxer2, "~r~Du hast gewonnen", 3500, 1);
if(GetPlayerHealth(Boxer1, health) < 20)
{
SendClientMessage(Boxer1, COLOR_LIGHTBLUE, "* Du fühlst dich erschöpft vom Kampf, hol dir was zu Essen.");
SetPlayerHealth(Boxer1, 30.0);
}
else
{
SendClientMessage(Boxer1, COLOR_LIGHTBLUE, "* Du fühlst dich perfekt, selbst nach dem Kampf.");
SetPlayerHealth(Boxer1, 50.0);
}
if(GetPlayerHealth(Boxer2, health) < 20)
{
SendClientMessage(Boxer2, COLOR_LIGHTBLUE, "* Du fühlst dich erschöpft vom Kampf, hol dir was zu Essen.");
SetPlayerHealth(Boxer2, 30.0);
}
else
{
SendClientMessage(Boxer2, COLOR_LIGHTBLUE, "* Du fühlst dich perfekt, selbst nach dem Kampf.");
SetPlayerHealth(Boxer2, 50.0);
}
GameTextForPlayer(Boxer1, "~g~Match vorbei", 5000, 1); GameTextForPlayer(Boxer2, "~g~Match vorbei", 5000, 1);
if(PlayerInfo[Boxer2][pJob] == 10) { PlayerInfo[Boxer2][pBoxSkill] += 1; }
PlayerBoxing[Boxer1] = 0;
PlayerBoxing[Boxer2] = 0;
}
}
else if(Lost == 2)
{
if(IsPlayerConnected(Boxer1) && IsPlayerConnected(Boxer2))
{
SetPlayerPos(Boxer1, 765.8433,3.2924,1000.7186); SetPlayerPos(Boxer2, 765.8433,3.2924,1000.7186);
SetPlayerInterior(Boxer1, 5); SetPlayerInterior(Boxer2, 5);
GetPlayerName(Boxer1, winner, sizeof(winner));
GetPlayerName(Boxer2, loser, sizeof(loser));
if(PlayerInfo[Boxer2][pJob] == 10) { PlayerInfo[Boxer2][pLoses] += 1; }
if(PlayerInfo[Boxer1][pJob] == 10) { PlayerInfo[Boxer1][pWins] += 1; }
if(TBoxer < 255)
{
if(IsPlayerConnected(TBoxer))
{
if(TBoxer != Boxer1)
{
if(PlayerInfo[Boxer1][pJob] == 10)
{
TBoxer = Boxer1;
GetPlayerName(TBoxer, titel, sizeof(titel));
new nstring[MAX_PLAYER_NAME];
format(nstring, sizeof(nstring), "%s", titel);
strmid(Titel[TitelName], nstring, 0, strlen(nstring), 255);
Titel[TitelWins] = PlayerInfo[TBoxer][pWins];
Titel[TitelLoses] = PlayerInfo[TBoxer][pLoses];
SaveBoxer();
format(string, sizeof(string), "Boxing News: %s hat den Kampf gegen den Champion %s gewonnen und ist nun der neue Boxing Champion.", titel, loser);
OOCOff(COLOR_WHITE,string);
}
else
{
SendClientMessage(Boxer1, COLOR_LIGHTBLUE, "* Du könntest der Champion sein, wenn es dein Beruf wäre !");
}
}
else
{
GetPlayerName(TBoxer, titel, sizeof(titel));
format(string, sizeof(string), "Du könntest der Champion sein, wenn es dein Beruf wäre !", titel, loser);
OOCOff(COLOR_WHITE,string);
Titel[TitelWins] = PlayerInfo[TBoxer][pWins];
Titel[TitelLoses] = PlayerInfo[Boxer1][pLoses];
SaveBoxer();
}
}
}//TBoxer
format(string, sizeof(string), "* Du hast den Kampf gegen %s verloren.", winner);
SendClientMessage(Boxer2, COLOR_LIGHTBLUE, string);
GameTextForPlayer(Boxer2, "~r~Du hast verloren", 3500, 1);
format(string, sizeof(string), "* Du hast den Kampf gegen %s gewonnen.", loser);
SendClientMessage(Boxer1, COLOR_LIGHTBLUE, string);
GameTextForPlayer(Boxer1, "~g~Du hast gewonnen", 3500, 1);
if(GetPlayerHealth(Boxer1, health) < 20)
{
SendClientMessage(Boxer1, COLOR_LIGHTBLUE, "* Du fühlst dich erschöpft vom Kampf, hol dir was zu Essen.");
SetPlayerHealth(Boxer1, 30.0);
}
else
{
SendClientMessage(Boxer1, COLOR_LIGHTBLUE, "* Du fühlst dich perfekt, selbst nach dem Kampf.");
SetPlayerHealth(Boxer1, 50.0);
}
if(GetPlayerHealth(Boxer2, health) < 20)
{
SendClientMessage(Boxer2, COLOR_LIGHTBLUE, "* Du fühlst dich erschöpft vom Kampf, hol dir was zu Essen.");
SetPlayerHealth(Boxer2, 30.0);
}
else
{
SendClientMessage(Boxer2, COLOR_LIGHTBLUE, "* Du fühlst dich perfekt, selbst nach dem Kampf.");
SetPlayerHealth(Boxer2, 50.0);
}
GameTextForPlayer(Boxer1, "~g~Match vorbei", 5000, 1); GameTextForPlayer(Boxer2, "~g~Match vorbei", 5000, 1);
if(PlayerInfo[Boxer1][pJob] == 10) { PlayerInfo[Boxer1][pBoxSkill] += 1; }
PlayerBoxing[Boxer1] = 0;
PlayerBoxing[Boxer2] = 0;
}
}
InRing = 0;
RoundStarted = 0;
Boxer1 = 255;
Boxer2 = 255;
TBoxer = 255;
trigger = 0;
}
}
}
if(StartingKartRound == 1 && AnnouncedKartRound == 0)
{
AnnouncedKartRound = 1;
if(PlayerKarting[i] != 0 && PlayerInKart[i] != 0)
{
SendClientMessage(i, COLOR_YELLOW, "Karting Race wird angekündigt in 15 Sekunden (für mehr Kart Racers).");
}
}
if(EndingKartRound == 1)
{
if(PlayerKarting[i] != 0 && PlayerInKart[i] != 0)
{
DisablePlayerCheckpoint(i);
CP[i] = 0;
}
}
if(FindTime[i] > 0)
{
if(FindTime[i] == FindTimePoints[i]) { FindTime[i] = 0; FindTimePoints[i] = 0; DisablePlayerCheckpoint(i); PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0); GameTextForPlayer(i, "~r~Red Marker weg", 2500, 1); }
else
{
format(string, sizeof(string), "%d", FindTimePoints[i] - FindTime[i]);
GameTextForPlayer(i, string, 1500, 6);
FindTime[i] += 1;
}
}
if(TaxiCallTime[i] > 0)
{
if(TaxiAccepted[i] < 999)
{
if(IsPlayerConnected(TaxiAccepted[i]))
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(TaxiAccepted[i], X, Y, Z);
SetPlayerCheckpoint(i, X, Y, Z, 5);
}
}
}
if(BusCallTime[i] > 0)
{
if(BusAccepted[i] < 999)
{
if(IsPlayerConnected(BusAccepted[i]))
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(BusAccepted[i], X, Y, Z);
SetPlayerCheckpoint(i, X, Y, Z, 5);
}
}
}
/*if(MechanicCallTime[i] > 0)
{
if(MechanicCallTime[i] == 30) { MechanicCallTime[i] = 0; DisablePlayerCheckpoint(i); PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0); GameTextForPlayer(i, "~r~RedMarker gone", 2500, 1); }
else
{
format(string, sizeof(string), "%d", 30 - MechanicCallTime[i]);
GameTextForPlayer(i, string, 1500, 6);
MechanicCallTime[i] += 1;
}
}*/
if(Robbed[i] == 1)
{
if(RobbedTime[i] <= 0)
{
RobbedTime[i] = 0;
Robbed[i] = 0;
}
else
{
RobbedTime[i] -= 1;
}
} -
Komisch, normalerweiße müsste man es mit GetPlayerHealth finden, ich muss jetzt leider weg, kannst dich morgen in skype melden wenn du nciht weiter gekommen bist
-
Ja lösch einfach das raus dann kuck mall ABER MACHE EIN BACKUP!!!
-
Das ist aber viel zu umständlich.. :O
-
breadfish.de
Hat das Thema geschlossen.