Beiträge von Source

    Infernus[0] = CreatePickup(1239,14, -3158.82813, 1766.37207, 31.7114);
    NRG[0] = CreatePickup(1239,14, -3146.00439, 1866.65894, 43.66805);
    Infernus[1] = CreatePickup(1239,14, -3263.30859, 2109.77002, 71.47034);
    NRG[1] = CreatePickup(1239,14, -3409.01953, 2180.61523, 32.20464);
    Infernus[2] = CreatePickup(1239,14, -3200.35742, 2424.35059, 33.83939);
    NRG[2] = CreatePickup(1239,14, -3398.18457, 2257.15283, 33.92382);
    Infernus[3] = CreatePickup(1239,14,-3420.92554, 2238.97681, 76.72187);
    Hunter = CreatePickup(1239,14, -3945.85425, 3330.33398, 314.90033);

    Jetzt habe ich dieses Problem: Wenn ich das Pickup betrete kommt kein Fahrzeug und es passiert nichts.


    Die Pickups:


    Infernus[0] = CreatePickup(1239,1, -3158.82813, 1766.37207, 31.7114,-1);
    NRG[0] = CreatePickup(1239,1, -3146.00439, 1866.65894, 43.66805,-1);
    Infernus[1] = CreatePickup(1239,1, -3263.30859, 2109.77002, 71.47034,-1);
    NRG[1] = CreatePickup(1239,1, -3409.01953, 2180.61523, 32.20464,-1);
    Infernus[2] = CreatePickup(1239,1, -3200.35742, 2424.35059, 33.83939,-1);
    NRG[2] = CreatePickup(1239,1, -3398.18457, 2257.15283, 33.92382,-1);
    Infernus[3] = CreatePickup(1239,1,-3420.92554, 2238.97681, 76.72187,-1);
    Hunter = CreatePickup(1239,1, -3945.85425, 3330.33398, 314.90033,-1);


    Weiß jemand wieso?

    Hey Leute,


    habe jetzt meine Race Map fertig gemappt und wollte dieser jetzt noch die Funktionen scripten.


    Doch folgende Warnings welche verhindern, dass die Cars bei einem Pickup gaändert werden:


    I:\Testserver\gamemodes\DM.pwn(684) : warning 219: local variable "Infernus" shadows a variable at a preceding level
    I:\Testserver\gamemodes\DM.pwn(697) : warning 219: local variable "Infernus" shadows a variable at a preceding level
    I:\Testserver\gamemodes\DM.pwn(710) : warning 219: local variable "Infernus" shadows a variable at a preceding level
    I:\Testserver\gamemodes\DM.pwn(723) : warning 219: local variable "Infernus" shadows a variable at a preceding level
    I:\Testserver\gamemodes\DM.pwn(734) : warning 219: local variable "Hunter" shadows a variable at a preceding level
    I:\Testserver\gamemodes\DM.pwn(748) : warning 219: local variable "NRG" shadows a variable at a preceding level
    I:\Testserver\gamemodes\DM.pwn(761) : warning 219: local variable "NRG" shadows a variable at a preceding level
    I:\Testserver\gamemodes\DM.pwn(774) : warning 219: local variable "NRG" shadows a variable at a preceding level


    Code:


    if(pickupid == Infernus[0])
    {
    new vehicle;
    vehicle = GetPlayerVehicleID(playerid);
    if(GetVehicleModel(vehicle) == 522) // 411 is the infernus model
    {
    DestroyVehicle(vehicle);
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    new Infernus = CreateVehicle(411, x, y, z, 0.0000, -1, -1, 100);
    PutPlayerInVehicle(playerid,Infernus,0);
    }
    }
    else if(pickupid == Infernus[1])
    {
    new vehicle;
    vehicle = GetPlayerVehicleID(playerid);
    if(GetVehicleModel(vehicle) == 522) // 411 is the infernus model
    {
    DestroyVehicle(vehicle);
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    new Infernus = CreateVehicle(411, x, y, z, 0.0000, -1, -1, 100);
    PutPlayerInVehicle(playerid,Infernus,0);
    }
    }
    else if(pickupid == Infernus[2])
    {
    new vehicle;
    vehicle = GetPlayerVehicleID(playerid);
    if(GetVehicleModel(vehicle) == 522) // 411 is the infernus model
    {
    DestroyVehicle(vehicle);
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    new Infernus = CreateVehicle(411, x, y, z, 0.0000, -1, -1, 100);
    PutPlayerInVehicle(playerid,Infernus,0);
    }
    }
    else if(pickupid == Infernus[3])
    {
    new vehicle;
    vehicle = GetPlayerVehicleID(playerid);
    if(GetVehicleModel(vehicle) == 522) // 411 is the infernus model
    {
    DestroyVehicle(vehicle);
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    new Infernus = CreateVehicle(411, x, y, z, 0.0000, -1, -1, 100);
    PutPlayerInVehicle(playerid,Infernus,0);
    }
    }
    else if(pickupid == Hunter)
    {
    new vehicle;
    vehicle = GetPlayerVehicleID(playerid);
    if(GetVehicleModel(vehicle) == 411) // 411 is the infernus model
    {
    DestroyVehicle(vehicle);
    new Hunter = CreateVehicle(425, -3939.1460, 3331.2786, 483.8146, 0.0000, -1, -1, 100);
    PutPlayerInVehicle(playerid,Hunter,0);
    SendClientMessage(playerid,0xFFFFFFFF,"Du hast den Hunter erreicht!");
    }
    }
    else if(pickupid == NRG[1])
    {
    new vehicle;
    vehicle = GetPlayerVehicleID(playerid);
    if(GetVehicleModel(vehicle) == 411) // 411 is the infernus model
    {
    DestroyVehicle(vehicle);
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    new NRG = CreateVehicle(411, x, y, z, 0.0000, -1, -1, 100);
    PutPlayerInVehicle(playerid,NRG,0);
    }
    }
    else if(pickupid == NRG[2])
    {
    new vehicle;
    vehicle = GetPlayerVehicleID(playerid);
    if(GetVehicleModel(vehicle) == 411) // 411 is the infernus model
    {
    DestroyVehicle(vehicle);
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    new NRG = CreateVehicle(411, x, y, z, 0.0000, -1, -1, 100);
    PutPlayerInVehicle(playerid,NRG,0);
    }
    }
    else if(pickupid == NRG[0])
    {
    new vehicle;
    vehicle = GetPlayerVehicleID(playerid);
    if(GetVehicleModel(vehicle) == 411) // 411 is the infernus model
    {
    DestroyVehicle(vehicle);
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    new NRG = CreateVehicle(411, x, y, z, 0.0000, -1, -1, 100);
    PutPlayerInVehicle(playerid,NRG,0);
    }
    }


    Kann mir vielleicht jemand helfen?


    Mit freundlichen Grüßen .:Larso99:.

    killerid = GetPVarInt(playerid,"lhit");


    killerid also der Killer ist ja der Hitman selber. Was bringt dir dann diese abfrage?

    Du könntest das Headshot-System in den Gamemode mit einbringen und bei der Funktion
    TOETESPIELER(zielperson);
    Einfach abfragen ob der Killer ein Hitman ist.


    Also als Beispiel:
    if(IsPlayerInFrac(killerid,hitmafrakid)
    {
    if(Contract[killerid] == zielperson) //Hier abfragen ob der getötete der Contract des Spielers ist.
    {
    GivePlayerMoney(killerid,contractmoney); //Hier das Geld was er für den Contract bekommt
    }
    }


    So UNGEFÄHR könntest du dies machen.