gteam commands klappen nicht?

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
  • hallo leute!
    ich habe teams mit gteam erstellt. unzwar hab ich folgendes gemacht:


    new gTeam[MAX_PLAYERS];
    #define TEAM_GROVE 0


    public OnPlayerRequestClass(playerid, classid)
    {
    switch(classid)
    {
    case 0,1,2: gTeam[playerid] = TEAM_GROVE;
    }
    return 1;
    }


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if (strcmp("/enter", cmdtext, true, 10) == 0)
    {
    if(gTeam[playerid] == TEAM_GROVE)
    if(IsPlayerInRangeOfPoint(playerid,1,2495.3301,-1690.2500,14.7656))
    {
    SetPlayerPos(playerid,2496.0500,-1692.9301,1014.7422);
    SetPlayerInterior(playerid, 3);
    }
    return 1;
    }
    if (strcmp("/exit", cmdtext, true, 10) == 0)
    {
    if(gTeam[playerid] == TEAM_GROVE)
    if(IsPlayerInRangeOfPoint(playerid,1,2496.0500,-1692.9301,1014.7422))
    {
    SetPlayerPos(playerid,2495.3301,-1690.2500,14.7656);
    SetPlayerInterior(playerid, 0);
    }
    return 1;
    }
    return 0;
    }


    aber trotzdem kann jedes team diesen command! wo ist der fehler?
    bitte helft mir!

    Selfmade Reallife Server:IIIIIIIIIIIIIIIIIII 5%

  • public OnPlayerCommandText(playerid, cmdtext[])
    {
    if (strcmp("/enter", cmdtext, true, 10) == 0)´
    {
    if(gTeam[playerid] == TEAM_GROVE)
    {
    if(IsPlayerInRangeOfPoint(playerid,1,2495.3301,-1690.2500,14.7656))
    {
    SetPlayerPos(playerid,2496.0500,-1692.9301,1014.7422);
    SetPlayerInterior(playerid, 3);
    }
    return 1;
    }
    if (strcmp("/exit", cmdtext, true, 10) == 0)
    {
    if(gTeam[playerid] == TEAM_GROVE)
    if(IsPlayerInRangeOfPoint(playerid,1,2496.0500,-1692.9301,1014.7422))
    {
    SetPlayerPos(playerid,2495.3301,-1690.2500,14.7656);
    SetPlayerInterior(playerid, 0);
    }
    }
    return 1;
    }
    return 0;
    }


    //edit so!
    mach es mal so

  • public OnPlayerCommandText(playerid, cmdtext[])
    {
    if (strcmp("/enter", cmdtext, true, 10) == 0)
    {
    if(!gTeam[playerid] == TEAM_GROVE) return 1;
    if(IsPlayerInRangeOfPoint(playerid,1,2495.3301,-1690.2500,14.7656))
    {
    SetPlayerPos(playerid,2496.0500,-1692.9301,1014.7422);
    SetPlayerInterior(playerid, 3);
    }
    return 1;
    }
    if (strcmp("/exit", cmdtext, true, 10) == 0)
    {
    if(!gTeam[playerid] == TEAM_GROVE) return 1;
    if(IsPlayerInRangeOfPoint(playerid,1,2496.0500,-1692.9301,1014.7422))
    {
    SetPlayerPos(playerid,2495.3301,-1690.2500,14.7656);
    SetPlayerInterior(playerid, 0);
    }
    return 1;
    }
    return 0;
    }

  • darealplayboy ... deine art und weise klappt nicht :( und bei prtthe_game kriege ich immer warnings!


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if (strcmp("/enter", cmdtext, true, 10) == 0)
    {
    if(!gTeam[playerid] == TEAM_GROVE) return 1;
    if(IsPlayerInRangeOfPoint(playerid,1,2495.3301,-1690.2500,14.7656))
    {
    SetPlayerPos(playerid,2496.0500,-1692.9301,1014.7422);
    SetPlayerInterior(playerid, 3);
    }
    return 1;
    }
    if (strcmp("/exit", cmdtext, true, 10) == 0)
    {
    if(!gTeam[playerid] == TEAM_GROVE) return 1;
    if(IsPlayerInRangeOfPoint(playerid,1,2496.0500,-1692.9301,1014.7422))
    {
    SetPlayerPos(playerid,2495.3301,-1690.2500,14.7656);
    SetPlayerInterior(playerid, 0);
    }
    return 1;
    }
    return 0;
    }


    (235) : warning 213: tag mismatch
    (245) : warning 213: tag mismatch


    edit:// und es klappt auch nicht :(

    Selfmade Reallife Server:IIIIIIIIIIIIIIIIIII 5%

  • Ups man kann ja garkein ! bei variablen benutzen xD


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if (strcmp("/enter", cmdtext, true, 10) == 0)
    {
    if(gTeam[playerid] == TEAM_GROVE)
    {
    if(IsPlayerInRangeOfPoint(playerid,1,2495.3301,-1690.2500,14.7656))
    {
    SetPlayerPos(playerid,2496.0500,-1692.9301,1014.7422);
    SetPlayerInterior(playerid, 3);
    }
    }
    return 1;
    }


    if (strcmp("/exit", cmdtext, true, 10) == 0)
    {
    if(gTeam[playerid] == TEAM_GROVE)
    {
    if(IsPlayerInRangeOfPoint(playerid,1,2496.0500,-1692.9301,1014.7422))
    {
    SetPlayerPos(playerid,2495.3301,-1690.2500,14.7656);
    SetPlayerInterior(playerid, 0);
    }
    }
    return 1;
    }


    return 0;
    }

  • ! = wenn es nicht .. ist
    ohne ! = wenn es ... ist