Angepinnt [SAMMELTHREAD] Kleine Scripting Fragen

Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

  • Kaliber schrieb:

    Da du ja schon crashdetect geladen hast, zeig uns mal den server.log, da steht eine genauere Fehlerbeschreibung drinnen :)
    Gesamte Server Log eines Starts.

    Brainfuck-Quellcode

    1. SA-MP Dedicated Server
    2. ----------------------
    3. v0.3.DL-R1, (C)2005-2018 SA-MP Team
    4. [20:35:37] filterscripts = "" (string)
    5. [20:35:37]
    6. [20:35:37] Server Plugins
    7. [20:35:37] --------------
    8. [20:35:37] Loading plugin: crashdetect.so
    9. [20:35:37] CrashDetect plugin 4.19
    10. [20:35:37] Loaded.
    11. [20:35:37] Loading plugin: mysql.so
    12. [20:35:37] >> plugin.mysql: R41-3 successfully loaded.
    13. [20:35:37] Loaded.
    14. [20:35:37] Loading plugin: sscanf.so
    15. [20:35:37]
    16. [20:35:37] ===============================
    17. [20:35:37] sscanf plugin loaded.
    18. [20:35:37] Version: 2.8.2
    19. [20:35:37] (c) 2012 Alex "Y_Less" Cole
    20. [20:35:37] ===============================
    21. [20:35:37] Loaded.
    22. [20:35:37] Loading plugin: nativechecker.so
    23. [20:35:37] Loaded.
    24. [20:35:37] Loading plugin: streamer.so
    25. [20:35:37]
    26. *** Streamer Plugin v2.9.3 by Incognito loaded ***
    27. [20:35:37] Loaded.
    28. [20:35:37] Loaded 5 plugins.
    29. [20:35:37] [artwork:crc] object.dff CRC = 0xDCFCC14C
    30. [20:35:37] [artwork:crc] login.txd CRC = 0xF5C5054
    31. [20:35:37] [artwork:crc] object.dff CRC = 0xDCFCC14C
    32. [20:35:37] [artwork:crc] logo.txd CRC = 0x261CB0EF
    33. [20:35:37] [artwork:crc] object.dff CRC = 0xDCFCC14C
    34. [20:35:37] [artwork:crc] bank_system1.txd CRC = 0x10B4C225
    35. [20:35:37] [artwork:crc] object.dff CRC = 0xDCFCC14C
    36. [20:35:37] [artwork:crc] bank_system2.txd CRC = 0x9F2B9F1F
    37. [20:35:37] [artwork:crc] object.dff CRC = 0xDCFCC14C
    38. [20:35:37] [artwork:crc] tacho.txd CRC = 0x9F7ED53B
    39. [20:35:37] [artwork:crc] object.dff CRC = 0xDCFCC14C
    40. [20:35:37] [artwork:crc] tachonadeln_1bis100.txd CRC = 0xE25BA37F
    41. [20:35:37] [artwork:crc] object.dff CRC = 0xDCFCC14C
    42. [20:35:37] [artwork:crc] tachonadeln_101bis200.txd CRC = 0x7C8FFBBF
    43. [20:35:37] [artwork:crc] object.dff CRC = 0xDCFCC14C
    44. [20:35:37] [artwork:crc] tachonadeln_201bis285.txd CRC = 0xDFC76622
    45. [20:35:37]
    46. [20:35:37] Filterscripts
    47. [20:35:37] ---------------
    48. [20:35:37] Loaded 0 filterscripts.
    49. [20:35:37] Error: Function not registered: 'CreateDynamicObject'
    50. [20:35:37] Error: Function not registered: 'SetDynamicObjectMaterial'
    51. [20:35:37] >> MySQL: Die Verbindung zur Datenbank wurde erfolgreich hergestellt.
    52. [20:35:37] >> Status: Erfolgreich
    53. [20:35:37] Number of vehicle models: 0
    54. [20:35:37] >> ATM's geladen 0/50
    55. [20:36:14] [connection] incoming connection: 46.81.13.125:64719 id: 0
    56. [20:36:14] [join] Alva has joined the server (0:46.81.13.125)
    57. [20:45:37] [connection] incoming connection: 46.81.13.125:56335 id: 1
    58. [20:45:40] [part] Alva has left the server (0:0)
    Alles anzeigen
  • Hallo Leute

    Kann man eig auch anders fragen ob der Cop der Killer ist. Weil mein Gang System also nur die Gangs haben ein eigenes OnPlayerDeath. Es heißt Gw_OnPlayerDeath voll die kacke irgendwie.
    Das Problem ist dass bei OnPlayerDeath überlist es die Gang/Mafia Mitglieder und die landen nicht im Knast. Können wir es irgendwo anders einfügen z.B bei OnPlayerStatChange?? aber da ist das Wort Killerid ein Fehler.

    Ich freue mich auf eure Hilfe

    PAWN-Quellcode

    1. if (WantedLevel[playerid] >= 1)
    2. {
    3. new price = WantedLevel[playerid] * 150;
    4. //new count;
    5. if (IsACop(killerid))
    6. {
    7. // COP
    8. format(string, sizeof(string), "COPKILL", price);
    9. GameTextForPlayer(killerid, string, 2000, 1);
    10. ConsumingMoney[killerid] = 1;
    11. FraktionsKasse[0] += price/2;
    12. FraktionsKasse[1] += price/2;
    13. FraktionsKasse[2] += price/2;
    14. PlayerPlaySound(killerid, 1058, 0.0, 0.0, 0.0);
    15. // VERBRECHER
    16. GivePlayerMoney(playerid, -price);
    17. PlayerInfo[playerid][pWantedDeaths] += 1;
    18. PlayerInfo[playerid][pJailed] = 1;
    19. SpawnPlayer(playerid);
    20. PlayerInfo[playerid][pJailTime] = (WantedLevel[playerid] * 120);
    21. format(string, sizeof(string), "Du musst für %d Sekunden ins Gefängnis-[Strafe: $%d]", PlayerInfo[playerid][pJailTime], price);
    22. GameTextForPlayer(playerid, "~r~BUSTED", 2300,5);
    23. SendClientMessage(playerid, rot, string);
    24. WantedPoints[playerid] = 0;
    25. WantedLevel[playerid] = 0;
    26. SetPlayerVirtualWorld(playerid, 0);
    27. }
    28. }
    Alles anzeigen



    Mit freundlichen Grüßen
  • HandsUper schrieb:

    Hallo Leute

    Kann man eig auch anders fragen ob der Cop der Killer ist. Weil mein Gang System also nur die Gangs haben ein eigenes OnPlayerDeath. Es heißt Gw_OnPlayerDeath voll die kacke irgendwie.
    Das Problem ist dass bei OnPlayerDeath überlist es die Gang/Mafia Mitglieder und die landen nicht im Knast. Können wir es irgendwo anders einfügen z.B bei OnPlayerStatChange?? aber da ist das Wort Killerid ein Fehler.

    Ich freue mich auf eure Hilfe

    PAWN-Quellcode

    1. if (WantedLevel[playerid] >= 1){new price = WantedLevel[playerid] * 150;//new count;if (IsACop(killerid)){// COPformat(string, sizeof(string), "COPKILL", price);GameTextForPlayer(killerid, string, 2000, 1);ConsumingMoney[killerid] = 1;FraktionsKasse[0] += price/2;FraktionsKasse[1] += price/2;FraktionsKasse[2] += price/2;PlayerPlaySound(killerid, 1058, 0.0, 0.0, 0.0);// VERBRECHERGivePlayerMoney(playerid, -price);PlayerInfo[playerid][pWantedDeaths] += 1;PlayerInfo[playerid][pJailed] = 1;SpawnPlayer(playerid);PlayerInfo[playerid][pJailTime] = (WantedLevel[playerid] * 120);format(string, sizeof(string), "Du musst für %d Sekunden ins Gefängnis-[Strafe: $%d]", PlayerInfo[playerid][pJailTime], price);GameTextForPlayer(playerid, "~r~BUSTED", 2300,5);SendClientMessage(playerid, rot, string);WantedPoints[playerid] = 0;WantedLevel[playerid] = 0;SetPlayerVirtualWorld(playerid, 0);}}



    Mit freundlichen Grüßen
    Füg mal das "GW_OnPlayerDeath" nach der if(isCop) abfrage ein und teste es erneut
    #'EDIT
    Meine nach der "if (WantedLevel[playerid] >= 1)" abfrage
    Mit freundlichen Grüßen,

    Fabi.StaR :love: :saint:

    Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von Fabi.StaR ()

  • HandsUper schrieb:

    OnPlayerDeath überlist es die Gang/Mafia Mitglieder
    2 Möglichkeiten:

    1. Du packst die Abfrage ob das Gang/Mafia Mitglied getötet wurde von einem Cop in deren Abfrage (quick&dirty).
    2. Besser wäre es zu schaun, wieso OnPlayerDeath nach dem Hook nicht mehr getriggert wird. Vermutlich weil falsch bzw so gehookt wurde, dass das danach eben nicht mehr aufgerufen wird. Wenn du uns zeigt wie das GW_OnPlayerDeath aussieht, können wir dir evtl besser helfen :) oder du entscheidest dich für Option 1 :D


    Leute, lernt scripten und versucht mal lieber etwas selber zu schreiben, als es aus einem GF zu kopieren. X/
  • Die Gang Anfrage ist die

    PAWN-Quellcode

    1. if(IsAGang(playerid)


    Wie füge ich das richtig ein?? @Kaliber

    PAWN-Quellcode

    1. if (WantedLevel[playerid] >= 1)
    2. {
    3. new price = WantedLevel[playerid] * 150;
    4. //new count;
    5. if (IsACop(killerid))
    6. {
    7. // COP
    8. format(string, sizeof(string), "COPKILL", price);
    9. GameTextForPlayer(killerid, string, 2000, 1);
    10. ConsumingMoney[killerid] = 1;
    11. FraktionsKasse[0] += price/2;
    12. FraktionsKasse[1] += price/2;
    13. FraktionsKasse[2] += price/2;
    14. PlayerPlaySound(killerid, 1058, 0.0, 0.0, 0.0);
    15. // VERBRECHER
    16. if(IsAGang(playerid)) //Ist das richtig??
    17. {
    18. GivePlayerMoney(playerid, -price);
    19. PlayerInfo[playerid][pWantedDeaths] += 1;
    20. PlayerInfo[playerid][pJailed] = 1;
    21. SpawnPlayer(playerid);
    22. PlayerInfo[playerid][pJailTime] = (WantedLevel[playerid] * 120);
    23. format(string, sizeof(string), "Du musst für %d Sekunden ins Gefängnis-[Strafe: $%d]", PlayerInfo[playerid][pJailTime], price);
    24. GameTextForPlayer(playerid, "~r~BUSTED", 2300,5);
    25. SendClientMessage(playerid, rot, string);
    26. WantedPoints[playerid] = 0;
    27. WantedLevel[playerid] = 0;
    28. SetPlayerVirtualWorld(playerid, 0);
    29. }
    30. }
    31. }
    Alles anzeigen

    Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von HandsUper ()


  • Kaliber schrieb:

    Fabi.StaR schrieb:

    Ist es Möglich das ein Actor als "Taxifahrer" umfährt den man per Anruf rufen kann?
    Nein, Actor kann man leider nicht in ein Fahrzeug setzen :/
    Sowas wäre aber mit NPCs möglich :)
    Danke dir erstmal für deine schnelle Information könntest du mir eine "Kleine" start hilfe geben? habe in der ganzen zeit wo ich "scripter" bin nicht einmal mit NPC gearbeitet (#ShameOnMe :/ X/ ).
    Mit freundlichen Grüßen,

    Fabi.StaR :love: :saint:

  • Das kommt darauf an, was du vor hast.

    Google mal nach Taxi System, da kommen ganz viele schon.

    Daran kannst du dich orientieren und tutorials zu NPCs gibts auch massig.

    Vor 6 Jahren hatte ich da mal ein System zu geschrieben sogar hahaha :D

    Wie die Zeit vergeht :)

    [Bot] Taxi System V. 1x


    Leute, lernt scripten und versucht mal lieber etwas selber zu schreiben, als es aus einem GF zu kopieren. X/
  • Hallo Leute

    Ich habe leider ein großes Problem. Wie ich vorhin geschrieben habe gibt es ein Problem beim BUSTED System.
    Die Zivis und Staatsfraktionen landen im Knast nachdem sie mit Wanteds von einem Cop gekillt wurden. Was aber bei den Gang/Mafien Mitgliedern nicht der Fall ist.
    Die Fightfactions also die Gang/Mafien landen nur im Knast wenn Sie in einem Gangfight Gebiet gekillt wurden. Aber außerhalb landen Sie ganz normal in der Base.
    Wie kann ich abfragen ob ein Gang/Mafia Mitglied umgebracht wurde damit die Fightfactions auch im Knast landen. Die Gang Mafien Mitglieder landen nie im Krankenhaus
    nach dem Tod. Sie landen im Krankenhaus nachdem Tod nur wenn sie im Gebiet getötet wurden. Der Normale OnPlayerDeath funkzuniert bei den Gang/Mafien Mitgliedern nur wenn sie im Gebiet sterben.

    Ich brauche dringend Hilfe :/ Ich kann sonst leider nicht weiter machen.

    PAWN-Quellcode

    1. Function IsAGang(playerid)
    2. {
    3. if(IsPlayerConnected(playerid))
    4. {
    5. new leader = PlayerInfo[playerid][pLeader];
    6. new member = PlayerInfo[playerid][pMember];
    7. if(member==5 || member==6 || member==12 || member==13 || member==14 || member==16 || member==17 || member==18 || member == 19 || member==21 || member==23 || member==25)
    8. {
    9. return 1;
    10. }
    11. else if(leader==5 || leader==6 || leader==12 || leader==13 || leader==14 || leader==16 || leader==17 || leader==18 || leader == 19 || leader==21 || leader==23 || leader==25)
    12. {
    13. return 1;
    14. }
    15. }
    16. return 0;
    17. }
    Alles anzeigen


    PAWN-Quellcode

    1. stock IsAFightFaction(Faction){
    2. if(Faction == 5 || Faction == 6 || Faction == 13 || Faction == 14 || Faction == 16 || Faction == 17 || Faction == 23 || Faction == 25 || Faction == 12)
    3. return 1;
    4. return 0;
    5. }


    PAWN-Quellcode

    1. if (WantedLevel[playerid] >= 1)
    2. {
    3. new price = WantedLevel[playerid] * 150;
    4. //new count;
    5. if (IsACop(killerid))
    6. {
    7. // COP
    8. format(string, sizeof(string), "COPKILL", price);
    9. GameTextForPlayer(killerid, string, 2000, 1);
    10. ConsumingMoney[killerid] = 1;
    11. FraktionsKasse[0] += price/2;
    12. FraktionsKasse[1] += price/2;
    13. FraktionsKasse[2] += price/2;
    14. PlayerPlaySound(killerid, 1058, 0.0, 0.0, 0.0);
    15. // VERBRECHER
    16. {
    17. GivePlayerMoney(playerid, -price);
    18. PlayerInfo[playerid][pWantedDeaths] += 1;
    19. PlayerInfo[playerid][pJailed] = 1;
    20. SpawnPlayer(playerid);
    21. PlayerInfo[playerid][pJailTime] = (WantedLevel[playerid] * 120);
    22. format(string, sizeof(string), "Du musst für %d Sekunden ins Gefängnis-[Strafe: $%d]", PlayerInfo[playerid][pJailTime], price);
    23. GameTextForPlayer(playerid, "~r~BUSTED", 2300,5);
    24. SendClientMessage(playerid, rot, string);
    25. WantedPoints[playerid] = 0;
    26. WantedLevel[playerid] = 0;
    27. SetPlayerVirtualWorld(playerid, 0);
    28. }
    29. }
    30. }
    Alles anzeigen




    Mit freundlichen Grüßen
  • Hallo @Douq


    PAWN-Quellcode

    1. public OnPlayerDeath(playerid, killerid, reason)
    2. {
    3. M_OnPlayerDeath(playerid,killerid,reason);
    4. GW_OnPlayerDeath(playerid, killerid, reason); // Das hier ist der Gangfight SysteM Kill
    5. SendDeathMessage(killerid, playerid, reason);
    6. if(PlayerInfo[playerid][pBankrob] == 1)
    7. {
    8. if(PlayerInfo[playerid][pbarena] == 1)
    9. {
    10. GivePlayerMoney(killerid,25);
    11. GivePlayerMoney(playerid,-25);
    12. GameTextForPlayer(killerid, "~g~KILL+!", 1000,5);
    13. }
    14. if(GetPlayerScore(killerid) == 1)
    15. {
    16. new name[MAX_PLAYER_NAME], string[70];
    17. GetPlayerName(killerid, name, sizeof(name));format(string, sizeof(string), "[Anti-DM]: Spieler %s wurde vom Server gekickt + Warn. [Grund]: DM als Neuling.",name);
    18. SendClientMessageToAll(rot, string);
    19. Kick(killerid);
    20. }
    21. new name[MAX_PLAYER_NAME];
    22. new string[256];
    23. PlayerInfo[playerid][pInvWeapon] = 0;
    24. PlayerInfo[playerid][pInvAmmo] = 0;
    25. PlayerInfo[playerid][pInvWeapon2] = 0;
    26. PlayerInfo[playerid][pInvAmmo2] = 0;
    27. FrakMatsHolding[playerid] = 0;
    28. new playercash;
    29. new victimteam;
    30. // new killerteam;
    31. if(PlayerInfo[playerid][pJailed] == 0 && PlayerInfo[playerid][sparena] == 0 && PlayerInfo[playerid][pbarena] == 0 && KHSperre[playerid] == 0 && PlayerInfo[playerid][pwJailed] == 0 && PlayerInfo[playerid][pGangJailed] == 0 && PlayerPaintballing[playerid] == 0)
    32. {
    33. PlayerInfo[playerid][pTot] = 1;
    34. }
    35. if(gPlayerUsingLoopingAnim[playerid])
    36. {
    37. gPlayerUsingLoopingAnim[playerid] = 0;
    38. }
    39. if(PlayerOnFire[playerid])
    40. {
    41. SendClientMessage(playerid, 0xff000000, "Du bist verbrannt!"); StopPlayerBurning(playerid);
    42. }
    43. if(BlindFold[playerid] == 1)
    44. {
    45. BlindFold[playerid] = 0;
    46. }
    47. if(PlayerInfo[playerid][pMauled] == 1)
    48. {
    49. PlayerInfo[playerid][pMauled] = 0;
    50. }
    51. if(IsBlacklist[playerid]==1)
    52. {
    53. ClearBlack(playerid);
    54. IsBlacklist[playerid]=0;
    55. }
    56. InCargo[playerid] = 0; InShamal[playerid] = 0;
    57. if(FirstSpawn[playerid] == 1)
    58. {
    59. FirstSpawn[playerid] = 0;
    60. }
    61. if (WantedLevel[playerid] >= 1)
    62. {
    63. new price = WantedLevel[playerid] * 150;
    64. //new count;
    65. if (IsACop(killerid))
    66. {
    67. // COP
    68. format(string, sizeof(string), "COPKILL", price);
    69. GameTextForPlayer(killerid, string, 2000, 1);
    70. ConsumingMoney[killerid] = 1;
    71. FraktionsKasse[0] += price/2;
    72. FraktionsKasse[1] += price/2;
    73. FraktionsKasse[2] += price/2;
    74. PlayerPlaySound(killerid, 1058, 0.0, 0.0, 0.0);
    75. // VERBRECHER
    76. GivePlayerMoney(playerid, -price);
    77. PlayerInfo[playerid][pWantedDeaths] += 1;
    78. PlayerInfo[playerid][pJailed] = 1;
    79. SpawnPlayer(playerid);
    80. PlayerInfo[playerid][pJailTime] = (WantedLevel[playerid] * 120);
    81. format(string, sizeof(string), "Du musst für %d Sekunden ins Gefängnis-[Strafe: $%d]", PlayerInfo[playerid][pJailTime], price);
    82. GameTextForPlayer(playerid, "~r~BUSTED", 2300,5);
    83. SendClientMessage(playerid, rot, string);
    84. WantedPoints[playerid] = 0;
    85. WantedLevel[playerid] = 0;
    86. SetPlayerVirtualWorld(playerid, 0);
    87. }
    88. }
    89. gPlayerSpawned[playerid] = 0;
    90. GetPlayerName(playerid, name, sizeof(name));
    91. PlayerInfo[playerid][pLocal] = 255;
    92. if(killerid != 255)
    93. if(reason == 38)
    94. {
    95. new kstring[128];
    96. new kickname[MAX_PLAYER_NAME];
    97. if(IsPlayerConnected(killerid))
    98. {
    99. GetPlayerName(killerid, kickname, sizeof(kickname));
    100. format(string, 256, "Warnung: [%d]%s hat einen Spieler mit einer Minigun gekillt. ACHTUNG [CheatVerdacht].",killerid,kickname);
    101. ABroadCast(COLOR_YELLOW,string,1);
    102. printf("%s", kstring);
    103. }
    104. }
    105. if (gPlayerCheckpointStatus[playerid] > 4 && gPlayerCheckpointStatus[playerid] < 11)
    106. {
    107. DisablePlayerCheckpoint(playerid);
    108. gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
    109. }
    110. new caller = Mobile[playerid];
    111. if(caller != 255)
    112. {
    113. if(caller < 255)
    114. {
    115. SendClientMessage(caller, rot, "Die Verbindung wurde unterbrochen....");
    116. CellTime[caller] = 0;
    117. CellTime[playerid] = 0;
    118. Mobile[caller] = 255;
    119. }
    120. Mobile[playerid] = 255;
    121. CellTime[playerid] = 0;
    122. }
    123. ClearCrime(playerid);
    124. if(PlayerPaintballing[playerid] != 0)
    125. {
    126. PlayerPaintballKills[killerid] ++;
    127. if(PlayerPaintballKills[killerid] > PaintballWinnerKills)
    128. {
    129. new killer[MAX_PLAYER_NAME];
    130. PaintballWinner = killerid;
    131. SetPlayerInterior(playerid, 10);
    132. PaintballWinnerKills = PlayerPaintballKills[killerid];
    133. GetPlayerName(killerid, killer, sizeof(killer));
    134. for(new i = 0; i < MAX_PLAYERS; i++)
    135. {
    136. if(IsPlayerConnected(i))
    137. {
    138. if(PlayerPaintballing[i] != 0)
    139. {
    140. format(string, sizeof(string), "* %s ist mit %d Kills in Führung.",killer,PaintballWinnerKills);
    141. SendClientMessage(i, COLOR_WHITE, string);
    142. }
    143. }
    144. }
    145. }
    146. return 1;
    147. }
    148. if(GettingCK[playerid] < 999 || OnCK[playerid] < 999)
    149. {
    150. if(IsPlayerConnected(killerid))
    151. {
    152. if(GettingCK[killerid] < 999 || OnCK[playerid] < 999)
    153. {
    154. new killer[MAX_PLAYER_NAME];
    155. new dier[MAX_PLAYER_NAME];
    156. GetPlayerName(playerid, dier, sizeof(dier));
    157. GetPlayerName(killerid, killer, sizeof(killer));
    158. format(string, sizeof(string), "* %s hat deinen Charakter gesperrt, du kannst nun mit diesem Charakter nicht mehr Spielen.",killer);
    159. SendClientMessage(playerid, COLOR_LIGHTRED, string);
    160. format(string, sizeof(string), "** %s hat den Spieler %s erledigt**",killer,dier);
    161. CKLog(string);
    162. PlayerInfo[playerid][pCK] = 1;
    163. if(GettingCK[playerid] < 999) { GettingCK[playerid] = 999; }
    164. else if(OnCK[playerid] < 999) { OnCK[playerid] = 999; }
    165. if(GettingCK[killerid] < 999) { GettingCK[killerid] = 999; }
    166. else if(OnCK[killerid] < 999) { OnCK[killerid] = 999; }
    167. KickPlayer[playerid] = 1;
    168. }
    169. }
    170. }
    171. if(PlayerInfo[playerid][pHeadValue] > 0)
    172. {
    173. if(IsPlayerConnected(killerid))
    174. {
    175. if(PlayerInfo[killerid][pMember] == 8 || PlayerInfo[killerid][pLeader] == 8)
    176. {
    177. if(GoChase[killerid] == playerid)
    178. {
    179. ConsumingMoney[killerid] = 1;
    180. new killer[MAX_PLAYER_NAME];
    181. GetPlayerName(killerid, killer, sizeof(killer));
    182. new fkasse = PlayerInfo[playerid][pHeadValue]/2;
    183. FraktionsKasse[7] += fkasse;
    184. GivePlayerMoney(killerid, PlayerInfo[playerid][pHeadValue]/2);
    185. format(string,128,"<< Hitman %s hat den Auftrag an %s erfüllt und bekommt: $%d >>",killer,name,PlayerInfo[playerid][pHeadValue]/2);
    186. SendFamilyMessage(8, COLOR_YELLOW, string);
    187. SendClientMessage(playerid, COLOR_YELLOW, "Du wurdest von einem Hitman getötet, da auf dich ein Contract gesetz war.");
    188. PlayerInfo[playerid][pHeadValue] = 0;
    189. GotHit[playerid] = 0;
    190. GetChased[playerid] = 999;
    191. GoChase[killerid] = 999;
    192. }
    193. }
    194. }
    195. }
    196. if(victimteam >= 4)
    197. {
    198. if(IsPlayerConnected(killerid))
    199. {
    200. new slice = 100; //$100
    201. playercash = GetPlayerMoney(playerid);
    202. if(gTeam[killerid] != 2 && PlayerInfo[killerid][pMember] != 7) { WantedPoints[killerid] += 2; } //+ 2 wanted points
    203. if(SafeTime[playerid] <= 0)
    204. {
    205. if(gTeam[killerid] != gTeam[playerid])
    206. {
    207. if(GetPlayerState(killerid) == 1)
    208. {
    209. PlayerInfo[killerid][pKills] = PlayerInfo[killerid][pKills] + 1;
    210. }
    211. else
    212. {
    213. PlayerInfo[killerid][pKills]++;
    214. }
    215. PlayerInfo[playerid][pDeaths]++;
    216. }
    217. }
    218. if (playercash > 0)
    219. {
    220. GivePlayerMoney(playerid, -slice);
    221. }
    222. else
    223. {
    224. slice = slice+500;
    225. }
    226. GivePlayerMoney(killerid, slice);
    227. PlayerPlaySound(killerid, 1083, 0.0, 0.0, 0.0);
    228. if (((gTeam[killerid]) == 3) && reason != 49 && PlayerInfo[killerid][pJailed] == 0 && !IsPlayerInArea(killerid, 560.538, -724.0283, 875.8406, -362.0141))
    229. {
    230. SetPlayerCriminal(killerid,255, "Vorsätzlicher Mord");
    231. }
    232. else if (((gTeam[killerid]) == 3) && reason == 49)
    233. {
    234. SetPlayerCriminal(killerid,255, "Fahrerflucht");
    235. }
    236. }
    237. }
    238. else if (victimteam == 2)
    239. {
    240. if(IsPlayerConnected(killerid))
    241. {
    242. // Cop kill
    243. PlayerInfo[playerid][pKills]--;
    244. if (gTeam[killerid] == 2)//cops kill cop
    245. {
    246. PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
    247. GivePlayerMoney(killerid, -suecost);
    248. GivePlayerMoney(playerid, suecost+100);//+100pays hospital bill
    249. }
    250. if (gTeam[killerid] >= 3)
    251. {
    252. WantedPoints[killerid] += 2; //+ 2 wanted points
    253. if(reason != 49)
    254. {
    255. SetPlayerCriminal(killerid,255, "Vorsätzlicher Mord");
    256. }
    257. else if (reason == 49)
    258. {
    259. SetPlayerCriminal(killerid,255, "Fahrerflucht");
    260. }
    261. }
    262. if(gTeam[killerid] >= 5 && SafeTime[playerid] <= 0)
    263. {
    264. if(GetPlayerState(killerid) == 1)
    265. {
    266. PlayerInfo[killerid][pKills] = PlayerInfo[killerid][pKills]+2;
    267. }
    268. else
    269. {
    270. PlayerInfo[killerid][pKills]++;
    271. }
    272. WantedPoints[killerid]+=2;
    273. }
    274. }
    275. }
    276. else if (victimteam == 3)
    277. {
    278. if(IsPlayerConnected(killerid))
    279. {
    280. // Civ kill
    281. if ((gTeam[killerid]) == 2 || PlayerInfo[killerid][pMember] == 7)//cops kill civ
    282. {
    283. if(WantedLevel[playerid] < 1)
    284. {
    285. PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
    286. GivePlayerMoney(killerid, -suecost);
    287. GivePlayerMoney(playerid, suecost+100);//+100pays hospital bill
    288. }
    289. }
    290. else
    291. {
    292. WantedPoints[killerid] += 2;
    293. }
    294. if (((gTeam[killerid]) >= 3 || (gTeam[killerid]) == 1) && reason != 49)
    295. {
    296. SetPlayerCriminal(killerid,255, "Vorsätzlicher Mord");
    297. }
    298. else if (((gTeam[killerid]) >= 3 || (gTeam[killerid]) == 1) && reason == 49)
    299. {
    300. SetPlayerCriminal(killerid,255, "Fahrerflucht");
    301. }
    302. }
    303. }
    304. else if (victimteam == 1)
    305. {
    306. if(IsPlayerConnected(killerid))
    307. {
    308. // Civ kill
    309. if ((gTeam[killerid]) == 2)//cops kill civ
    310. {
    311. PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
    312. GivePlayerMoney(killerid, -suecost);
    313. GivePlayerMoney(playerid, suecost+100);//+100pays hospital bill
    314. }
    315. else if ((gTeam[killerid]) == 1)//med kill civ
    316. {
    317. PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
    318. GivePlayerMoney(killerid, -suecost);
    319. GivePlayerMoney(playerid, suecost+100);//+100pays hospital bill
    320. }
    321. if (((gTeam[killerid]) == 4) && reason != 49)
    322. {
    323. SetPlayerCriminal(killerid,255, "Vorsätzlicher Mord");
    324. }
    325. else if (((gTeam[killerid]) == 3) && reason == 49)
    326. {
    327. SetPlayerCriminal(killerid,255, "Fahrerflucht");
    328. }
    329. }
    330. }
    331. return 1;
    332. }
    Alles anzeigen


    MFG
  • Was sofort auffällt: Du überprüfst nirgends, ob killerid = INVALID_PLAYER_ID ist. Das ist immer dann der Fall, wenn der Spieler ohne Einwirkungen eines anderen Spielers stirbt. Näheres hier: wiki.sa-mp.com/wiki/OnPlayerDeath

    Daran sollte aber zumindestens die Problematik, dass die Gangs bei ihrer Base spawnen nicht liegen. Kannst du uns nochmal dein OnPlayerSpawn() inkl. Funktionen, die aufgerufen werden zeigen (möglicherweise SetPlayerSpawn() o.ä. (typische GF Funktion).)
  • Hallo @Douq

    PAWN-Quellcode

    1. Function OnPlayerSpawn(playerid)
    2. {
    3. Spawned[playerid] = 1;
    4. SetPlayerHealth(playerid,100);
    5. TextDrawShowForPlayer(playerid, spawnschutz);
    6. SetTimerEx("EndAntiSpawnKill", 10000, false, "i", playerid);
    7. if (PlayerInfo[playerid][pAdmin] > 0)
    8. {
    9. TextDrawShowForPlayer(playerid,OTickets[playerid]);
    10. }
    11. M_OnPlayerSpawn(playerid);
    12. GW_OnPlayerSpawn(playerid);
    13. StopAudioStreamForPlayer(playerid);
    14. TextDrawShowForPlayer(playerid,Copyright);
    15. if(PlayerInfo[playerid][pTot] == 1) //Wenn man stirbt.
    16. {
    17. SendClientMessage(playerid, COLOR_WHITE, " ");
    18. SendClientMessage(playerid, COLOR_WHITE, " ");
    19. SendClientMessage(playerid, COLOR_WHITE, " ");
    20. SendClientMessage(playerid, COLOR_WHITE, " ");
    21. SendClientMessage(playerid, COLOR_WHITE, " ");
    22. SendClientMessage(playerid, COLOR_WHITE, " ");
    23. SendClientMessage(playerid, COLOR_GREEN, "Los Santos Krankenhaus ");
    24. SendClientMessage(playerid, COLOR_WHITE, "Du bist nun im Krankenhaus");
    25. SendClientMessage(playerid, COLOR_WHITE, "Die Ärzte werden dir helfen");
    26. SendClientMessage(playerid, COLOR_WHITE, "Du wirst in 60 Sekunden geheilt");
    27. SetPlayerHealth(playerid, 100);
    28. SetPlayerSkin(playerid,2);
    29. SetPlayerPos(playerid,1167.3525, -1320.1394, 24.2600);
    30. SetPlayerCameraPos(playerid,1218.57, -1321.66, 26.01);
    31. SetPlayerCameraLookAt(playerid,1215.94, -1321.66, 26.01);
    32. SetPlayerColor(playerid,TEAM_HIT_COLOR);
    33. FreezePlayer(playerid);
    34. ResetPlayerWeapons(playerid);
    35. SetPlayerInterior(playerid, 0);
    36. if(IsPlayerInFrac(playerid, 1))
    37. {
    38. SetPlayerColor(playerid,NAMECOLOR_LSCOP);
    39. }
    40. else if(IsPlayerInFrac(playerid, 4))
    41. {
    42. SetPlayerColor(playerid, NAMECOLOR_MEDIC);
    43. }
    44. else
    45. {
    46. SetPlayerColor(playerid,TEAM_HIT_COLOR);
    47. }
    48. ResetPlayerWeapons(playerid);
    49. return 1;
    50. }
    51. STDPlayer[playerid] = 0;
    52. gTeam[playerid] = PlayerInfo[playerid][pTeam]; //Set the Team
    53. if (gTeam[playerid] == 4) //medic / criminal reset team
    54. {
    55. gTeam[playerid] = 3;
    56. }
    57. if(gPlayerLogged[playerid] == 0)
    58. {
    59. SendClientMessage(playerid, COLOR_LIGHTRED, "Um spielen zu können, musst du dir einen Account erstellen oder dich einloggen!");
    60. Kick(playerid);
    61. return 1;
    62. }
    63. if(AtClothes[playerid] == 1)
    64. {
    65. PlayerInfo[playerid][pChar] = GetPlayerSkin(playerid);
    66. PlayerInfo[playerid][pModel] = GetPlayerSkin(playerid);
    67. AtClothes[playerid] = 0;
    68. }
    69. if(gTeam[playerid] == 11 && PlayerInfo[playerid][pLeader] < 1)
    70. {
    71. MedicBill[playerid] = 0;
    72. new rand = random(sizeof(CIV));
    73. SendClientMessage(playerid, COLOR_GREEN, "Du hast dein Skin erfolgreich geändert.");
    74. PlayerInfo[playerid][pTeam] = 3;
    75. gTeam[playerid] = 3;
    76. SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0); // NACH SKIN WECHSEL
    77. PlayerInfo[playerid][pModel] = CIV[rand];
    78. SpawnPlayer(playerid);
    79. }
    80. if(gTeam[playerid] == 5)
    81. {
    82. if(PlayerInfo[playerid][pMember] < 1)
    83. {
    84. MedicBill[playerid] = 0;
    85. new rand = random(sizeof(CIV));
    86. SendClientMessage(playerid, COLOR_ORANGE, "Du hast dein Skin erfolgreich geändert.");
    87. PlayerInfo[playerid][pTeam] = 3;
    88. gTeam[playerid] = 3;
    89. SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
    90. PlayerInfo[playerid][pModel] = CIV[rand];
    91. SpawnPlayer(playerid);
    92. }
    93. }
    94. if(gTeam[playerid] == 10)
    95. {
    96. if(PlayerInfo[playerid][pMember] != 8)
    97. {
    98. MedicBill[playerid] = 0;
    99. new rand = random(sizeof(CIV));
    100. PlayerInfo[playerid][pTeam] = 3;
    101. gTeam[playerid] = 3;
    102. SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
    103. PlayerInfo[playerid][pModel] = CIV[rand];
    104. SpawnPlayer(playerid);
    105. }
    106. }
    107. if(gTeam[playerid] == 2 && !IsACop(playerid))
    108. {
    109. MedicBill[playerid] = 0;
    110. new rand = random(sizeof(CIV));
    111. SendClientMessage(playerid, COLOR_LIGHTRED, "");
    112. PlayerInfo[playerid][pTeam] = 3;
    113. gTeam[playerid] = 3;
    114. SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
    115. PlayerInfo[playerid][pModel] = CIV[rand];
    116. SpawnPlayer(playerid);
    117. }
    118. if(gTeam[playerid] == 3)
    119. {
    120. if(PlayerInfo[playerid][pMember] > 0 || PlayerInfo[playerid][pLeader] > 0)
    121. {
    122. MedicBill[playerid] = 0;
    123. new model = PlayerInfo[playerid][pChar];
    124. if(PlayerInfo[playerid][pMember] == 1) { SetSpawnInfo(playerid, 2, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; PlayerInfo[playerid][pModel] = model; }
    125. else if(PlayerInfo[playerid][pMember] == 2) { SetSpawnInfo(playerid, 2, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; PlayerInfo[playerid][pModel] = model; }
    126. else if(PlayerInfo[playerid][pMember] == 3) { SetSpawnInfo(playerid, 2, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; PlayerInfo[playerid][pModel] = model; }
    127. else if(PlayerInfo[playerid][pMember] == 4) { SetSpawnInfo(playerid, 1, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 1; gTeam[playerid] = 1; PlayerInfo[playerid][pModel] = model; }
    128. else if(PlayerInfo[playerid][pMember] == 5) { SetSpawnInfo(playerid, 5, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; PlayerInfo[playerid][pModel] = model; }
    129. else if(PlayerInfo[playerid][pMember] == 6) { SetSpawnInfo(playerid, 5, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; PlayerInfo[playerid][pModel] = model; }
    130. else if(PlayerInfo[playerid][pMember] == 7) { SetSpawnInfo(playerid, 7, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 7; gTeam[playerid] = 7; PlayerInfo[playerid][pModel] = model; }
    131. else if(PlayerInfo[playerid][pMember] == 8) { SetSpawnInfo(playerid, 10, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 10; gTeam[playerid] = 10; PlayerInfo[playerid][pModel] = model; }
    132. else if(PlayerInfo[playerid][pMember] == 9) { SetSpawnInfo(playerid, 12, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }
    133. else if(PlayerInfo[playerid][pMember] == 10) { SetSpawnInfo(playerid, 12, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }
    134. else if(PlayerInfo[playerid][pMember] == 11) { SetSpawnInfo(playerid, 12, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }
    135. else if(PlayerInfo[playerid][pMember] == 12) { SetSpawnInfo(playerid, 12, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//Triaden
    136. else if(PlayerInfo[playerid][pMember] == 13) { SetSpawnInfo(playerid, 13, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//Groove Street
    137. else if(PlayerInfo[playerid][pMember] == 14) { SetSpawnInfo(playerid, 14, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//Bloodz
    138. else if(PlayerInfo[playerid][pMember] == 15) { SetSpawnInfo(playerid, 15, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//2fast
    139. else if(PlayerInfo[playerid][pMember] == 16) { SetSpawnInfo(playerid, 16, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//Los Santos Vagos
    140. else if(PlayerInfo[playerid][pMember] == 17) { SetSpawnInfo(playerid, 17, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//Varios Los Aztecas
    141. else if(PlayerInfo[playerid][pMember] == 18) { SetSpawnInfo(playerid, 18, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//Cripz
    142. else if(PlayerInfo[playerid][pMember] == 19) { SetSpawnInfo(playerid, 19, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//West Coast Customs
    143. else if(PlayerInfo[playerid][pMember] == 20) { SetSpawnInfo(playerid, 20, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//
    144. else if(PlayerInfo[playerid][pMember] == 21) { SetSpawnInfo(playerid, 21, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//
    145. else if(PlayerInfo[playerid][pMember] == 22) { SetSpawnInfo(playerid, 22, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//
    146. else if(PlayerInfo[playerid][pMember] == 23) { SetSpawnInfo(playerid, 23, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//
    147. else if(PlayerInfo[playerid][pMember] == 24) { SetSpawnInfo(playerid, 24, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//
    148. else if(PlayerInfo[playerid][pMember] == 25) { SetSpawnInfo(playerid, 25, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }// CarliCartell
    149. else if(PlayerInfo[playerid][pLeader] == 1) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
    150. else if(PlayerInfo[playerid][pLeader] == 2) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
    151. else if(PlayerInfo[playerid][pLeader] == 3) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
    152. else if(PlayerInfo[playerid][pLeader] == 4) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
    153. else if(PlayerInfo[playerid][pLeader] == 5) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
    154. else if(PlayerInfo[playerid][pLeader] == 6) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
    155. else if(PlayerInfo[playerid][pLeader] == 7) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
    156. else if(PlayerInfo[playerid][pLeader] == 8) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
    157. else if(PlayerInfo[playerid][pLeader] == 9) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
    158. else if(PlayerInfo[playerid][pLeader] == 10) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
    159. else if(PlayerInfo[playerid][pLeader] == 11) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
    160. else if(PlayerInfo[playerid][pLeader] == 12) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//Triaden
    161. else if(PlayerInfo[playerid][pLeader] == 13) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//Groove Street
    162. else if(PlayerInfo[playerid][pLeader] == 14) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//Bloodz
    163. else if(PlayerInfo[playerid][pLeader] == 15) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//2fast
    164. else if(PlayerInfo[playerid][pLeader] == 16) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//Los Santos Vagos
    165. else if(PlayerInfo[playerid][pLeader] == 17) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//Varios Los Aztecas
    166. else if(PlayerInfo[playerid][pLeader] == 18) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//Cripz
    167. else if(PlayerInfo[playerid][pLeader] == 19) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//West Coast Customs
    168. else if(PlayerInfo[playerid][pLeader] == 20) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }// Terroristen
    169. else if(PlayerInfo[playerid][pLeader] == 21) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }// Wheelman
    170. else if(PlayerInfo[playerid][pLeader] == 23) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }// Grundwehrdienst
    171. else if(PlayerInfo[playerid][pLeader] == 22) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }// Feuerwehr
    172. else if(PlayerInfo[playerid][pLeader] == 24) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }// Oamt
    173. else if(PlayerInfo[playerid][pLeader] == 25) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }// Cali Cartell
    174. //SetSpawnInfo(playerid, team, model,0.0,0.0,0.0,0,0,0,0,0,0,0);
    175. SpawnPlayer(playerid);
    176. }
    177. }
    178. if(!gPlayerAnimLibsPreloaded[playerid])
    179. {
    180. PreloadAnimLib(playerid,"BOMBER");
    181. PreloadAnimLib(playerid,"RAPPING");
    182. PreloadAnimLib(playerid,"SHOP");
    183. PreloadAnimLib(playerid,"BEACH");
    184. PreloadAnimLib(playerid,"SMOKING");
    185. PreloadAnimLib(playerid,"FOOD");
    186. PreloadAnimLib(playerid,"ON_LOOKERS");
    187. PreloadAnimLib(playerid,"DEALER");
    188. PreloadAnimLib(playerid,"CRACK");
    189. PreloadAnimLib(playerid,"CARRY");
    190. PreloadAnimLib(playerid,"COP_AMBIENT");
    191. PreloadAnimLib(playerid,"PARK");
    192. PreloadAnimLib(playerid,"INT_HOUSE");
    193. PreloadAnimLib(playerid,"FOOD");
    194. gPlayerAnimLibsPreloaded[playerid] = 1;
    195. }
    196. if(PlayerInfo[playerid][pChar] > 0) { SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]); }
    197. else { SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]); }
    198. //SetPlayerWeapons(playerid);
    199. SetPlayerSpawn(playerid);
    200. SetPlayerToTeamColor(playerid);
    201. PlayerFixRadio(playerid);
    202. if(MapIconsShown[playerid] != 1)
    203. {
    204. MapIconsShown[playerid] = 1;
    205. /* SetPlayerMapIcon(playerid, 59, 2001.7866,-1128.8413,25.4584, 59, COLOR_YELLOW); //Bloodz Map Icon
    206. SetPlayerMapIcon(playerid, 62, 2487.4963,-1669.9874,13.3359, 62, COLOR_YELLOW); //Crips Map Icon
    207. SetPlayerMapIcon(playerid, 60, -2188.5515,988.2034,80.0000, 60, COLOR_YELLOW); //Bloodz Map Icon
    208. SetPlayerMapIcon(playerid, 52, -2651.4575,376.0330,5.6843, 52, COLOR_YELLOW); // /Bank SF Icon
    209. SetPlayerMapIcon(playerid, 23, -793.5161,1548.3273,27.1172, 21, COLOR_YELLOW); //BSN Map Icon
    210. SetPlayerMapIcon(playerid, 23, -1483.2383,2633.9021,58.7813, 23, COLOR_YELLOW); //Waffenladen Map Icon*/
    211. SetPlayerMapIcon(playerid, 42, 1944.0486,-1775.4786,13.3906, 42, COLOR_YELLOW); //Tanke Icon
    212. SetPlayerMapIcon(playerid, 22, 1169.5400,-1320.0100,24.2600, 22, COLOR_YELLOW); //Krankenhaus Icon
    213. SetPlayerMapIcon(playerid, 52, 1166.1927,-1641.5510,14.0000, 52, COLOR_YELLOW); // /Bank LS Icon
    214. SetPlayerMapIcon(playerid, 27, -1935.9150,237.0524,34.3125, 27, COLOR_YELLOW); //Tuning Garage Icon
    215. SetPlayerMapIcon(playerid, 27, -2714.2554,217.5764,4.2854, 27, COLOR_YELLOW); //Tuning Garage Icon 2 für S E T
    216. SetPlayerMapIcon(playerid, 61, 2769.3811,-1943.4061,13.3762, 61, COLOR_YELLOW); //Varrios Los Aztecas Icon
    217. SetPlayerMapIcon(playerid, 6, 1368.4399,-1279.7990,13.5469, 6, COLOR_YELLOW); //Ammunation
    218. SetPlayerMapIcon(playerid, 45, 1457.4734,-1137.6210,23.9780, 45, COLOR_YELLOW); //Skin Shop
    219. SetPlayerMapIcon(playerid, 25, 1396.9078,-1569.9150,14.3077, 25, COLOR_YELLOW); // /Stadthalle LS Icon
    220. }
    221. if(PlayerInfo[playerid][pGangJailed] == 1)
    222. {
    223. SetPlayerInterior(playerid, 0);
    224. SetPlayerVirtualWorld(playerid, 0);
    225. SetPlayerPos(playerid, -86.5283,-103.4094,3.1181);
    226. SendClientMessage(playerid, COLOR_LIGHTRED, " Du befindest dich noch im GangJail!");
    227. return 1;
    228. }
    229. if(PlayerInfo[playerid][pwJailed] == 1)
    230. {
    231. SetPlayerInterior(playerid, 0);
    232. SetPlayerVirtualWorld(playerid, 0);
    233. SetPlayerPos(playerid, 769.7139,-1446.7474,13.7101);
    234. SendClientMessage(playerid, COLOR_LIGHTRED, " Du befindest dich noch im wJail!");
    235. return 1;
    236. }
    237. return 1;
    238. }
    Alles anzeigen


    GW_OnPlayerSpawn

    PAWN-Quellcode

    1. forward GW_OnPlayerSpawn(playerid);
    2. public GW_OnPlayerSpawn(playerid){
    3. if(!GetPVarInt(playerid,"Spawned")){
    4. SetPVarInt(playerid,"Spawned",1);
    5. for(new fs;fs<sizeof(FightSystem);fs++){
    6. if(FightSystem[fs][fsAttackFaction] != -255 && FightSystem[fs][fsFightTime]){
    7. GangZoneFlashForPlayer(playerid,FightSystem[fs][fsZoneID],GetZoneColorOfFaction(FightSystem[fs][fsAttackFaction]));
    8. if(GetPlayerFaction(playerid) == FightSystem[fs][fsOwnerFaction] || GetPlayerFaction(playerid) == FightSystem[fs][fsAttackFaction]){
    9. TextDrawShowForPlayer(playerid,GANGFIGHT);
    10. TextDrawShowForPlayer(playerid,FightSystem[fs][fsWinFaction]);
    11. TextDrawShowForPlayer(playerid,FightSystem[fs][fsLoseFaction]);
    12. TextDrawShowForPlayer(playerid,FightSystem[fs][fsWinKills]);
    13. TextDrawShowForPlayer(playerid,FightSystem[fs][fsLoseKills]);
    14. TextDrawShowForPlayer(playerid,FightSystem[fs][fsTime]);
    15. }
    16. }
    17. }
    18. }return 1;
    19. }
    Alles anzeigen


    MFG
  • HandsUper schrieb:

    Hallo @Douq

    PAWN-Quellcode

    1. Function OnPlayerSpawn(playerid){Spawned[playerid] = 1;SetPlayerHealth(playerid,100);TextDrawShowForPlayer(playerid, spawnschutz);SetTimerEx("EndAntiSpawnKill", 10000, false, "i", playerid);if (PlayerInfo[playerid][pAdmin] > 0){TextDrawShowForPlayer(playerid,OTickets[playerid]);}M_OnPlayerSpawn(playerid);GW_OnPlayerSpawn(playerid);StopAudioStreamForPlayer(playerid);TextDrawShowForPlayer(playerid,Copyright);if(PlayerInfo[playerid][pTot] == 1) //Wenn man stirbt.{SendClientMessage(playerid, COLOR_WHITE, " ");SendClientMessage(playerid, COLOR_WHITE, " ");SendClientMessage(playerid, COLOR_WHITE, " ");SendClientMessage(playerid, COLOR_WHITE, " ");SendClientMessage(playerid, COLOR_WHITE, " ");SendClientMessage(playerid, COLOR_WHITE, " ");SendClientMessage(playerid, COLOR_GREEN, "Los Santos Krankenhaus ");SendClientMessage(playerid, COLOR_WHITE, "Du bist nun im Krankenhaus");SendClientMessage(playerid, COLOR_WHITE, "Die Ärzte werden dir helfen");SendClientMessage(playerid, COLOR_WHITE, "Du wirst in 60 Sekunden geheilt");SetPlayerHealth(playerid, 100);SetPlayerSkin(playerid,2);SetPlayerPos(playerid,1167.3525, -1320.1394, 24.2600);SetPlayerCameraPos(playerid,1218.57, -1321.66, 26.01);SetPlayerCameraLookAt(playerid,1215.94, -1321.66, 26.01);SetPlayerColor(playerid,TEAM_HIT_COLOR);FreezePlayer(playerid);ResetPlayerWeapons(playerid);SetPlayerInterior(playerid, 0);if(IsPlayerInFrac(playerid, 1)){SetPlayerColor(playerid,NAMECOLOR_LSCOP);}else if(IsPlayerInFrac(playerid, 4)){SetPlayerColor(playerid, NAMECOLOR_MEDIC);}else{SetPlayerColor(playerid,TEAM_HIT_COLOR);}ResetPlayerWeapons(playerid);return 1;}STDPlayer[playerid] = 0;gTeam[playerid] = PlayerInfo[playerid][pTeam]; //Set the Teamif (gTeam[playerid] == 4) //medic / criminal reset team{gTeam[playerid] = 3;}if(gPlayerLogged[playerid] == 0){SendClientMessage(playerid, COLOR_LIGHTRED, "Um spielen zu können, musst du dir einen Account erstellen oder dich einloggen!");Kick(playerid);return 1;}if(AtClothes[playerid] == 1){PlayerInfo[playerid][pChar] = GetPlayerSkin(playerid);PlayerInfo[playerid][pModel] = GetPlayerSkin(playerid);AtClothes[playerid] = 0;}if(gTeam[playerid] == 11 && PlayerInfo[playerid][pLeader] < 1){MedicBill[playerid] = 0;new rand = random(sizeof(CIV));SendClientMessage(playerid, COLOR_GREEN, "Du hast dein Skin erfolgreich geändert.");PlayerInfo[playerid][pTeam] = 3;gTeam[playerid] = 3;SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0); // NACH SKIN WECHSELPlayerInfo[playerid][pModel] = CIV[rand];SpawnPlayer(playerid);}if(gTeam[playerid] == 5){if(PlayerInfo[playerid][pMember] < 1){MedicBill[playerid] = 0;new rand = random(sizeof(CIV));SendClientMessage(playerid, COLOR_ORANGE, "Du hast dein Skin erfolgreich geändert.");PlayerInfo[playerid][pTeam] = 3;gTeam[playerid] = 3;SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);PlayerInfo[playerid][pModel] = CIV[rand];SpawnPlayer(playerid);}}if(gTeam[playerid] == 10){if(PlayerInfo[playerid][pMember] != 8){MedicBill[playerid] = 0;new rand = random(sizeof(CIV));PlayerInfo[playerid][pTeam] = 3;gTeam[playerid] = 3;SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);PlayerInfo[playerid][pModel] = CIV[rand];SpawnPlayer(playerid);}}if(gTeam[playerid] == 2 && !IsACop(playerid)){MedicBill[playerid] = 0;new rand = random(sizeof(CIV));SendClientMessage(playerid, COLOR_LIGHTRED, "");PlayerInfo[playerid][pTeam] = 3;gTeam[playerid] = 3;SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);PlayerInfo[playerid][pModel] = CIV[rand];SpawnPlayer(playerid);}if(gTeam[playerid] == 3){if(PlayerInfo[playerid][pMember] > 0 || PlayerInfo[playerid][pLeader] > 0){MedicBill[playerid] = 0;new model = PlayerInfo[playerid][pChar];if(PlayerInfo[playerid][pMember] == 1) { SetSpawnInfo(playerid, 2, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; PlayerInfo[playerid][pModel] = model; }else if(PlayerInfo[playerid][pMember] == 2) { SetSpawnInfo(playerid, 2, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; PlayerInfo[playerid][pModel] = model; }else if(PlayerInfo[playerid][pMember] == 3) { SetSpawnInfo(playerid, 2, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; PlayerInfo[playerid][pModel] = model; }else if(PlayerInfo[playerid][pMember] == 4) { SetSpawnInfo(playerid, 1, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 1; gTeam[playerid] = 1; PlayerInfo[playerid][pModel] = model; }else if(PlayerInfo[playerid][pMember] == 5) { SetSpawnInfo(playerid, 5, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; PlayerInfo[playerid][pModel] = model; }else if(PlayerInfo[playerid][pMember] == 6) { SetSpawnInfo(playerid, 5, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; PlayerInfo[playerid][pModel] = model; }else if(PlayerInfo[playerid][pMember] == 7) { SetSpawnInfo(playerid, 7, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 7; gTeam[playerid] = 7; PlayerInfo[playerid][pModel] = model; }else if(PlayerInfo[playerid][pMember] == 8) { SetSpawnInfo(playerid, 10, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 10; gTeam[playerid] = 10; PlayerInfo[playerid][pModel] = model; }else if(PlayerInfo[playerid][pMember] == 9) { SetSpawnInfo(playerid, 12, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }else if(PlayerInfo[playerid][pMember] == 10) { SetSpawnInfo(playerid, 12, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }else if(PlayerInfo[playerid][pMember] == 11) { SetSpawnInfo(playerid, 12, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }else if(PlayerInfo[playerid][pMember] == 12) { SetSpawnInfo(playerid, 12, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//Triadenelse if(PlayerInfo[playerid][pMember] == 13) { SetSpawnInfo(playerid, 13, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//Groove Streetelse if(PlayerInfo[playerid][pMember] == 14) { SetSpawnInfo(playerid, 14, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//Bloodzelse if(PlayerInfo[playerid][pMember] == 15) { SetSpawnInfo(playerid, 15, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//2fastelse if(PlayerInfo[playerid][pMember] == 16) { SetSpawnInfo(playerid, 16, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//Los Santos Vagoselse if(PlayerInfo[playerid][pMember] == 17) { SetSpawnInfo(playerid, 17, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//Varios Los Aztecaselse if(PlayerInfo[playerid][pMember] == 18) { SetSpawnInfo(playerid, 18, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//Cripzelse if(PlayerInfo[playerid][pMember] == 19) { SetSpawnInfo(playerid, 19, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//West Coast Customselse if(PlayerInfo[playerid][pMember] == 20) { SetSpawnInfo(playerid, 20, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//else if(PlayerInfo[playerid][pMember] == 21) { SetSpawnInfo(playerid, 21, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//else if(PlayerInfo[playerid][pMember] == 22) { SetSpawnInfo(playerid, 22, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//else if(PlayerInfo[playerid][pMember] == 23) { SetSpawnInfo(playerid, 23, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//else if(PlayerInfo[playerid][pMember] == 24) { SetSpawnInfo(playerid, 24, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//else if(PlayerInfo[playerid][pMember] == 25) { SetSpawnInfo(playerid, 25, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }// CarliCartellelse if(PlayerInfo[playerid][pLeader] == 1) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }else if(PlayerInfo[playerid][pLeader] == 2) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }else if(PlayerInfo[playerid][pLeader] == 3) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }else if(PlayerInfo[playerid][pLeader] == 4) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }else if(PlayerInfo[playerid][pLeader] == 5) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }else if(PlayerInfo[playerid][pLeader] == 6) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }else if(PlayerInfo[playerid][pLeader] == 7) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }else if(PlayerInfo[playerid][pLeader] == 8) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }else if(PlayerInfo[playerid][pLeader] == 9) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }else if(PlayerInfo[playerid][pLeader] == 10) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }else if(PlayerInfo[playerid][pLeader] == 11) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }else if(PlayerInfo[playerid][pLeader] == 12) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//Triadenelse if(PlayerInfo[playerid][pLeader] == 13) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//Groove Streetelse if(PlayerInfo[playerid][pLeader] == 14) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//Bloodzelse if(PlayerInfo[playerid][pLeader] == 15) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//2fastelse if(PlayerInfo[playerid][pLeader] == 16) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//Los Santos Vagoselse if(PlayerInfo[playerid][pLeader] == 17) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//Varios Los Aztecaselse if(PlayerInfo[playerid][pLeader] == 18) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//Cripzelse if(PlayerInfo[playerid][pLeader] == 19) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }//West Coast Customselse if(PlayerInfo[playerid][pLeader] == 20) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }// Terroristenelse if(PlayerInfo[playerid][pLeader] == 21) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }// Wheelmanelse if(PlayerInfo[playerid][pLeader] == 23) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }// Grundwehrdienstelse if(PlayerInfo[playerid][pLeader] == 22) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }// Feuerwehrelse if(PlayerInfo[playerid][pLeader] == 24) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }// Oamtelse if(PlayerInfo[playerid][pLeader] == 25) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }// Cali Cartell//SetSpawnInfo(playerid, team, model,0.0,0.0,0.0,0,0,0,0,0,0,0);SpawnPlayer(playerid);}}if(!gPlayerAnimLibsPreloaded[playerid]){PreloadAnimLib(playerid,"BOMBER");PreloadAnimLib(playerid,"RAPPING");PreloadAnimLib(playerid,"SHOP");PreloadAnimLib(playerid,"BEACH");PreloadAnimLib(playerid,"SMOKING");PreloadAnimLib(playerid,"FOOD");PreloadAnimLib(playerid,"ON_LOOKERS");PreloadAnimLib(playerid,"DEALER");PreloadAnimLib(playerid,"CRACK");PreloadAnimLib(playerid,"CARRY");PreloadAnimLib(playerid,"COP_AMBIENT");PreloadAnimLib(playerid,"PARK");PreloadAnimLib(playerid,"INT_HOUSE");PreloadAnimLib(playerid,"FOOD");gPlayerAnimLibsPreloaded[playerid] = 1;}if(PlayerInfo[playerid][pChar] > 0) { SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]); }else { SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]); }//SetPlayerWeapons(playerid);SetPlayerSpawn(playerid);SetPlayerToTeamColor(playerid);PlayerFixRadio(playerid);if(MapIconsShown[playerid] != 1){MapIconsShown[playerid] = 1;/* SetPlayerMapIcon(playerid, 59, 2001.7866,-1128.8413,25.4584, 59, COLOR_YELLOW); //Bloodz Map IconSetPlayerMapIcon(playerid, 62, 2487.4963,-1669.9874,13.3359, 62, COLOR_YELLOW); //Crips Map IconSetPlayerMapIcon(playerid, 60, -2188.5515,988.2034,80.0000, 60, COLOR_YELLOW); //Bloodz Map IconSetPlayerMapIcon(playerid, 52, -2651.4575,376.0330,5.6843, 52, COLOR_YELLOW); // /Bank SF IconSetPlayerMapIcon(playerid, 23, -793.5161,1548.3273,27.1172, 21, COLOR_YELLOW); //BSN Map IconSetPlayerMapIcon(playerid, 23, -1483.2383,2633.9021,58.7813, 23, COLOR_YELLOW); //Waffenladen Map Icon*/SetPlayerMapIcon(playerid, 42, 1944.0486,-1775.4786,13.3906, 42, COLOR_YELLOW); //Tanke IconSetPlayerMapIcon(playerid, 22, 1169.5400,-1320.0100,24.2600, 22, COLOR_YELLOW); //Krankenhaus IconSetPlayerMapIcon(playerid, 52, 1166.1927,-1641.5510,14.0000, 52, COLOR_YELLOW); // /Bank LS IconSetPlayerMapIcon(playerid, 27, -1935.9150,237.0524,34.3125, 27, COLOR_YELLOW); //Tuning Garage IconSetPlayerMapIcon(playerid, 27, -2714.2554,217.5764,4.2854, 27, COLOR_YELLOW); //Tuning Garage Icon 2 für S E TSetPlayerMapIcon(playerid, 61, 2769.3811,-1943.4061,13.3762, 61, COLOR_YELLOW); //Varrios Los Aztecas IconSetPlayerMapIcon(playerid, 6, 1368.4399,-1279.7990,13.5469, 6, COLOR_YELLOW); //AmmunationSetPlayerMapIcon(playerid, 45, 1457.4734,-1137.6210,23.9780, 45, COLOR_YELLOW); //Skin ShopSetPlayerMapIcon(playerid, 25, 1396.9078,-1569.9150,14.3077, 25, COLOR_YELLOW); // /Stadthalle LS Icon}if(PlayerInfo[playerid][pGangJailed] == 1){SetPlayerInterior(playerid, 0);SetPlayerVirtualWorld(playerid, 0);SetPlayerPos(playerid, -86.5283,-103.4094,3.1181);SendClientMessage(playerid, COLOR_LIGHTRED, " Du befindest dich noch im GangJail!");return 1;}if(PlayerInfo[playerid][pwJailed] == 1){SetPlayerInterior(playerid, 0);SetPlayerVirtualWorld(playerid, 0);SetPlayerPos(playerid, 769.7139,-1446.7474,13.7101);SendClientMessage(playerid, COLOR_LIGHTRED, " Du befindest dich noch im wJail!");return 1;}return 1;}


    GW_OnPlayerSpawn

    PAWN-Quellcode

    1. forward GW_OnPlayerSpawn(playerid);public GW_OnPlayerSpawn(playerid){if(!GetPVarInt(playerid,"Spawned")){SetPVarInt(playerid,"Spawned",1);for(new fs;fs<sizeof(FightSystem);fs++){if(FightSystem[fs][fsAttackFaction] != -255 && FightSystem[fs][fsFightTime]){GangZoneFlashForPlayer(playerid,FightSystem[fs][fsZoneID],GetZoneColorOfFaction(FightSystem[fs][fsAttackFaction]));if(GetPlayerFaction(playerid) == FightSystem[fs][fsOwnerFaction] || GetPlayerFaction(playerid) == FightSystem[fs][fsAttackFaction]){TextDrawShowForPlayer(playerid,GANGFIGHT);TextDrawShowForPlayer(playerid,FightSystem[fs][fsWinFaction]);TextDrawShowForPlayer(playerid,FightSystem[fs][fsLoseFaction]);TextDrawShowForPlayer(playerid,FightSystem[fs][fsWinKills]);TextDrawShowForPlayer(playerid,FightSystem[fs][fsLoseKills]);TextDrawShowForPlayer(playerid,FightSystem[fs][fsTime]);}}}}return 1;}


    MFG
    ich glaub ermeinte OnPlayerDeaht und GW_OnPlayerDeaht
    Mit freundlichen Grüßen,

    Fabi.StaR :love: :saint:

  • Neu

    Guten Abend Leute

    Ich habe versucht ein Fahrzeug Hupe Tor System zu erstellen aber es klappt irgendwie nicht :/
    Ich möchte dass das Tor geöffnet wird indem man hupt.

    Was mache ich falsch???

    PAWN-Quellcode

    1. if(newkeys == KEY_CTRL_BACK)
    2. {
    3. if(PlayerInfo[playerid][pTot] == 1)
    4. {
    5. SendClientMessage(playerid, COLOR_GREY, "Tote können keine Befehle nutzen!");
    6. return 1;
    7. }
    8. if(IsPlayerConnected(playerid))
    9. {
    10. OnPlayerCommandText(playerid, "/enter");
    11. }
    12. else if(IsPlayerInRangeOfPoint(playerid,10.0, X, Y, Z))
    13. {
    14. if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    15. {
    16. OnPlayerCommandText(playerid,"/gate");
    17. }
    18. else if(IsPlayerInRangeOfPoint(playerid,10.0, X, Y, Z))
    19. {
    20. if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    21. {
    22. OnPlayerCommandText(playerid,"/gate2");
    23. }
    24. }
    25. }
    26. }
    Alles anzeigen



    Mit freundlichen Grüßen