Beiträge von malE
-
-
Das steht im Thread.
#EDIT: Links entfernt... Das Script darf auch NICHT OHNE MEINE ERLAUBNIS weitergegeben werden!
-
-
Genau Whice!
Du kannst es halt nur mit diesen Sirenen machen.
-
Dafür kannst du dieses public benutzen.
Code
Alles anzeigenpublic OnVehicleSirenStateChange(playerid, vehicleid, newstate) { if(newstate) { GameTextForPlayer(playerid, "~w~Sirene ~g~aktiviert", 1000, 3); // Hier erstellst du die Attachments }else { GameTextForPlayer(playerid, "~w~Sirene ~r~deaktiviert", 1000, 3); // Hier löscht du die Attachments } return 1; }
-
[wiki]Dialog_Styles[/wiki] schau dir bitte 4 - DIALOG_STYLE_TABLIST an.
-
Abfragen ob sich der Spieler in /dm befindet, wenn ja dann lässt du Ihn dort spawnen.
Andernfalls abfragen ob der Spieler sich in dem und dem Team befindet, wenn ja dann lässt die ihn dort spawnen.Hast du denn schon ein /dm Befehl?
-
[wiki]Random[/wiki] dort findest du das perfekte Beispiel.
-
Warum achtest du denn nicht auf die Parameter?
Schau dir noch einmal bitte die Parameter an, besonders auf den Speed.Code
Alles anzeigenelse if(IsACop(playerid)) { if(IsPlayerInRangeOfPoint(playerid,15,1572.16016, 658.79889, 6.90220)) { MoveObject(FBITor,-1572.16016, 658.79889,6.90220,3,0.00000,0.00000, 90.000); SetTimer("CloseFBI",5000,0); } } else if(IsACop(playerid)) { if(IsPlayerInRangeOfPoint(playerid,15,-1701.42346, 687.67249, 24.75240)) { MoveObject(FBITor1,-1701.42346, 687.67249,24.75240,3,0.00000,0.00000,270.13831); SetTimer("CloseFBI1",5000,0); } } else if(IsACop(playerid)) { if(IsPlayerInRangeOfPoint(playerid,15,-1631.49512, 688.35559, 8.70930)) { MoveObject(FBITor2,-1631.49512,688.35559,14.09787,3,0.00000,0.00000,270.50000); SetTimer("CloseFBI2",5000,0); } }
-
Du hast bei den MoveObjects auch nur die X Y Z Koordinaten "geändert", warum fügst du nicht die Rotations noch ein, dann funktioniert es auch.
Hier die Parameters von [wiki]MoveObject[/wiki]
(objectid, Float:X, Float:Y, Float:Z, Float:Speed, Float:RotX = -1000.0, Float:RotY = -1000.0, Float:RotZ = -1000.0) -
Schau mal bei deinem ersten Code, du bewegst die Objekte auf die selbe Position.
Also MoveObject ist die selbe Position wie IsPlayerInRangeOfPoint. -
Genau.
-
Du musst pAuftraggeber in deinem Enum einfügen. Dann tauchen diese Errors auch nicht mehr auf.
if(PlayerInfo[playerid][pHeadValue] > 0)
{
if(IsPlayerConnected(killerid))
{
if(PlayerInfo[killerid][pMember] == 8 PlayerInfo[killerid][pLeader] ==
{
ConsumingMoney[killerid] = 1;
new killer[MAX_PLAYER_NAME];
GetPlayerName(killerid, killer, sizeof(killer));
FraktionsKasse[7] += PlayerInfo[playerid][pHeadValue]/2;
GivePlayerMoney(killerid, PlayerInfo[playerid][pHeadValue]/2);
// Neu
if(ReturnPlayerID(PlayerInfo[playerid][pAuftraggeber]) != INVALID_PLAYER_ID && IsPlayerConnected(ReturnPlayerID(PlayerInfo[playerid][pAuftraggeber]))) //6101
{
format(string, 128, "Hitman %s hat dein Contract %s getötet.", killer, name);
SendClientMessage(ReturnPlayerID(PlayerInfo[playerid][pAuftraggeber]), COLOR_YELLOW, string); //6104
}
format(string,128,"<< Hitman %s hat den Auftrag an %s erfüllt und bekommt: $%d >>",killer,name,PlayerInfo[playerid][pHeadValue]/2);
SendFamilyMessage(8, COLOR_YELLOW, string);
PlayerInfo[playerid][pHeadValue] = 0;
}
}
}Was ist damit? Habe ich doch schon jetzt mehrmals eingerückt.
-
Das hatte ich doch eigentlich schon eingerückt?
Du kannst das auch eigentlich selbst machen, bei Notepad++ werden dir die zusammengehörigen Klammern rot angezeigt, dann weißt du nämlich was du einrücken musst.Code
Alles anzeigen// OnPlayerDeath if(PlayerInfo[playerid][pHeadValue] > 0) { if(IsPlayerConnected(killerid)) { if(PlayerInfo[killerid][pMember] == 8 || PlayerInfo[killerid][pLeader] == 8) { ConsumingMoney[killerid] = 1; new killer[MAX_PLAYER_NAME]; GetPlayerName(killerid, killer, sizeof(killer)); FraktionsKasse[7] += PlayerInfo[playerid][pHeadValue]/2; GivePlayerMoney(killerid, PlayerInfo[playerid][pHeadValue]/2); // Neu if(ReturnPlayerID(PlayerInfo[playerid][pAuftraggeber]) != INVALID_PLAYER_ID && IsPlayerConnected(ReturnPlayerID(PlayerInfo[playerid][pAuftraggeber]))) { format(string, 128, "Hitman %s hat dein Contract %s getötet.", killer, name); SendClientMessage(ReturnPlayerID(PlayerInfo[playerid][pAuftraggeber]), COLOR_YELLOW, string); } format(string,128,"<< Hitman %s hat den Auftrag an %s erfüllt und bekommt: $%d >>",killer,name,PlayerInfo[playerid][pHeadValue]/2); SendFamilyMessage(8, COLOR_YELLOW, string); PlayerInfo[playerid][pHeadValue] = 0; } } }
-
So, müsste nun funktionieren.
Code
Alles anzeigenif(strcmp(cmd, "/contract", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD1, "Benutze: /contract [playerid] [Betrag]"); return 1; } giveplayerid = ReturnUser(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD1, "Benutze: /contract [playerid] [Betrag]"); return 1; } moneys = strval(tmp); if(moneys < 50000 || moneys > 1000000)return SendClientMessage(playerid, COLOR_GREY, " Die Vertragssumme muss mindestens $50000-, aber nicht mehr als $1.000.000 betragen!"); if(PlayerInfo[playerid][pLevel] < 3) { SendClientMessage(playerid, COLOR_GRAD1, "Du musst mindestens Level 3 haben um einen Vertrag zu erstellen."); return 1; } if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if(PlayerInfo[giveplayerid][pMember] == 8 && PlayerInfo[playerid][pLeader] == 8) { SendClientMessage(playerid, COLOR_GREY, " Du kannst keine Verträge mit deiner eigenen Agentur abschließen!"); return 1; } else if(PlayerInfo[giveplayerid][pLeader] == 8 && PlayerInfo[playerid][pMember] == 8) { SendClientMessage(playerid, COLOR_GREY, " Du kannst keine Verträge mit deiner eigenen Agentur abschließen!"); return 1; } else if(PlayerInfo[giveplayerid][pMember] == 8||PlayerInfo[giveplayerid][pLeader] == 8) { SendClientMessage(playerid, COLOR_GREY, " Du kannst keinen Hitman unter Vertrag nehmen !"); return 1; } if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Du kannst dich nicht selber unter Vertrag nehmen!"); return 1; } GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); playermoney = GetPlayerMoney(playerid); if (moneys > 0 && playermoney >= moneys) { GivePlayerMoney(playerid, (0 - moneys)); format(PlayerInfo[giveplayerid][pAuftraggeber], MAX_PLAYER_NAME, "%s", sendername); // Neu PlayerInfo[giveplayerid][pHeadValue]+=moneys; format(string, sizeof(string), "%s möchte das ein Hitman die Zielperson: %s für $%d tötet.",sendername, giveplayer, moneys); SendFamilyMessage(8, COLOR_YELLOW, string); format(string, sizeof(string), "* Du hast einem Hitman den Auftrag zur Beseitigung von %s für $%d erteilt.",giveplayer, moneys); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); } else { SendClientMessage(playerid, COLOR_GRAD1, " Falsche Angaben!"); } } } else { format(string, sizeof(string), " %d ist kein Aktiver Spieler.", giveplayerid); SendClientMessage(playerid, COLOR_GRAD1, string); } } return 1; }
-
Freut mich, funktioniert nun alles?
-
Code
Alles anzeigenFunction OnPlayerDeath(playerid, killerid, reason) { new Float:xPosi[3]; GetPlayerPos(playerid, xPosi[0],xPosi[1],xPosi[2]); TodesIcon[playerid] = CreatePickup(1254, 1, xPosi[0], xPosi[1], xPosi[2]); TodesITimer[playerid] = SetTimer("DestroyTodesIcon", 1000*60, false); M_OnPlayerDeath(playerid,killerid,reason); new name[MAX_PLAYER_NAME]; new string[256]; PlayerInfo[playerid][pInvWeapon] = 0; PlayerInfo[playerid][pInvAmmo] = 0; PlayerInfo[playerid][pInvWeapon2] = 0; PlayerInfo[playerid][pInvAmmo2] = 0; FrakMatsHolding[playerid] = 0; PlayerInfo[playerid][pDeaths] ++; PlayerInfo[killerid][pKills] ++; /*new playercash; new victimteam; new killerteam;*/ if(killerid != INVALID_PLAYER_ID && !IsACop(killerid) && !IstInGangFight(killerid)) { WantedPoints[killerid] += 2; SetPlayerCriminal(killerid,255, "Mord"); SetPlayerWantedLevel(killerid,GetPlayerWantedLevel(playerid)+2); } if(PlayerInfo[playerid][pLevel] > 2 && KHSperre[playerid] == 0 && PlayerInfo[playerid][pJailed] == 0 && PlayerInfo[playerid][pGangJailed] == 0 && PlayerPaintballing[playerid] == 0)PlayerInfo[playerid][pTot] = 1; for(new fs;fs<sizeof(FightSystem);fs++){ if(FightSystem[fs][fsFightTime]){ if(GetPlayerFaction(playerid) == FightSystem[fs][fsOwnerFaction]|| GetPlayerFaction(playerid) == FightSystem[fs][fsAttackFaction])PlayerInfo[playerid][pTot] = 0; } } if (!IsACop(killerid) && reason != 49 && PlayerInfo[killerid][pJailed] == 0 && !IstInGangFight(playerid))SetPlayerCriminal(killerid,255, "Vorsätzlicher Mord"); if (!IsACop(killerid) && reason == 49) SetPlayerCriminal(killerid,255, "Fahrerflucht"); if(gPlayerUsingLoopingAnim[playerid]) { gPlayerUsingLoopingAnim[playerid] = 0; TextDrawHideForPlayer(playerid,txtAnimHelper); } if(BlindFold[playerid] == 1)BlindFold[playerid] = 0; if(PlayerInfo[playerid][pMauled] == 1) PlayerInfo[playerid][pMauled] = 0; InCargo[playerid] = 0; InLevi[playerid] = 0; InEnfo[playerid] = 0; if(FirstSpawn[playerid] == 1) FirstSpawn[playerid] = 0; if(IsBlacklist[playerid]==1) { ClearBlack(playerid); IsBlacklist[playerid]=0; } //======================= //victimteam = gTeam[playerid]; //killerteam = gTeam[killerid]; gPlayerSpawned[playerid] = 0; GetPlayerName(playerid, name, sizeof(name)); PlayerInfo[playerid][pLocal] = 255; if(killerid != 255) { if(reason == 38) { new kstring[128]; new kickname[MAX_PLAYER_NAME]; if(IsPlayerConnected(killerid)) { GetPlayerName(killerid, kickname, sizeof(kickname)); format(string, 256, "Warnung: [%d]%s hat einen Spieler mit einer Minigun gekillt. ACHTUNG [CheatVerdacht].",killerid,kickname); ABroadCast(COLOR_YELLOW,string,1); printf("%s", kstring); } } if(gPlayerCheckpointStatus[playerid] > 4 && gPlayerCheckpointStatus[playerid] < 11) { DisablePlayerCheckpoint(playerid); gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE; } new caller = Mobile[playerid]; if(caller != 255) { if(caller < 255) { SendClientMessage(caller, COLOR_GRAD2, " Die Verbindung wurde unterbrochen...."); CellTime[caller] = 0; CellTime[playerid] = 0; Mobile[caller] = 255; } Mobile[playerid] = 255; CellTime[playerid] = 0; } ClearCrime(playerid); if(PlayerPaintballing[playerid] != 0) { PlayerPaintballKills[killerid] ++; if(PlayerPaintballKills[killerid] > PaintballWinnerKills) { new killer[MAX_PLAYER_NAME]; PaintballWinner = killerid; PaintballWinnerKills = PlayerPaintballKills[killerid]; GetPlayerName(killerid, killer, sizeof(killer)); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(PlayerPaintballing[i] != 0) { format(string, sizeof(string), "* %s ist mit %d Kills in Führung.",killer,PaintballWinnerKills); SendClientMessage(i, COLOR_WHITE, string); } } } } return 1; } if(GettingCK[playerid] < 999 || OnCK[playerid] < 999) { if(IsPlayerConnected(killerid)) { if(GettingCK[killerid] < 999 || OnCK[playerid] < 999) { new killer[MAX_PLAYER_NAME]; new dier[MAX_PLAYER_NAME]; GetPlayerName(playerid, dier, sizeof(dier)); GetPlayerName(killerid, killer, sizeof(killer)); format(string, sizeof(string), "* %s hat deinen Charakter gesperrt, du kannst nun mit diesem Charakter nicht mehr Spielen.",killer); SendClientMessage(playerid, COLOR_LIGHTRED, string); format(string, sizeof(string), "** %s hat den Spieler %s erledigt**",killer,dier); CKLog(string); PlayerInfo[playerid][pCK] = 1; if(GettingCK[playerid] < 999) { GettingCK[playerid] = 999; } else if(OnCK[playerid] < 999) { OnCK[playerid] = 999; } if(GettingCK[killerid] < 999) { GettingCK[killerid] = 999; } else if(OnCK[killerid] < 999) { OnCK[killerid] = 999; } KickPlayer[playerid] = 1; } } } if(PlayerInfo[playerid][pHeadValue] > 0) { if(IsPlayerConnected(killerid)) { if(PlayerInfo[killerid][pMember] == 8 || PlayerInfo[killerid][pLeader] == 8) { ConsumingMoney[killerid] = 1; new killer[MAX_PLAYER_NAME]; GetPlayerName(killerid, killer, sizeof(killer)); FraktionsKasse[7] += PlayerInfo[playerid][pHeadValue]/2; GivePlayerMoney(killerid, PlayerInfo[playerid][pHeadValue]/2); format(string,128,"<< Hitman %s hat den Auftrag an %s erfüllt und bekommt: $%d >>",killer,name,PlayerInfo[playerid][pHeadValue]/2); SendFamilyMessage(8, COLOR_YELLOW, string); PlayerInfo[playerid][pHeadValue] = 0; } } } GW_OnPlayerDeath(playerid, killerid, reason); killerid = INVALID_PLAYER_ID; SetPlayerColor(playerid,COLOR_GRAD2); return 1; }
Code
Alles anzeigenFunction OnPlayerDeath(playerid, killerid, reason) { new Float:xPosi[3]; GetPlayerPos(playerid, xPosi[0],xPosi[1],xPosi[2]); TodesIcon[playerid] = CreatePickup(1254, 1, xPosi[0], xPosi[1], xPosi[2]); TodesITimer[playerid] = SetTimer("DestroyTodesIcon", 1000*60, false); M_OnPlayerDeath(playerid,killerid,reason); new name[MAX_PLAYER_NAME]; new string[256]; PlayerInfo[playerid][pInvWeapon] = 0; PlayerInfo[playerid][pInvAmmo] = 0; PlayerInfo[playerid][pInvWeapon2] = 0; PlayerInfo[playerid][pInvAmmo2] = 0; FrakMatsHolding[playerid] = 0; PlayerInfo[playerid][pDeaths] ++; PlayerInfo[killerid][pKills] ++; /*new playercash; new victimteam; new killerteam;*/ if(killerid != INVALID_PLAYER_ID && !IsACop(killerid) && !IstInGangFight(killerid)) { WantedPoints[killerid] += 2; SetPlayerCriminal(killerid,255, "Mord"); SetPlayerWantedLevel(killerid,GetPlayerWantedLevel(playerid)+2); } if(PlayerInfo[playerid][pLevel] > 2 && KHSperre[playerid] == 0 && PlayerInfo[playerid][pJailed] == 0 && PlayerInfo[playerid][pGangJailed] == 0 && PlayerPaintballing[playerid] == 0) { PlayerInfo[playerid][pTot] = 1; } for(new fs;fs<sizeof(FightSystem);fs++) { if(FightSystem[fs][fsFightTime]) { if(GetPlayerFaction(playerid) == FightSystem[fs][fsOwnerFaction]|| GetPlayerFaction(playerid) == FightSystem[fs][fsAttackFaction]) { PlayerInfo[playerid][pTot] = 0; } } } if(!IsACop(killerid) && reason != 49 && PlayerInfo[killerid][pJailed] == 0 && !IstInGangFight(playerid)) { SetPlayerCriminal(killerid,255, "Vorsätzlicher Mord"); } if(!IsACop(killerid) && reason == 49) { SetPlayerCriminal(killerid,255, "Fahrerflucht"); } if(gPlayerUsingLoopingAnim[playerid]) { gPlayerUsingLoopingAnim[playerid] = 0; TextDrawHideForPlayer(playerid,txtAnimHelper); } if(BlindFold[playerid] == 1) { BlindFold[playerid] = 0; } if(PlayerInfo[playerid][pMauled] == 1) { PlayerInfo[playerid][pMauled] = 0; } InCargo[playerid] = 0; InLevi[playerid] = 0; InEnfo[playerid] = 0; if(FirstSpawn[playerid] == 1) { FirstSpawn[playerid] = 0; } if(IsBlacklist[playerid]==1) { ClearBlack(playerid); IsBlacklist[playerid]=0; } //======================= //victimteam = gTeam[playerid]; //killerteam = gTeam[killerid]; gPlayerSpawned[playerid] = 0; GetPlayerName(playerid, name, sizeof(name)); PlayerInfo[playerid][pLocal] = 255; if(killerid != 255) if(reason == 38) { new kstring[128]; new kickname[MAX_PLAYER_NAME]; if(IsPlayerConnected(killerid)) { GetPlayerName(killerid, kickname, sizeof(kickname)); format(string, 256, "Warnung: [%d]%s hat einen Spieler mit einer Minigun gekillt. ACHTUNG [CheatVerdacht].",killerid,kickname); ABroadCast(COLOR_YELLOW,string,1); printf("%s", kstring); } } if (gPlayerCheckpointStatus[playerid] > 4 && gPlayerCheckpointStatus[playerid] < 11) { DisablePlayerCheckpoint(playerid); gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE; } new caller = Mobile[playerid]; if(caller != 255) { if(caller < 255) { SendClientMessage(caller, COLOR_GRAD2, " Die Verbindung wurde unterbrochen...."); CellTime[caller] = 0; CellTime[playerid] = 0; Mobile[caller] = 255; } Mobile[playerid] = 255; CellTime[playerid] = 0; } ClearCrime(playerid); if(PlayerPaintballing[playerid] != 0) { PlayerPaintballKills[killerid] ++; if(PlayerPaintballKills[killerid] > PaintballWinnerKills) { new killer[MAX_PLAYER_NAME]; PaintballWinner = killerid; PaintballWinnerKills = PlayerPaintballKills[killerid]; GetPlayerName(killerid, killer, sizeof(killer)); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(PlayerPaintballing[i] != 0) { format(string, sizeof(string), "* %s ist mit %d Kills in Führung.",killer,PaintballWinnerKills); SendClientMessage(i, COLOR_WHITE, string); } } } } return 1; } if(GettingCK[playerid] < 999 || OnCK[playerid] < 999) { if(IsPlayerConnected(killerid)) { if(GettingCK[killerid] < 999 || OnCK[playerid] < 999) { new killer[MAX_PLAYER_NAME]; new dier[MAX_PLAYER_NAME]; GetPlayerName(playerid, dier, sizeof(dier)); GetPlayerName(killerid, killer, sizeof(killer)); format(string, sizeof(string), "* %s hat deinen Charakter gesperrt, du kannst nun mit diesem Charakter nicht mehr Spielen.",killer); SendClientMessage(playerid, COLOR_LIGHTRED, string); format(string, sizeof(string), "** %s hat den Spieler %s erledigt**",killer,dier); CKLog(string); PlayerInfo[playerid][pCK] = 1; if(GettingCK[playerid] < 999) { GettingCK[playerid] = 999; } else if(OnCK[playerid] < 999) { OnCK[playerid] = 999; } if(GettingCK[killerid] < 999) { GettingCK[killerid] = 999; } else if(OnCK[killerid] < 999) { OnCK[killerid] = 999; } KickPlayer[playerid] = 1; } } } if(PlayerInfo[playerid][pHeadValue] > 0) { if(IsPlayerConnected(killerid)) { if(PlayerInfo[killerid][pMember] == 8 || PlayerInfo[killerid][pLeader] == 8) { ConsumingMoney[killerid] = 1; new killer[MAX_PLAYER_NAME]; GetPlayerName(killerid, killer, sizeof(killer)); FraktionsKasse[7] += PlayerInfo[playerid][pHeadValue]/2; GivePlayerMoney(killerid, PlayerInfo[playerid][pHeadValue]/2); format(string,128,"<< Hitman %s hat den Auftrag an %s erfüllt und bekommt: $%d >>",killer,name,PlayerInfo[playerid][pHeadValue]/2); SendFamilyMessage(8, COLOR_YELLOW, string); PlayerInfo[playerid][pHeadValue] = 0; } } } GW_OnPlayerDeath(playerid, killerid, reason); killerid = INVALID_PLAYER_ID; SetPlayerColor(playerid,COLOR_GRAD2); return 1; }
-
Wenn ich ehrlich bin, steige ich selbst nicht durch dein Code durch.
Aber versuch das mal: http://pastebin.com/DMnnW8TT und http://pastebin.com/V9q5K0ti -
Dann heißt es vielleicht Funtion OnPlayerDeath
-
Kannst du mir komplett dein public OnPlayerDeath bitte senden.