Kleine Frage :>

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
  • Hayhou,


    Ich habe ein wenig rumgebastelt und mir Tipps geholt, und wollte nun einfügen, dass sie die Tore mit der Taste "H" öffnen. Dies funktioniert aber leider nicht und ich weiss auch nicht weshalb, kann mir eventuell jemand von euch helfen? :>


    if(newkeys == KEY_CTRL_BACK)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pLeader]==6 || PlayerInfo[playerid][pMember]==6)
    {
    if(PlayerToPoint(20,playerid,2521.01, 1823.02, 5.94))
    {
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "Das Tor schließt in 5 Sekunden wieder.");
    MoveObjectToStream(YTOR, 2521.01, 1823.02, 5.94,5);
    SetTimerEx("YTORCLOSE",5000, 0,"i",playerid);
    return 1;

  • if(newkeys & 262144){
    if(IsPlayerConnected(playerid) && PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pMember]==6){
    if(PlayerToPoint(20,playerid,2521.01,1823.02,5.94)){
    SendClientMessage(playerid,COLOR_LIGHTBLUE,"Das Tor schließt in 5 Sekunden wieder!");
    MoveObjectToStream(YTOR,2521.01, 1823.02, 5.94-10,5);
    return SetTimerEx("YTORCLOSE",5000,0,"i",playerid);
    }
    }
    return 1;
    }


    Probier das mal.

    Mit freundlichen Grüßen,
    Buessing :lach:

  • Entweder hast du keine Rechte um das Tor zuöffnen oder deine Funktion "PlayerToPoint" Funktioniert nicht richtig.


    Poste mal deine Funktion hier rein



    Grüße

  • Equ: Er hat das Tor zur gleichen Koordinate geschickt, wobei es meiner Meinung nach keinen Sinn macht. ;)


  • C:\Users\Julian\Desktop\pRP v2.0b\pawno\include\utils.inc(1) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\pawno\include\morphinc.inc(3) : warning 219: local variable "x2" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\pawno\include\morphinc.inc(3) : warning 219: local variable "y2" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\pawno\include\morphinc.inc(3) : warning 219: local variable "z2" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\pawno\include\M_Bot.inc(143) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\pawno\include\M_Bot.inc(288) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\pawno\include\M_Bot.inc(576) : warning 224: indeterminate array size in "sizeof" expression (symbol "")
    C:\Users\Julian\Desktop\pRP v2.0b\pawno\include\M_Bot.inc(786) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\pawno\include\foXban.inc(34) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\pawno\include\foXban.inc(50) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\pawno\include\foXban.inc(113) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\pawno\include\dini.inc(239) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\pawno\include\SII.inc(269) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(2721) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(2765) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(2794) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(2895) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(2929) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(3929) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(3959) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(3972) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(3995) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(4017) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(4112) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(4127) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(4174) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(4189) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(4243) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(4331) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(4908) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(5032) : warning 219: local variable "botname" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(5403) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(5413) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(5423) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(5432) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(5441) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(5450) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(5459) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(5470) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(7331) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(7400) : warning 219: local variable "botname" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(8544) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(8585) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(8655) : warning 209: function "OnPlayerKeyStateChange" should return a value
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(8656) : error 054: unmatched closing brace ("}")
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(8658) : error 010: invalid function or declaration
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(8660) : error 010: invalid function or declaration
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(8662) : error 010: invalid function or declaration
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(8664) : error 010: invalid function or declaration
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(8667) : error 021: symbol already defined: "MoveObjectToStream"
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(8669) : error 010: invalid function or declaration
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(8675) : error 010: invalid function or declaration
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(8677) : error 010: invalid function or declaration
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(8679) : error 010: invalid function or declaration
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(8681) : error 010: invalid function or declaration
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(8684) : error 021: symbol already defined: "MoveObjectToStream"
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(8684) : warning 215: expression has no effect
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(8684) : warning 215: expression has no effect
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(8684) : warning 215: expression has no effect
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(8684) : warning 215: expression has no effect
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(8684) : error 001: expected token: ";", but found ")"
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(8684) : error 010: invalid function or declaration
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(8684 -- 8686) : fatal error 107: too many error messages on one line


    // Oder könnte mir eventuell die Funktion mit einem Command machen?

  • Versuche es doch mal bitte so?



    if(newkeys == KEY_CTRL_BACK)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pLeader]==6 || PlayerInfo[playerid][pMember]==6)
    {
    if(IsPlayerInRangeOfPoint(playerid,4.0,-27.3817,-57.6193,1013.9156)) // 24/7(Nr.1) Exit
    {
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "Das Tor schließt in 5 Sekunden wieder.");
    MoveObjectToStream(YTOR, 2521.01, 1823.02, 5.94,5);
    SetTimerEx("YTORCLOSE",5000, 0,"i",playerid);
    return 1;
    }
    }
    }
    }

  • if(newkeys & 262144){
    if(IsPlayerConnected(playerid) && PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pMember]==6){
    if(PlayerToPoint(20,playerid,2521.01,1823.02,5.94)){
    SendClientMessage(playerid,COLOR_LIGHTBLUE,"Das Tor schließt in 5 Sekunden wieder!");
    MoveObjectToStream(YTOR,2521.01, 1823.02, 5.94-10,5);
    return SetTimerEx("YTORCLOSE",5000,0,"i",playerid);
    }
    }
    }

  • if(newkeys == KEY_CTRL_BACK)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pLeader]==6 || PlayerInfo[playerid][pMember]==6)
    {
    if(PlayerToPoint(20,playerid,2521.01, 1823.02, 5.94))
    {
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "Das Tor schließt in 5 Sekunden wieder.");
    MoveObjectToStream(YTOR, 2521.01, 1823.02, 5.94,5);
    SetTimerEx("YTORCLOSE",5000, 0,"i",playerid);
    return 1;
    }
    }
    }
    };


    /E: Equ: und meins sollte richtig sein.
    Du musst bei IF's immer auf und dann auch wieder zu machen ^^

    "Imagine if the government went after corruption as hard as it goes after guys who run filesharing sites. Priorities. " - @Snowden
    "More worrying than FBI temporarily running a server that contained child porn, is hacking computers anywhere in the world with one warrant" - @josephfcox

  • Meinst du so? Habe ich kurz in ocmd geschrieben:
    ocmd:yakutor(playerid,params[])
    {
    if(!IsPlayerInRangeOfPoint(playerid, 7.0, 2521.01, 1823.02, 5.94))return SendClientMessage(playerid,0x0087FFFF,"Du bist nicht in der Nähe des Tores");
    SendClientMessage(playerid,COLOR_LIGHTBLUE,"Das Tor schließt in 5 Sekunden wieder!");
    MoveObjectToStream(YTOR,2521.01, 1823.02, 5.94-10,5);
    SetTimerEx("YTORCLOSE",5000,0,"i",playerid);
    return 1;
    }

    Mit freundlichen Grüßen
    [color=#696969][i][b]Maxi
    [tabmenu]
    [tab='Signatur!']

    [tab='Mein Computer System']

    • Gehäuse Delux SH891 Midi-Tower (ATX) schwarz
    • Netzteil 650 Watt Corsair VS650
    • Festplatte 1000GB SATA III 7200upm
    • Mainboard AM3 Gigabyte GA-970A-UD3P (Chipsatz:AMD 970/SB950/ATX)
    • NVIDIA Geforce GTX 770 Gainward Phantom
    • 8192MB DDR3 Single Channel 1600MHz
    • Prozessor AM3+ (FX-Serie) AMD FX-8350 8x 4.0 GHz


    [tab='Meine Handys']

    • HTC ONE M8
    • Samsung S3 mini
    • Vll bald HTC ONE M7


    [tab='Mein Steam Account = 1']

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(8645) : error 029: invalid expression, assumed zero
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(8645) : error 017: undefined symbol "ocmd_yakutor"
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(8645) : error 029: invalid expression, assumed zero
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(8645) : fatal error 107: too many error messages on one line

  • if(!strcmp(cmdtext, "/yakutor", true) )
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pLeader]==6 || PlayerInfo[playerid][pMember]==6)
    {
    if(PlayerToPoint(20,playerid,2521.01, 1823.02, 5.94))
    {
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "Das Tor schließt in 5 Sekunden wieder.");
    MoveObjectToStream(YTOR, 2521.01, 1823.02, 5.94,5);
    SetTimerEx("YTORCLOSE",5000, 0,"i",playerid);
    return 1;
    }
    }
    }
    }


    Bei OnPlayerCommandText einfügen. Die IsPlayerConnected Abfrage kannst du dir eigentlich auch sparen.

  • C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(3023) : error 017: undefined symbol "IsANoTachoVehicle"
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(3029) : error 017: undefined symbol "IsANoTachoVehicle"
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(3724) : error 004: function "OnPlayerCarLogin" is not implemented
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(3929) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(3959) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(3972) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(3995) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(4017) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(4112) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(4127) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(4174) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(4189) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(4243) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(4331) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(4334) : error 004: function "OnPlayerCarUpdate" is not implemented
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(4407) : error 017: undefined symbol "Sichern"
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(4506) : error 004: function "RemoveRoadblock" is not implemented
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(4540) : error 017: undefined symbol "SetPlayerToKnast"
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(4908) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(4976) : error 004: function "ClearBlack" is not implemented
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(5032) : warning 219: local variable "botname" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(5403) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(5413) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(5423) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(5432) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(5441) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(5450) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(5459) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(5470) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(5966) : error 004: function "ProxDetector" is not implemented
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(5967) : error 004: function "ProxDetector" is not implemented
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(5968) : error 004: function "ProxDetector" is not implemented
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(5991) : error 004: function "ProxDetector" is not implemented
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(5992) : error 004: function "ProxDetector" is not implemented
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(5993) : error 004: function "ProxDetector" is not implemented
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(6057) : error 004: function "ProxDetector" is not implemented
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(6058) : error 004: function "ProxDetector" is not implemented
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(6059) : error 004: function "ProxDetector" is not implemented
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(6082) : error 004: function "ProxDetector" is not implemented
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(6083) : error 004: function "ProxDetector" is not implemented
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(6084) : error 004: function "ProxDetector" is not implemented
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(6128) : error 004: function "ProxDetector" is not implemented
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(6129) : error 004: function "ProxDetector" is not implemented
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(6130) : error 004: function "ProxDetector" is not implemented
    C:\Users\Julian\Desktop\pRP v2.0b\gamemodes\hd.pwn(6173) : error 004: function "ProxDetector" is not implemented