Beiträge von xSonYx

    Jo, mein megaphone befehl hat das problem:
    Wenn ich es eingebe, erscheint der TextLabel zwar verschwinder nach dem timer aber nicht mehr, was tun?
    Code:


    PAWN Quelltext
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23


    CMD:m(playerid,params[])
    {
    new Name[MAX_PLAYER_NAME];
    new string[128],text[128];
    new Float:X,Float:Y,Float:Z;
    GetPlayerName(playerid,Name,sizeof(Name));
    GetPlayerPos(playerid,X,Y,Z);
    SetTimer("megaphone",5000,false);
    for(new i=0; i<MAX_PLAYERS; i++)
    {
    if(sscanf(params,"s",text))return SendClientMessage(playerid, 0xFF0000AA, "Benutzung: /m [Text]");
    {
    format(string,sizeof(string),"**(( Army Soldier %s: %s ))**", Name, text);
    label = Create3DTextLabel(string, 0xFFFF00AA,30.0, 40.0, 50.0, 40.0, 0);
    Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.7);
    }
    if(IsPlayerInRangeOfPoint(i, 40.0, X, Y, Z))
    {
    SendClientMessage(i,0xFFFF00AA,string);
    }
    }
    return 1;
    }






    PAWN Quelltext
    1
    2
    3
    4
    5
    6


    forward megaphone();
    public megaphone()
    {
    Delete3DTextLabel(label);
    return 1;
    }





    MfG

    Ich will eine Car ID abfragen, sieht so aus:
    public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
    {
    new veh;
    if(aktiv == 0)
    { veh = if(IsPlayerInAnyVehicle(playerid))//123
    {//124
    if(GetVehicleModel(veh) == 520)//125
    {
    for(new i=0; i<MAX_PLAYERS; i++)
    RemovePlayerFromVehicle(playerid);
    new Name[MAX_PLAYER_NAME];
    new text[128],string[128];
    GetPlayerName(playerid,Name,sizeof(Name));
    format(string,sizeof(string),"%s hat einen Hydra Kampfjet betreten!");
    SendClientMessage(i,0xFF0000AA,string);
    }
    }
    }
    return 1;
    }



    Die Errors:
    C:\Users\Lebbe\Neuer Ordner\SAMP\gamemodes\Mazerone.pwn(123) : error 029: invalid expression, assumed zero
    C:\Users\Lebbe\Neuer Ordner\SAMP\gamemodes\Mazerone.pwn(123 -- 124) : error 028: invalid subscript (not an array or too many subscripts): "IsPlayerInAnyVehicle"
    C:\Users\Lebbe\Neuer Ordner\SAMP\gamemodes\Mazerone.pwn(123 -- 125) : error 001: expected token: "}", but found "if"
    C:\Users\Lebbe\Neuer Ordner\SAMP\gamemodes\Mazerone.pwn(123 -- 125) : fatal error 107: too many error messages on one line



    Ich hoffe ihr könnt mir helfen

    3 errors bleiben:
    C:\Users\Lebbe\Neuer Ordner\SAMP\gamemodes\Mazerone.pwn(260) : error 029: invalid expression, assumed zero
    C:\Users\Lebbe\Neuer Ordner\SAMP\gamemodes\Mazerone.pwn(260) : warning 215: expression has no effect
    C:\Users\Lebbe\Neuer Ordner\SAMP\gamemodes\Mazerone.pwn(260) : error 001: expected token: ";", but found "if"



    MfG

    JOw, habe einen /megaphone gemacht, aber habe errors die ich nicht verstehe


    CMD:m(playerid,params[])
    {
    new Name[MAX_PLAYER_NAME];
    new string[128],text[128];
    new Float:X,Float:Y,Float:Z;
    GetPlayerName(playerid,Name,sizeof(Name));
    GetPlayerPos(playerid,X,Y,Z);
    if (sscanf(params, "s", text)) return SendClientMessage(playerid, 0xFF0000AA, "Benutzung: /m [Text]");
    {
    format(string,sizeof(string),"**(( %s: %s ))**", Name, text);
    label = Create3DTextLabel(string, 0xFFFF00AA,30.0, 40.0, 50.0, 40.0, 0);
    Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.7);
    SetTimer("megaphone",5000,0);
    }
    for(new i=0; i<MAX_PLAYERS; i++)
    else if(IsPlayerInRangeOfPoint(i, 40.0, X, Y, Z)) //Zeile 259
    {
    SendClientMessage(i,0xFFFF00AA,string);
    }
    return 1;
    }


    Errors:
    C:\Users\Lebbe\Neuer Ordner\SAMP\gamemodes\Mazerone.pwn(259) : error 029: invalid expression, assumed zero
    C:\Users\Lebbe\Neuer Ordner\SAMP\gamemodes\Mazerone.pwn(259) : warning 215: expression has no effect
    C:\Users\Lebbe\Neuer Ordner\SAMP\gamemodes\Mazerone.pwn(259) : error 001: expected token: ";", but found "if"
    C:\Users\Lebbe\Neuer Ordner\SAMP\gamemodes\Mazerone.pwn(259) : error 017: undefined symbol "i"
    C:\Users\Lebbe\Neuer Ordner\SAMP\gamemodes\Mazerone.pwn(259) : fatal error 107: too many error messages on one line



    MfG

    unter OnPlayerDeath:



    new toter[MAX_PLAYER_NAME],killer[MAX_PLAYER_NAME];
    new string[128],string1[128];
    GetPlayerName(playerid,toter,sizeof(toter));
    GetPlayerName(killerid,killer,sizeof(killer));
    format(string,sizeof(string),"Kill: Du hast %s Getötet",toter);
    format(string1,sizeof(string1),"Tod: Du wurdest von %s Getötet",killer);
    SendClientMessage(playerid,FARBE,string1);
    SendClientMessage(killerid,FARBE,string);



    mfG xSonYx