Skinklasse für Premium User

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Moin,
    ich möcht edas die Premium User eine eigene Skinklasse haben.
    Jedoch hab ich versucht bsi es nur geht, es geht aber nicht xD,

    if(isPlayerPremium(playerid))
    {
    if(classid == 15 || classid == 16 || classid == 17)
    {
    SetPlayerInterior(playerid,14);
    SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
    SetPlayerFacingAngle(playerid, 270.0);
    SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
    SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
    GameTextForPlayer(playerid,"~b~Premium", 3000, 6);
    SetPlayerColor(playerid,HELLBLAU);
    SetPVarInt(playerid,"SkinWahl",1);
    }
    else
    {
    SCM(playerid,HELLROT,"Du bist kein Premium Mitglied!");
    return 1;
    }


    Man kann die Skins trotzdem nehmen auch wenn man kein Premium User ist.

    :) SWAGETTI & YOLONAISE!


  • if(classid == 15 || classid == 16 || classid == 17)
    {
    if(isPlayerPremium(playerid))
    {
    SetPlayerInterior(playerid,14);
    SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
    SetPlayerFacingAngle(playerid, 270.0);
    SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
    SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
    GameTextForPlayer(playerid,"~b~Premium", 3000, 6);
    SetPlayerColor(playerid,HELLBLAU);
    SetPVarInt(playerid,"SkinWahl",1);
    return 1;
    }
    else
    {
    SCM(playerid,HELLROT,"Du bist kein Premium Mitglied!");
    return 0;
    }
    }

  • So siehts aus:

    public OnPlayerRequestClass(playerid, classid)
    {
    switch(classid)
    {
    case 0,1,2:klasse[playerid]=1; //Ballas
    case 3,4,5:klasse[playerid]=2; //GSF
    case 6,7,8:klasse[playerid]=3; // LSV
    case 9,10,11:klasse[playerid]=4; //Russische Mafia
    case 12,13,14:klasse[playerid]=5; //Aztecas
    }


    if(classid == 0 || classid == 1 || classid == 2)
    {
    SetPlayerInterior(playerid,14);
    SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
    SetPlayerFacingAngle(playerid, 270.0);
    SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
    SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
    GameTextForPlayer(playerid,"~p~Ballas", 3000, 6);
    SetPlayerColor(playerid,PINK);
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
    SetPVarInt(playerid,"SkinWahl",1);
    }
    if(classid == 3 || classid == 4 || classid == 5)
    {
    SetPlayerInterior(playerid,14);
    SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
    SetPlayerFacingAngle(playerid, 270.0);
    SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
    SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
    GameTextForPlayer(playerid,"~g~Grove Street Family", 3000, 6);
    SetPlayerColor(playerid,GRUEN);
    SetPVarInt(playerid,"SkinWahl",1);
    }
    if(classid == 6 || classid == 7 || classid == 8)
    {
    SetPlayerInterior(playerid,14);
    SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
    SetPlayerFacingAngle(playerid, 270.0);
    SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
    SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
    GameTextForPlayer(playerid,"~y~Los Santos Vagos", 3000, 6);
    SetPlayerColor(playerid,GELB);
    SetPVarInt(playerid,"SkinWahl",1);
    }
    if(classid == 9 || classid == 10 || classid == 11)
    {
    SetPlayerInterior(playerid,14);
    SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
    SetPlayerFacingAngle(playerid, 270.0);
    SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
    SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
    GameTextForPlayer(playerid,"~l~Die Russische Mafia", 3000, 6);
    SetPlayerColor(playerid,GRAU);
    SetPVarInt(playerid,"SkinWahl",1);
    }
    if(classid == 12 || classid == 13 || classid == 14)
    {
    SetPlayerInterior(playerid,14);
    SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
    SetPlayerFacingAngle(playerid, 270.0);
    SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
    SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
    GameTextForPlayer(playerid,"~b~Varios Los Aztecas", 3000, 6);
    SetPlayerColor(playerid,HELLBLAU);
    SetPVarInt(playerid,"SkinWahl",1);
    }
    if(classid == 15 || classid == 16 || classid == 17)
    {
    if(isPlayerPremium(playerid))
    {
    SetPlayerInterior(playerid,14);
    SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
    SetPlayerFacingAngle(playerid, 270.0);
    SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
    SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
    GameTextForPlayer(playerid,"~b~Premium", 3000, 6);
    SetPlayerColor(playerid,HELLBLAU);
    SetPVarInt(playerid,"SkinWahl",1);
    }
    else
    {
    SCM(playerid,HELLROT,"Du bist kein Premium Mitglied!");
    return 1;
    }
    }
    return 1;
    }

    :) SWAGETTI & YOLONAISE!

  • Dann frag nicht bei OnPlayerRequest ab sondern bei OnPlayerRequestSpawn


    Da einfach einfügen ^^
    Da aber Skinid prüfen.
    und mach es am besten komplett mit skinid (ist wesentlich einfacher und wesentlich weniger umständlich und 100 mal dynamischer :D)


    Also das da rausnehmen und nur einen Gametext und unter OnPlayerRequestSpawn(playeridblabla)
    if(skinid== skin1|| skinid== skin2|| skinid== skin3)
    if(isPlayerPremium(playerid))
    {
    SetPlayerInterior(playerid,14);
    SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
    SetPlayerFacingAngle(playerid, 270.0);
    SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
    SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
    GameTextForPlayer(playerid,"~b~Premium", 3000, 6);
    SetPlayerColor(playerid,HELLBLAU);
    SetPVarInt(playerid,"SkinWahl",1);
    }
    else
    {
    SCM(playerid,HELLROT,"Du bist kein Premium Mitglied!");
    return 1;
    }
    }


    Gruß

    ik bin der vito c:

  • Bekomme diese 2 Errors.

    public OnPlayerRequestSpawn(playerid, skinid)
    {
    if(skinid== 15|| skinid== 16|| skinid== 17)
    {
    if(isPlayerPremium(playerid))
    {
    SetPlayerInterior(playerid,14);
    SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
    SetPlayerFacingAngle(playerid, 270.0);
    SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
    SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
    GameTextForPlayer(playerid,"~b~Premium", 3000, 6);
    SetPlayerColor(playerid,HELLBLAU);
    SetPVarInt(playerid,"SkinWahl",1);
    }
    else
    {
    SCM(playerid,HELLROT,"Du bist kein Premium Mitglied!");
    return 1;
    }
    }
    return 1;
    }

    C:\Dokumente und Einstellungen\Sevket\Desktop\German Deathmatch\gamemodes\Deathmatch.pwn(2445) : error 017: undefined symbol "skinid"
    C:\Dokumente und Einstellungen\Sevket\Desktop\German Deathmatch\gamemodes\Deathmatch.pwn(2463) : warning 209: function "OnPlayerRequestSpawn" should return a value
    C:\Dokumente und Einstellungen\Sevket\Desktop\German Deathmatch\gamemodes\Deathmatch.pwn(2464) : error 010: invalid function or declaration
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    2 Errors.

    :) SWAGETTI & YOLONAISE!

    Einmal editiert, zuletzt von John_Sanclear ()

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen