Beiträge von BlackFoX

    if (strcmp("/schleppen", cmdtext, true, 10) == 0)
    {
    if(IsPlayerInAnyVehicle(playerid))
    {
    new vehid = GetPlayerVehicleID(playerid);
    if(!IsTrailerAttachedToVehicle(vehid))
    {
    new Float:x, Float:y, Float:z;
    GetVehiclePos(vehid, x, y, z );
    new vehiclet;
    GetVehicleWithinDistance(playerid, x, y, z, 100.0, vehiclet);
    AttachTrailerToVehicle(vehiclet, vehid);
    }
    else
    {
    DetachTrailerFromVehicle(vehid);
    }
    }
    return 1;
    }

    new temp[128],cmd[128],index;
    cmd = strtok(cmdtext,index);
    if (strcmp("/car", cmd, true, 10) == 0)
    {
    temp = strtok(cmdtext,index);
    if(!strlen(tmp)){return 1;}
    new id = strval(temp);
    temp = strtok(cmdtext,index);
    if(!strlen(tmp)){return 1;}
    new color1 = strval(temp);
    temp = strtok(cmdtext,index);
    if(!strlen(tmp)){return 1;}
    new color2 = strval(temp);
    if(IsPlayerAdmin(playerid))
    {
    new Float:px,Float:py,Float:pz;
    GetPlayerPos(playerid,px,py,pz);
    new car = CreateVehicle(id,px,py,pz,90.0,color1,color2,60000);
    }
    return 1;
    }

    public GlobalChat(playerid,COLOR,const text[128])
    {
    new Float:mx,Float:my,Float:mz;
    GetPlayerPos(playerid,mx,my,mz);
    for(new x = 0;x<MAX_PLAYERS;x++)
    {
    If(PlayerToPoint(50.0,x,mx,my,mz)){SendClientMessage(x,COLOR,text);}
    }
    return 1;
    }
    vllt klappts ja ;)

    vllt hast du ja MTA Deathmatch dort gibts noch keinen Map Editor , dann kannste MTA Race 1.11 nehmen dort ist einer,

    > STRTOK
    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;
    }


    Dann bei OnPlayerCommandText
    new tmp[128],cmd[128],index;
    if (strcmp(cmd, "/healme", true) ==0 )
    {
    tmp = strtok(cmdtext,index);
    if(!strlen(tmp)){return 1;} // er geht zurück sobald der Inhalt von tmp nix war
    new health = strval(tmp);
    SetPlayerHealth(playerid,health);
    return 1;
    }
    falls du noch einen Parameter willst unter dem new health = ... also die Zwischenspeicherung nochmal
    tmp = strtok(cmdtext,index); dann die abfrage wegen dem Inhalt und noch ne Zwischenspeicherung dann den Wert dort einsetzen wo
    er gebraucht wird

    new weap0, ammo0, weap1, ammo1, weap2, ammo2, weap3, ammo3, weap4, ammo4, weap5, ammo5, weap6, ammo6, weap7, ammo7;
    GetPlayerWeaponData(playerid,0,weap0,ammo0);
    GetPlayerWeaponData(playerid,1,weap1,ammo1);
    GetPlayerWeaponData(playerid,2,weap2,ammo2);
    GetPlayerWeaponData(playerid,3,weap3,ammo3);
    GetPlayerWeaponData(playerid,4,weap4,ammo4);
    GetPlayerWeaponData(playerid,5,weap5,ammo5);
    GetPlayerWeaponData(playerid,6,weap6,ammo6);
    GetPlayerWeaponData(playerid,7,weap7,ammo7);
    ResetPlayerWeapons(playerid);
    und beim verlassen der Zone z.b.


    GivePlayerWeapon(playerid,weap7,ammo7);

    dazu musst du den Textwert Index überprüfen stelle für stelle kleines Beispiel


    new String[128];


    if(String[index] = 'A')


    nur ne Möglich keit ^^, die String Stelle für Stelle Zusammensetzen ^^ und so nen Zusammenhang finden aber weiss jetz auch nix genaueres