Eigenes Interior via /enter

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
  • Erstellste einfach ein Command :


    if(strcmp(cmd, "/Enter", true) == 0)
    {
    if(PlayerToPoint(2.0, playerid,x,y,z ))// Füge bei x,y,z die cords des pickups ein
    {
    SetPlayerPos(playerid,x, y,z); // Füge Hier die Spawn Cords ein wo er in der Disko Landet.
    SetPlayerInterior(playerid,0); // die 0 mit der Interior ID Ersetzen der Disko.
    }
    }

    „Auge um Auge - und die ganze Welt wird blind sein.“
    - Mahatma Gandhi

  • if(strcmp(cmd, "/Enter", true) == 0)
    {
    if(PlayerToPoint(2.0, playerid,816.2785,-1387.7101,13.6129 ))// Füge bei x,y,z die cords des pickups ein
    {
    SetPlayerPos(playerid,x, y,z); // Füge Hier die Spawn Cords ein wo er in der Disko Landet.
    SetPlayerInterior(playerid,1); // die 0 mit der Interior ID Ersetzen der Disko.
    }
    }


    muss ich SetPlayerPos unbedingt die x,y,z nmachen oder reichts auch wenn ich nix mach :o


    (wohin dann mit dem cmd?)

  • hast du Filter oder Gamemode wo das Reinkommt? Wobei Glaube Gamemode . kann sein wegen PlayertoPoint haßt du das in dein script drinne :



    forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);





    public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
    {
    if(IsPlayerConnected(playerid))
    {
    new Float:oldposx, Float:oldposy, Float:oldposz;
    new Float:tempposx, Float:tempposy, Float:tempposz;
    GetPlayerPos(playerid, oldposx, oldposy, oldposz);
    tempposx = (oldposx -x);
    tempposy = (oldposy -y);
    tempposz = (oldposz -z);
    //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
    if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
    {
    return 1;
    }
    }
    return 0;
    }



    wenn du ein fs hast muss der befehl geändert werden.

    „Auge um Auge - und die ganze Welt wird blind sein.“
    - Mahatma Gandhi

  • also ich wills in den gamemode reinmachen.



    cmdtext funkta uch nicht


    das hab ich drinn
    forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);


    wie du gesagt hast und das


    if(IsPlayerConnected(playerid))
    {
    new Float:posx, Float:posy, Float:posz;
    new Float:oldposx, Float:oldposy, Float:oldposz;
    new Float:tempposx, Float:tempposy, Float:tempposz;
    GetPlayerPos(playerid, oldposx, oldposy, oldposz);
    new plvw, ivw;
    plvw = GetPlayerVirtualWorld(playerid);
    //radi = 2.0; //Trigger Radius
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(!BigEar[i])
    {
    ivw = GetPlayerVirtualWorld(i);


    if (ivw == plvw)
    {

    GetPlayerPos(i, posx, posy, posz);
    tempposx = (oldposx -posx);
    tempposy = (oldposy -posy);
    tempposz = (oldposz -posz);
    //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
    if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
    {
    SendClientMessage(i, col1, string);
    }
    else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
    {
    SendClientMessage(i, col2, string);
    }
    else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
    {
    SendClientMessage(i, col3, string);
    }
    else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
    {
    SendClientMessage(i, col4, string);
    }
    else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
    {
    SendClientMessage(i, col5, string);
    }
    }
    }]

  • ?? das was Anderes meine obs du auch :



    public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
    {
    if(IsPlayerConnected(playerid))
    {
    new Float:oldposx, Float:oldposy, Float:oldposz;
    new Float:tempposx, Float:tempposy, Float:tempposz;
    GetPlayerPos(playerid, oldposx, oldposy, oldposz);
    tempposx = (oldposx -x);
    tempposy = (oldposy -y);
    tempposz = (oldposz -z);
    //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
    if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
    {
    return 1;
    }
    }
    return 0;
    }


    drinne hast xD .




    Zitat

    muss ich SetPlayerPos unbedingt die x,y,z nmachen oder reichts auch wenn ich nix mach :o

    ja musst du sonst kommt logicher weise ein error.

    „Auge um Auge - und die ganze Welt wird blind sein.“
    - Mahatma Gandhi

  • E:\DOKUME~1\Speedy\Desktop\gm.pwn(5398) : error 017: undefined symbol "cmd"
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(8236) : warning 219: local variable "oldposx" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(8236) : warning 219: local variable "oldposy" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(8236) : warning 219: local variable "oldposz" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(23609) : warning 219: local variable "oldposx" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(23609) : warning 219: local variable "oldposy" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(23609) : warning 219: local variable "oldposz" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(23896) : warning 219: local variable "oldposx" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(23896) : warning 219: local variable "oldposy" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(23896) : warning 219: local variable "oldposz" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(23955) : warning 219: local variable "oldposx" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(23955) : warning 219: local variable "oldposy" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(23955) : warning 219: local variable "oldposz" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(26070) : warning 219: local variable "oldposx" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(26070) : warning 219: local variable "oldposy" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(26070) : warning 219: local variable "oldposz" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(34886) : warning 204: symbol is assigned a value that is never used: "olddistance"
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41769) : warning 219: local variable "oldposx" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41769) : warning 219: local variable "oldposy" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41769) : warning 219: local variable "oldposz" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41770) : warning 219: local variable "tempposx" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41770) : warning 219: local variable "tempposy" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41770) : warning 219: local variable "tempposz" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41772) : error 017: undefined symbol "x"
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41773) : error 017: undefined symbol "y"
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41774) : error 017: undefined symbol "z"
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41785) : error 055: start of function body without function header
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41786) : error 010: invalid function or declaration
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41791) : error 021: symbol already defined: "GetPlayerPos"
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41793) : error 010: invalid function or declaration
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41795) : error 010: invalid function or declaration
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41797) : error 010: invalid function or declaration
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41799) : error 010: invalid function or declaration
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41803) : error 010: invalid function or declaration
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41806) : error 021: symbol already defined: "GetPlayerPos"
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41811) : error 010: invalid function or declaration
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41815) : error 010: invalid function or declaration
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41819) : error 010: invalid function or declaration
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41823) : error 010: invalid function or declaration
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41827) : error 010: invalid function or declaration
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41833) : error 010: invalid function or declaration
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41840) : error 010: invalid function or declaration
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41847) : warning 219: local variable "posx" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41847) : warning 219: local variable "posy" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41847) : warning 219: local variable "posz" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41848) : warning 219: local variable "oldposx" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41848) : warning 219: local variable "oldposy" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41848) : warning 219: local variable "oldposz" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41849) : warning 219: local variable "tempposx" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41849) : warning 219: local variable "tempposy" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41868) : warning 219: local variable "posx" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41868) : warning 219: local variable "posy" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41868) : warning 219: local variable "posz" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41869) : warning 219: local variable "oldposx" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41869) : warning 219: local variable "oldposy" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41869) : warning 219: local variable "oldposz" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41870) : warning 219: local variable "tempposx" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41870) : warning 219: local variable "tempposy" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41870) : warning 219: local variable "tempposz" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41891) : warning 219: local variable "oldposx" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41891) : warning 219: local variable "oldposy" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41891) : warning 219: local variable "oldposz" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41892) : warning 219: local variable "tempposx" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41892) : warning 219: local variable "tempposy" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41892) : warning 219: local variable "tempposz" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41908) : warning 219: local variable "oldposx" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41908) : warning 219: local variable "oldposy" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(41908) : warning 219: local variable "oldposz" shadows a variable at a preceding level
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(44232) : error 055: start of function body without function header
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(44235) : warning 203: symbol is never used: "ivw"
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(44235) : warning 203: symbol is never used: "oldposx"
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(44235) : warning 203: symbol is never used: "oldposy"
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(44235) : warning 203: symbol is never used: "oldposz"
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(44235) : warning 203: symbol is never used: "plvw"
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(44235) : warning 203: symbol is never used: "posx"
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(44235) : warning 203: symbol is never used: "posy"
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(44235) : warning 203: symbol is never used: "posz"
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(44235) : warning 203: symbol is never used: "tempposx"
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(44235) : warning 203: symbol is never used: "tempposy"
    E:\DOKUME~1\Speedy\Desktop\gm.pwn(44235) : warning 203: symbol is never used: "tempposz"
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    21 Errors.



    wieso is das immer so schwer^^

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • ein fach das:
    stock PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
    {
    if(IsPlayerConnected(playerid))
    {
    new Float:oldposx, Float:oldposy, Float:oldposz;
    new Float:tempposx, Float:tempposy, Float:tempposz;
    GetPlayerPos(playerid, oldposx, oldposy, oldposz);
    tempposx = (oldposx -x);
    tempposy = (oldposy -y);
    tempposz = (oldposz -z);
    if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
    {
    return 1;
    }
    }
    return 0;
    }
    gaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaanz unten in dein script einfügen...

  • forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);



    und dann noch einige andere:


    public IsAtClothShop(playerid)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerToPoint(25.0,playerid,207.5627,-103.7291,1005.2578) || PlayerToPoint(25.0,playerid,203.9068,-41.0728,1001.8047))
    {//Binco & Suburban
    return 1;
    }
    else if(PlayerToPoint(30.0,playerid,214.4470,-7.6471,1001.2109) || PlayerToPoint(50.0,playerid,161.3765,-83.8416,1001.8047))
    {//Zip & Victim
    return 1;
    }
    }



    public IsAtGasStation(playerid)
    {
    if(IsPlayerConnected(playerid))
    {
    if(IsACop(playerid) && PlayerToPoint(5,playerid,1585.7896,-1677.6467,4.8970))
    { // COP GAS STATION
    return 1;
    }
    if(PlayerToPoint(10.0,playerid,1004.0070,-939.3102,42.1797) || PlayerToPoint(10.0,playerid,1944.3260,-1772.9254,13.3906))
    {//LS
    return 1;
    }
    else if(PlayerToPoint(10.0,playerid,-90.5515,-1169.4578,2.4079) || PlayerToPoint(10.0,playerid,-1609.7958,-2718.2048,48.5391))
    {//LS
    return 1;
    }
    else if(PlayerToPoint(10.0,playerid,-2029.4968,156.4366,28.9498) || PlayerToPoint(10.0,playerid,-2408.7590,976.0934,45.4175))
    {//SF
    return 1;
    }
    else if(PlayerToPoint(10.0,playerid,-2243.9629,-2560.6477,31.8841) || PlayerToPoint(10.0,playerid,-1676.6323,414.0262,6.9484))
    {//Between LS and SF
    return 1;
    }
    else if(PlayerToPoint(10.0,playerid,2202.2349,2474.3494,10.5258) || PlayerToPoint(10.0,playerid,614.9333,1689.7418,6.6968))
    {//LV
    return 1;
    }
    else if(PlayerToPoint(10.0,playerid,-1328.8250,2677.2173,49.7665) || PlayerToPoint(10.0,playerid,70.3882,1218.6783,18.5165))
    {//LV
    return 1;
    }
    else if(PlayerToPoint(10.0,playerid,2113.7390,920.1079,10.5255) || PlayerToPoint(10.0,playerid,-1327.7218,2678.8723,50.0625))
    {//LV
    return 1;
    }
    }



    usw usw

  • wenn du jetzt 2 mal in deinem script hast:
    #define blau 0xa000FFF
    #define blau 0xa000FFF
    (den hexcode hab ich mir nur jetzt mal so ausgedacht) dann würde es heißen:
    Symbol already defined "blau" <---- als errormeldung...
    also wirst du 2 mal PlayerToPoint definiert haben... nicht mit #define
    aber i-wo unten im script

  • du erstellst dann erstmal ein pickup:
    AddStaticPickup(pickupid,style,x,y,z); //als style würd ich die 2 empfehlen
    und dann bei OnPlayerPickUpPickup:
    if(pickupid == die nummer des pickups) {//achtung, es wird bei 0 angefangen zu zählen!
    SetPlayerInterior(playerid,gewünschter interior);
    SetPlayerPos(playerid,x,y,z); }

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