Beiträge von CompleXx95


    public OnPlayerStateChange(playerid, newstate, oldstate)



    if(newstate == PLAYER_STATE_DRIVER)
    {
    for(new i;i<31;i++)
    {
    if(GetPlayerVehicleID(playerid) == ADMcars[i] && Player[playerid][admin] < 1)
    {
    RemovePlayerFromVehicle(playerid);
    SCM(playerid,"Haha nicht im Team!");
    }
    }
    }


    Sollte doch genügen als Beisp. , oder?

    Jo es sind imemr verschiedene Tasten!
    Da sich das mit SAMP und den Tasten überschneidet, ich habe es mal getestet.


    Bei mir geht es im Auto mit Spezielmission (Standart:"2") und zu Fuß mit Numpad "+".

    Hey,


    Wie manche schon wissen habe ich ja jetzt ein Anti Teamkill System
    und da kommt schon der Erste Fehler/Problem/Wunsch, wie man es nennen möchte).


    Wie muss ich es schreiben dass wenn er die 3/3 Warns voll hat, gekickt wird°-°?
    Hier der Auschnitt (wie ihr seht habe ich scho nden Anfang gemacht /aber falsch xD)
    ²Zeile: Ab Zeile 26 geht´s los!

    if(killerid != INVALID_PLAYER_ID)
    {
    if(Team[playerid] == Team[killerid])
    {
    TeamKills[killerid]++;
    if(TeamKills[killerid] == 1)
    {
    GameTextForPlayer(playerid, "~y~Teamkill ~r~not allowed!~n~~r~1/3 Warnings!", 6000, 1);
    ResetPlayerWeapons(playerid);
    SetPlayerHealth(playerid, 1);
    SetPlayerScore(playerid, -2);
    SetPlayerPos(playerid, 1551.7120, -1675.3322, 15.9687);
    SetPlayerFacingAngle(playerid, 91.0272);
    SetPlayerSkin(playerid, 137);
    }
    if(TeamKills[killerid] == 2)
    {
    GameTextForPlayer(playerid, "~y~Teamkill ~r~not allowed!~n~~r~2/3 Warnings!", 6000, 1);
    ResetPlayerWeapons(playerid);
    SetPlayerHealth(playerid, 1);
    SetPlayerScore(playerid, -10);
    SetPlayerPos(playerid, 1551.7120, -1675.3322, 15.9687);
    SetPlayerFacingAngle(playerid, 91.0272);
    SetPlayerSkin(playerid, 137);
    }
    if(TeamKills[killerid] == 3)
    {
    GameTextForPlayer(playerid, "~y~Teamkill ~r~not allowed!~n~~r~3/3 Warnings!", 6000, 1);
    ResetPlayerWeapons(playerid);
    SetPlayerHealth(playerid, 1);
    SetPlayerScore(playerid, -10);
    SetPlayerPos(playerid, 1551.7120, -1675.3322, 15.9687);
    SetPlayerFacingAngle(playerid, 91.0272);
    SetPlayerSkin(playerid, 137);

    new
    name[MAX_PLAYER_NAME];
    string[256];
    GetPlayerName(pID,name,sizeof(name));
    format(string,sizeof(string),"[AUTO-KICK] has kicked %s with Reason: Teamkill"name);
    SendClientMessageToAll(ROT,string);
    Kick(pID);
    return 1;
    }
    }
    }


    //edit: ²!


    MFG.


    dcmd_setskin(playerid,params[])
    {
    if(Player[playerid][admin] < 1){
    return SendClientMessage (playerid,WEIS,"SERVER: Unknown command.");
    }
    new pID,skinid;
    if(sscanf(params,"ud",pID,skinid)){
    return SendClientMessage(playerid,WEIS,"Usage: /setskin [playerid] [skinID 0-299!]");
    }
    if(!IsPlayerConnected(pID)){
    return SendClientMessage(playerid,WEIS,"Nobody is connected with this ID!");
    }
    if(skinid < 0){
    return SendClientMessage(playerid,WEIS,"INVALID ID!");
    }
    if(skinid > 299){
    return SendClientMessage(playerid,WEIS,"INVALID ID!");
    }
    new string[128],string2[128],aname[MAX_PLAYER_NAME],name[MAX_PLAYER_NAME];
    SetPlayerSkin(pID,skinid);
    GetPlayerName(playerid,aname,sizeof(aname));
    GetPlayerName(pID,name,sizeof(name));
    format(string,sizeof(string),"You have set the SkinID of %s to %d",name,skinid);
    format(string2,sizeof(string2),"Admin %s has set your SkinID to %d",aname,skinid);
    SendClientMessage(playerid,GRÜN,string);
    SendClientMessage(pID,GRÜN,string2);
    return 1;
    }
    Entweder so und so..

    dcmd_vehicle(playerid,params[])
    {
    if(Player[playerid][admin] < 1){
    return SendClientMessage (playerid,WEIS,"SERVER: Unknown command.");
    }
    new veh,color1,color2;
    if(sscanf(params,"ddd",veh,color1,color2)){
    return SendClientMessage(playerid,WEIS,"Usage: /vehicle [vehicleID] [color1] [color2]");
    }
    if(veh < 400){
    return SendClientMessage(playerid,WEIS,"INVALID vehID![400-611]");
    }
    if(veh > 611){
    return SendClientMessage(playerid,WEIS,"INVALID vehID![400-611]");
    }
    if(color1 < 0){
    return SendClientMessage(playerid,WEIS,"INVALID color1ID![0-126]");
    }
    if(color1 > 126){
    return SendClientMessage(playerid,WEIS,"INVALID color1ID![0-126]");
    }
    if(color2 < 0){
    return SendClientMessage(playerid,WEIS,"INVALID color2ID![0-126]");
    }
    if(color2 > 126){
    return SendClientMessage(playerid,WEIS,"INVALID color2ID![0-126]");
    }
    new Float:x , Float:y , Float: z, Car;
    GetPlayerPos(playerid,x,y,z);
    Car = CreateVehicle(veh, x, y, z, 0, color1, color2, 123456789);
    SetPlayerPos(playerid,x,y,z);
    SetVehiclePos(veh,x,y,z);
    PutPlayerInVehicle(playerid, Car, 0);
    return 1;
    }


    MFG.

    Hallo,


    Wie die Überschrift verrät habe ich ein Problem bezügl. des Tamkill!
    Ich weis nicht wie ich es schildern soll aber ich schreibe einfach alles was damit zutun hat!
    Also eigentlich soll es so sein dass wenn jemand in seinem Eigenen Team killt soll er für 1 Minute gefreezed werden,
    sollte es nochmals passieren = 2 Minuten Freeze, nochmals?! =Kick, und wenn es nochmals vorkommt =Ban.

    Ps: Beim Teamkill bekommt der gekillte die Nachicht: "Teamkill not allowed".
    *Und nach dem 2 Mal bekommt der gekillte den Kick!und bei den anderen steht: was kicked... und eine Zeile drunter: was banned.


    Also:

    //news
    new TeamKill[MAX_PLAYERS];
    new TeamKill2[MAX_PLAYERS];
    new TeamKill3[MAX_PLAYERS];


    //forwards
    forward TeamKillTimer(playerid);
    forward TeamKillTimer2(playerid);
    _____________________________________________
    OngameModInit

    SetTimer("TeamkillTimer",60000,1);
    SetTimer("TeamKillTimer2",12000,1);
    _____________________________________________
    public OnPlayerDeath


    {
    if(Team[playerid] == Team[killerid])
    {
    SetTimerEx("TeamKillTimer",6000,0,"i", killerid);
    GameTextForPlayer(playerid, "~r~Teamkill ~n~~w~Freeze for 1 minute.", 6000, 3);
    TogglePlayerControllable(killerid, false);
    }
    if(Team[playerid] == Team[killerid] && TeamKill[playerid] == 1)
    {
    SetTimerEx("TeamKillTimer2",12000,0,"i", killerid);
    GameTextForPlayer(playerid, "~r~Teamkill ~n~~w~Freeze for 2 minutes.", 12000, 3);
    TogglePlayerControllable(killerid, false);
    }
    if(Team[playerid] == Team[killerid] && TeamKill2[playerid] == 1)
    {
    TogglePlayerControllable(killerid, false);
    new Member[MAX_PLAYER_NAME], msg[56];
    format(msg, sizeof(msg),"[AUTO-KICK] kicked [%s] with Reason: Teamkill [3/4 Warns]", Member, msg);
    SendClientMessageToAll(ROT,msg);
    Kick(playerid);
    TeamKill3[playerid] = 1;
    }
    if(Team[playerid] == Team[killerid] && TeamKill3[playerid] == 1)
    {
    TogglePlayerControllable(killerid, false);
    new Member[MAX_PLAYER_NAME], msg[56];
    format(msg, sizeof(msg),"[AUTO-KICK] banned [%s] with Reason: Teamkill [4/4 Warns]", Member, msg);
    SendClientMessageToAll(ROT,msg);
    Ban(playerid);
    }
    //Druhter is noch was also nicht wundern wegen der Klammer ;)
    ______________________________________________________________________________________
    Ganz unten im Script habe ich das:


    public TeamKillTimer(playerid)
    {
    SendClientMessage(playerid, GRÜN, "1 minute over, unfreezed!");
    TogglePlayerControllable(playerid, true);
    TeamKill[playerid] = 1;
    return 1;
    }


    public TeamKillTimer2(playerid)
    {
    SendClientMessage(playerid, GRÜN, "2 Minutes over, unfrezzed!");
    TogglePlayerControllable(playerid, true);
    TeamKill2[playerid] = 1;
    return 1;
    }


    So es ist nun alles dabei ich hoffe jemand kann mir helfen :(, SufU auch benutzt!


    MFG.


    //edit: wichtiger Satz vergessen!* + Rechtschreibung.

    Hä jetzt verteh ich garnichts mehr?!


    Also wie gesagt:
    Immer noch so..

    Könntest du mir das am Beispiel machen? oO