Beiträge von The Sensei

    Hab ich aber...
    Es Funktioniert nicht man kriegt immer Skin 1.(CJ)


    public OnPlayerDeath(playerid, killerid, reason)
    {
    if(GetPVarInt(playerid,"Donator")==0)
    {
    SetPVarInt(playerid,"Tode",GetPVarInt(playerid,"Tode")+1);
    SetPVarInt(killerid,"Kills",GetPVarInt(killerid,"Kills")+1);
    GivePlayerMoney(killerid,250);
    SetPVarInt(killerid,"Respektpunkte",GetPVarInt(killerid,"Respektpunkte")+1);
    }
    if(GetPVarInt(playerid,"Donator")==1)
    {
    SetPVarInt(playerid,"Tode",GetPVarInt(playerid,"Tode")+1);
    SetPVarInt(killerid,"Kills",GetPVarInt(killerid,"KIlls")+1);
    GivePlayerMoney(killerid,500);
    SetPVarInt(killerid,"Respektpunkte",GetPVarInt(killerid,"Respektpunkte")+2);
    }
    SetPVarInt(playerid,"Killed",1);
    if(GetPVarInt(playerid,"Killed")==1)
    {
    SetTimer("Toggle",3000,1 );
    TogglePlayerSpectating(playerid, 1);
    PlayerSpectatePlayer(playerid, killerid);
    }
    if(GetPVarInt(playerid,"Klassen")==1)
    {
    if(GetPVarInt(playerid,"Team")==1)
    {
    SetPlayerSkin(playerid,287);
    }
    if(GetPVarInt(playerid,"Team")==2)
    {
    SetPlayerSkin(playerid,206);
    }
    if(GetPVarInt(playerid,"Team")==3)
    {
    SetPlayerSkin(playerid,125);
    }
    if(GetPVarInt(playerid,"Team")==4)
    {
    SetPlayerSkin(playerid,142);
    }
    if(GetPVarInt(playerid,"Team")==5)
    {
    SetPlayerSkin(playerid,156);
    }
    if(GetPVarInt(playerid,"Team")==6)
    {
    SetPlayerSkin(playerid,203);
    }
    if(GetPVarInt(playerid,"Team")==7)
    {
    SetPlayerSkin(playerid,118);
    }
    }
    if(GetPVarInt(playerid,"Klassen")==1)
    {
    SetPlayerSkin(playerid,70);
    }
    if(GetPVarInt(playerid,"Klassen")==3)
    {
    if(GetPVarInt(playerid,"Team")==1)
    {
    SetPlayerSkin(playerid,60);
    }
    if(GetPVarInt(playerid,"Team")==2)
    {
    SetPlayerSkin(playerid,47);
    }
    if(GetPVarInt(playerid,"Team")==3)
    {
    SetPlayerSkin(playerid,43);
    }
    if(GetPVarInt(playerid,"Team")==4)
    {
    SetPlayerSkin(playerid,95);
    }
    if(GetPVarInt(playerid,"Team")==5)
    {
    SetPlayerSkin(playerid,98);
    }
    if(GetPVarInt(playerid,"Team")==6)
    {
    SetPlayerSkin(playerid,59);
    }
    if(GetPVarInt(playerid,"Team")==7)
    {
    SetPlayerSkin(playerid,57);
    }
    }
    if(GetPVarInt(playerid,"Klasse")==4)
    {
    SetPVarInt(playerid,"Klassen",4);
    SetPlayerSkin(playerid,149);
    }
    SpielerSpeichern(playerid);
    return 1;
    }

    Challo,


    ich habe den /giveScore und /giveallscore command.
    Dieser Funktioniert auch bloß wie gebe ich einem das Score dazu und nicht das das Gesettet wird.?
    Code:
    ocmd:givescore(playerid,params[]) {
    if(!isPlayerAnAdmin(playerid,5))return SendClientMessage(playerid,ROT,"Rang zu Niedrig.");
    new pID, score, msg[144], string[200];
    if(sscanf(params,"ui",pID,score))return SendClientMessage(playerid,-1,"Tippe: /givescore [spieler] [Betrag] ");
    if(score < 1 || score > 900000000)return SendClientMessage(playerid,ROT,"Bitte gültigen Betrag angeben.");
    SetPVarInt(pID,"Respektpunkte",score);
    SpielerSpeichern(pID);
    format(msg, sizeof(msg),"Du hast vom System {0FFF00}%i Score bekommen.",score);
    Log("aScoreLog", string);
    return 1;
    }
    ocmd:giveallscore(playerid,params[]){
    new string[144];
    if(!isPlayerAnAdmin(playerid,5))return SendClientMessage(playerid,ROT,"Rang zu Niedrig!");
    if(!params[0])return SendClientMessage(playerid,-1,"Tippe: /giveallscore [Betrag]");
    if(0 > strval(params) > 900000000)return SendClientMessage(playerid,-1,"Bitte gültigen Betrag angeben!");
    for(new i;i<GetMaxPlayers();i++)SetPVarInt(i,"Respektpunkte",strval(params)),SpielerSpeichern(i);
    Log("aSCoreLog", string);
    return format(string,144,"Alle Spieler haben vom System {0FFF00}%d Score bekommen.",strval(params)),SendClientMessageToAll(-1,string);
    }

    Hallo,
    ich habe ein Shop für Normale und Premium User.
    Dieser hat aber einen Fehler wenn ich ESC drücke oder so dann wird mir tzd. ein Preis abgezogen.
    Code: if(dialogid==DIALOG_PREMBUY)
    {
    if(response==0)
    {
    SendClientMessage(playerid,-1,"Shop verlassen.");
    }
    if(response==1)
    {
    SendClientMessage(playerid,-1,"Shop verlassen.");
    }
    if(listitem==0)
    {
    SetPlayerArmour(playerid,100.0);
    SendClientMessage(playerid,-1,"Du hast dir eine Rüstung 2000$ gekauft.");
    SendClientMessage(playerid,-1,"HINWEIS: Du bist Premium User.");
    GivePlayerMoney(playerid,-2000);
    }
    if(listitem==1)
    {
    SetPlayerHealth(playerid,100.0);
    SendClientMessage(playerid,-1,"Du hast dir extra Leben für 1500$ gekauft.");
    SendClientMessage(playerid,-1,"HINWEIS: Du bist Premium User.");
    GivePlayerMoney(playerid,-1500);
    }
    }


    Bitte helft mir