Beiträge von InternetInk aka Benjamin

    mal abgesehen davon was haste für /enter /Exit cmds 8| normal sind die doch schon so drinne



    if(strcmp(cmd, "/enter", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    for(new i = 0; i < sizeof(HouseInfo); i++)
    {
    if (PlayerToPoint(3, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
    {
    //printf("Found House :%d",i);
    if(PlayerInfo[playerid][pPhousekey] == i || HouseInfo[i][hLock] == 0)
    {
    SetPlayerInterior(playerid,HouseInfo[i][hInt]);
    SetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]);
    GameTextForPlayer(playerid, "~w~Welcome Home", 5000, 1);
    PlayerInfo[playerid][pInt] = HouseInfo[i][hInt];
    PlayerInfo[playerid][pLocal] = i;
    }
    else
    {
    GameTextForPlayer(playerid, "~r~Locked", 5000, 1);
    }
    }
    }

    probier mal so


    public OnPlayerDeath(playerid, killerid, reason)
    {
    if(bsn[playerid] == 1)
    {
    new string[128];
    new pName[MAX_PLAYER_NAME],kName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pName, sizeof(pName));
    GetPlayerName(killerid, kName, sizeof(kName));
    format(string, sizeof(string), " %s hat gerade %s am BSN getötet!", kName, pName);
    SendClientMessageToAdmin(COLOR_RED, string, 1);
    bsn[playerid] = 0;
    }
    return 1;
    }

    ja lösch den cmd der war scheiße :D Versuch den mal xD
    EDIT noch was verbessert...

    if(strcmp(cmd, "/gang", true) == 0 || strcmp(cmd, "/g", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    new length = strlen(cmdtext);
    while ((idx < length) && (cmdtext[idx] <= ' '))
    {
    idx++;
    }
    new offset = idx;
    new result[64];
    while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
    {
    result[idx - offset] = cmdtext[idx];
    idx++;
    }
    result[idx - offset] = EOS;
    if(!strlen(result))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/g) [chat]");
    return 1;
    }
    for(new i = 0; i <= MAX_PLAYERS; i++)
    {
    if(gTeam[playerid] == gTeam[i])
    {
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name, sizeof (name));
    format(string, sizeof(string), "[Gang Chat] %s: %s.",name, result);
    SendClientMessage(i, COLOR_GREEN, string);
    return 1;
    }
    }
    }
    return 1;
    }

    Hast du falsch eingefügt,der cmd hat kein klammerfehler(6 klammern { und 6 } ) ;)
    //Edit argh ich hatte das mit tmp usw ausm GF :pinch:
    Ganz oben ins Script
    new tmp[256];
    #define COLOR_GREEN 0x33AA33AA
    #define COLOR_GRAD2 0xBFC0C2FF


    bei



    public OnPlayerCommandText(playerid, cmdtext[])
    {
    new cmd[256];
    //cmds
    Unten ins Script

    strtok(const string[], &index)
    {
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' '))
    {
    index++;
    }
    new offset = index;
    new result[20];
    while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
    {
    result[index - offset] = string[index];
    index++;
    }
    result[index - offset] = EOS;
    return result;
    }

    Ne bei GF ist noch sendfamilymessage usw drin,guck mal ob der klappt...

    if(strcmp(cmd, "/g", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /g [text]");
    return 1;
    }
    new text;
    text = strval(tmp);
    {
    new name[MAX_PLAYER_NAME], string[128];
    GetPlayerName(playerid,name, sizeof (name));
    format(string, sizeof(string), "[Gang Chat] %s: %d.",name, text);
    }
    for(new i = 0; i <= MAX_PLAYERS; i++)
    {
    if(gTeam[playerid] == gTeam[i])
    {
    SendClientMessage(i, COLOR_GREEN, string);
    return 1;
    }
    }
    }
    return 1;
    }

    öh ja toll und wie soll das script den spieler wieder erkennen 8|
    Wenne nen GM machen willst wirste um nen register/login system nicht rumkommen...
    Ich weiß grad nicht wie man das in ner Datei speichert aber du kannst das z.B so machen:
    Oben ins Script
    new FSchein[MAX_PLAYERS];
    Onplayerconnect und onplayerdisconnect
    FSchein[playerid] = 0;
    wenn er führerschein bestanden hat
    FSchein[playerid] = 1;
    und bei onplayerentervehicle
    if(FSchein[palyerid] == 0)
    {
    RemovePlayerFromVehicle(playerid);
    }Ist ausm kopf geschrieben kA obs geht