Beiträge von DJ Deagle


    static const AmmoAmount[MAX_WEAPONS]=
    {
    4999,//Fist 0
    4999,//Brass Knuckles 1
    4999,//Golf Club 2
    4999,//Nite Stick 3
    4999,//Knife 4
    4999,//Baseball Bat 5
    4999,//Shovel 6
    4999,//Pool Cue 7
    4999,//Katana 8
    4999,//Chainsaw 9
    4999,//Dildo 10
    4999,//Vibrator 11
    4999,//Vibrator 12
    4999,//Dildo 13
    4999,//Flowers 14
    4999,//Cane 15
    4999,//Grenade 16
    4999,//Tear Gas 17
    4999,//Molotov Cocktail 18
    0,//19
    0,//20
    0,//21
    34,//9mm 22
    17,//Silenced 9mm 23
    7,//Deagle 24
    4999,//Shotgun 25
    4,//Sawnoff 26
    7,//SPAS 12 27
    100,//Micro UZI 28
    30,//MP5 29
    30,//AK47 30
    30,//M4 31
    100,//Tec9 32
    4999,//Country Rifle 33
    4999,//Sniper Rifle 34
    4999,//Rocket Laucnher 35
    4999,//Heatseeker 36
    100,//Flamethrower 37
    500,//Minigun 38
    4999,//Satchel Charge 39
    4999,//Detonator40
    1000,//Spray Can 41
    500,//Fire Extinguisher 42
    4999,//Camera43
    4999,//Nightvision Goggles 44
    4999,//Thermal Goggles 45
    4999//Parachute 46
    };


    ad überprüft er wqas... ist aber nur, wieviel in einem Magazin sein darf

    HeyHoo,


    Ich hab mir den JunkBuster mal gedownloadet.
    Nur wenn ich /duty als Polizist eingebe, bekomme ich eine MP5 mit 300 Schuss.
    Leider werde ich dann aufgrund Cheaten einer MP5 gekickt (=?)....
    warum ist das so ?
    hier einmal meine ForbiddenWeapons(verbotene Waffen);


    9 = Chainsaw
    16 = Grenade
    17 = Tear Gas
    18 = Molotov Coktail
    26 = Sawn-off Sotgun
    27 = Combat Shotgun
    28 = Micro Uzi (Mac 10)
    32 = Tec 9
    35 = RPG
    36 = Heat seeking rocket launcher
    37 = Flamethrower
    38 = Minigun
    39 = Satchel charges
    40 = Detonator
    44 = NIght vision
    45 = thermal googles



    pls help!

    Wuhuu klappt...
    (Bin so früh ned ganz Wach)


    jetz nurnoch dem JunkBuster Typen erklären, wass er mich ned für né MP5 kicken soll ^^


    benutze erstmal strcmp, da andere Fraks diesen befehl auchnoch haben sollen ^^


    if(isPlayerInFrakt(playerid,1))
    {
    if(IsPlayerInRangeOfPoint(playerid,2,237.1750,110.2013,1003.2188))
    {
    if(strcmp(cmdtext,"/duty",true)==0)
    {
    SetPlayerColor(playerid,SFPDBlau);
    GivePlayerWeapon(playerid,3,1);
    GivePlayerWeapon(playerid,24,70);
    GivePlayerWeapon(playerid,29,300);
    SetPlayerHealth(playerid,100);
    SetPlayerArmour(playerid,100);
    SetPVarInt(playerid,"OnDuty",1);
    return 1;
    }
    }
    }
    if(isPlayerInFrakt(playerid,1))
    {
    if(IsPlayerInRangeOfPoint(playerid,2,237.1750,110.2013,1003.2188))
    {
    if(strcmp(cmdtext,"/duty",true)==0)
    {
    if(GetPVarInt(playerid,"OnDuty")==1)
    {
    SetPlayerColor(playerid,Weiss);
    ResetPlayerWeapons(playerid);
    SetPlayerArmour(playerid,0);
    SetPlayerHealth(playerid,100);
    return 1;
    }
    }
    }
    }


    immernoch diese sh1t meldung...
    was is denn das?

    HeyHoo,


    Ich hab mir grade nen /duty-Befehl gebastelt.
    Nur leider spuckt er mir immer "SERVER:Unknown command." aus....
    hier einmal der Command:

    if(isPlayerInFrakt(playerid,1))
    {
    if(IsPlayerInRangeOfPoint(playerid,2,237.1750,110.2013,1003.2188))
    {
    if(strcmp(cmdtext,"/duty",true)==0)
    {
    SetPlayerColor(playerid,SFPDBlau);
    GivePlayerWeapon(playerid,3,1);
    GivePlayerWeapon(playerid,24,70);
    GivePlayerWeapon(playerid,29,300);
    SetPlayerHealth(playerid,100);
    SetPlayerArmour(playerid,100);
    SetPVarInt(playerid,"OnDuty",1);
    }
    }
    }
    if(isPlayerInFrakt(playerid,1))
    {
    if(IsPlayerInRangeOfPoint(playerid,2,237.1750,110.2013,1003.2188))
    {
    if(strcmp(cmdtext,"/duty",true)==0)
    {
    if(GetPVarInt(playerid,"OnDuty")==1)
    {
    SetPlayerColor(playerid,Weiss);
    ResetPlayerWeapons(playerid);
    SetPlayerArmour(playerid,0);
    SetPlayerHealth(playerid,100);
    }
    }
    }
    }


    MfG
    Deagle

    Ja, es funktioniert, aber, es wird InGame nur 1 Wort angezeigt. Z.B. Ich tippe "/f Moin Moin" ein, dann zeigt er nur "Polizeipresident DJ_Deagle: Moin" an...
    Hier nochmal der Beehl:


    //Fraktionschat
    ocmd:f(playerid,params[])
    {
    new result[128];
    if(sscanf(params,"s[128]",result))
    {
    new resultstring[128];
    new Name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, Name, sizeof(Name));
    new member = GetPVarInt(playerid,"Fraktion");
    new leader = GetPVarInt(playerid,"Leader");
    {
    if(member==1)
    {
    if(GetPVarInt(playerid,"frakrank") == 6) { format(resultstring, sizeof(resultstring), "Polizeipresident %s: %s", Name, result); }
    else if(GetPVarInt(playerid,"frakrank") == 5) { format(resultstring, sizeof(resultstring), "Lieutnant %s: %s", Name, result); }
    else if(GetPVarInt(playerid,"frakrank") == 4) { format(resultstring, sizeof(resultstring), "Kommissar %s: %s", Name, result); }
    else if(GetPVarInt(playerid,"frakrank") == 3) { format(resultstring, sizeof(resultstring), "Bewährungshelfer %s: %s", Name, result); }
    else if(GetPVarInt(playerid,"frakrank") == 2) { format(resultstring, sizeof(resultstring), "Officer %s: %s", Name, result); }
    else if(GetPVarInt(playerid,"frakrank") == 1) { format(resultstring, sizeof(resultstring), "Cadet %s: %s", Name, result); }
    }
    else if(leader==1)
    {
    format(resultstring, sizeof(resultstring), "Polizeipresident %s: %s", Name, result);
    }
    for(new i; i<MAX_PLAYERS; i++)
    {
    if(GetPVarInt(playerid,"Fraktion") == GetPVarInt(playerid,"Fraktion") || GetPVarInt(playerid,"Leader") == GetPVarInt(playerid,"Leader"))
    {
    SendClientMessage(i, ChatGreen, resultstring);
    }
    }
    }
    }
    return 1;
    }



    MfG
    Deagle

    HeyHoo,


    Habe das Problem, dass wenn Ich InGame "/f test" eingebe, nur "Polizeipresident DJ_Deagle: " ankommt.
    Pls help !
    Hier der Befehl:



    //Fraktionschat
    ocmd:f(playerid,params[])
    {
    new result[128];
    if(sscanf(params,"i",result))
    {
    new resultstring[128];
    new Name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, Name, sizeof(Name));
    new member = GetPVarInt(playerid,"Fraktion");
    {
    if(member==1)
    {
    if(GetPVarInt(playerid,"frakrank") == 6) { format(resultstring, sizeof(resultstring), "Polizeipresident %s: %s", Name, result); }
    else if(GetPVarInt(playerid,"frakrank") == 5) { format(resultstring, sizeof(resultstring), "Lieutnant %s: %s", Name, result); }
    else if(GetPVarInt(playerid,"frakrank") == 4) { format(resultstring, sizeof(resultstring), "Kommissar %s: %s", Name, result); }
    else if(GetPVarInt(playerid,"frakrank") == 3) { format(resultstring, sizeof(resultstring), "Bewährungshelfer : %s", Name, result); }
    else if(GetPVarInt(playerid,"frakrank") == 2) { format(resultstring, sizeof(resultstring), "Officer %s: %s", Name, result); }
    else if(GetPVarInt(playerid,"frakrank") == 1) { format(resultstring, sizeof(resultstring), "Cadet %s: %s", Name, result); }
    }

    for(new i=0, j = GetMaxPlayers(); i < j; i++)
    {
    if(GetPVarInt(playerid,"Fraktion") == GetPVarInt(playerid,"Fraktion") || GetPVarInt(playerid,"Leader") == GetPVarInt(playerid,"Leader"))
    {
    SendClientMessage(i, ChatGrün, resultstring);
    }
    }
    }
    }
    return 1;
    }


    MfG
    Deagle

    hier eine Einfache & Schnelle Version:


    Ganz oben in Script:
    new spawnskins[ANZAHL] = {0,1 USW WV DU HALT HAST ^^};


    und dann z.B, bei OnPlayerRequestClass:


    SetSpawnInfo(playerid,0,spawnskins[random(sizeof(spawnskins))],SPAWNKOORDINATEN);
    damit geht er alle oben entstandenen Skins einzeln durch und sagt bei irgendeinem :"STOP" xD dann hat ID 0 den Skin 48 & ID 1 hat z.B. Skin 36^^


    hoffe konnte dir helfen

    hier der CMD:



    if(strcmp(cmdtext, "/family", true) == 0 || strcmp(cmdtext, "/f", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    GetPlayerName(playerid,sendername,sizeof(sendername));
    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, Grau, "Benutze: (/f)amily [Text]");
    return 1;
    }
    new string[64];
    new leader = GetPVarInt(playerid,"Leader");
    new member = GetPVarInt(playerid,"Fraktion");
    if( (member >= 1 && member <= 2) || (leader >= 0 && leader <= 1) )
    /*if( member != 21 && leader != 21 && member != 7 && leader != 7)*/
    {
    if(member==1)
    {
    if(GetPVarInt(playerid,"frakrank") == 6) { format(string, sizeof(string), "Polizeipredisent %s: %s. )) **", sendername, result); }
    else if(GetPVarInt(playerid,"frakrank") == 5) { format(string, sizeof(string), "Lieutnant %s: %s. )) **", sendername, result); }
    else if(GetPVarInt(playerid,"frakrank") == 4) { format(string, sizeof(string), "Oberkommissar %s: %s. )) **", sendername, result); }
    else if(GetPVarInt(playerid,"frakrank") == 3) { format(string, sizeof(string), "Bewährungshelfer %s: %s. )) **", sendername, result); }
    else if(GetPVarInt(playerid,"frakrank") == 2) { format(string, sizeof(string), "Officer %s: %s. )) **", sendername, result); }
    else if(GetPVarInt(playerid,"frakrank") == 1) { format(string, sizeof(string), "Cadet %s: %s. )) **", sendername, result); }
    SendFamilyMessage(GetPVarInt(playerid,"Fraktion"), ChatGrün, string);
    }
    else if(leader==1)
    {
    format(string, sizeof(string), "Polizeipresident %s: %s. )) **", sendername, result);
    SendFamilyMessage(GetPVarInt(playerid,"Fraktion"), ChatGrün, string);
    }
    printf("%s", string);
    return 1;
    }
    return 1;
    }
    return 1;
    }

    C:\Users\Joshua.haus-pc\Desktop\SAMP Server\gamemodes\SF-RL.pwn(3078) : error 001: expected token: "-string end-", but found "-identifier-"
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    1 Error.


    etwas hats gebracht - aber nicht viel