Beiträge von .Sammy

    if(strcmp(cmdtext, "/coamt", true)==0)
    {
    if (TowTruckers == 0)
    {
    SendClientMessage(playerid,COLOR_GRAD1,"Derzeit sind keine Ordnungsbeamte im Dienst.");
    return 1;
    }
    if (TowTruckers == 1)
    {
    SendClientMessage(playerid,0xFFFF00AA,"Ordnungsbeamte wurden über deinen Notruf informiert!");
    new pName[MAX_PLAYER_NAME];
    new msg[256];
    new Float:X, Float:Y, Float:Z;
    GetPlayerPos(playerid, X, Y, Z);
    format(msg,sizeof(msg),"*** %s (ID:&d) hat einen Notruf abgeschickt, er ist rot markiert. ***",pName,playerid);
    GetPlayerName(playerid,pName,sizeof(pName));
    for (new i=0;i<MAX_PLAYERS;i++)
    {
    if(IsTowTrucker[i] == 1)
    {
    SendClientMessage(i,0xFFFF00AA,msg);
    SetPlayerCheckpoint(i, X,Y,Z,3.0);
    }
    }
    }
    return 1;
    }



    Versuchs mal so ;) Du musst noch abfragen was passieren soll wenn TowTrucker on sind ;)

    Hallo Leute,


    ich verstehe folgenden Error einfach nicht :(



    C:\Users\Nicolas\Desktop\SAMP\gamemodes\Nicolas.pwn(143) : error 029: invalid expression, assumed zero
    C:\Users\Nicolas\Desktop\SAMP\gamemodes\Nicolas.pwn(143) : error 029: invalid expression, assumed zero
    C:\Users\Nicolas\Desktop\SAMP\gamemodes\Nicolas.pwn(143) : error 029: invalid expression, assumed zero
    C:\Users\Nicolas\Desktop\SAMP\gamemodes\Nicolas.pwn(143) : fatal error 107: too many error messages on one line


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    4 Errors.


    Die entsprechenden Scriptzeilen sind hier:


    public OnPlayerDeath(playerid, killerid, reason)
    {
    new string[128],frak[10];//Das ist die Fehlerzeile?!
    if(IsPlayerInFrakt(playerid,1) || IsPlayerInFrakt(playerid,2))
    {
    switch(GetPVarInt(playerid,"Fraktion"))
    {
    case 1:{frak="COP";}
    case 2:{frak="ROBBER";}
    }
    format(string,sizeof(string),"%s:%s hat %s getötet.",frak,SpielerName(killerid),SpielerName(playerid));
    SendClientMessageToAll(Rot,string);
    format(string, sizeof(string), "Kill: %s",SpielerName(playerid));
    GameTextForPlayer(killerid,string, 3000, 1);
    format(string, sizeof(string), "Killer: %s",SpielerName(killerid));
    GameTextForPlayer(playerid,string, 3000, 1);
    }
    return 1;
    }

    Hallo Breadfish,


    ich habe das Problem, dass wenn ich versuche /aduty zu gehen immer gesagt bekomme, dass ich den Befehl nicht nutzen kann. Was habe ich falsche gescriptet?



    if(strcmp(cmd, "/aduty", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pADuty] == 0)
    {
    if(PlayerInfo[playerid][pAdmin] == 1)
    {
    SetPlayerColor(playerid, 0xFF00EBFF);
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "AdmCmd: Admin %s hat den Admindienst begonnen.", sendername);
    OOCNews(0xFF00F5FF,string);
    ProbeSupporter[playerid] = Create3DTextLabel("ProbeSupporter",0xC8C8C8FF,30.0,40.0,50.0,40.0,0);
    Attach3DTextLabelToPlayer(ProbeSupporter[playerid], playerid, 0.0, 0.0, 0.3);
    getdate(year, month, day);
    gettime(hour, minute);
    format(string, sizeof(string), "AdmCmd: Admin %s started Support as an Admin. (%d-%d-%d)(%d:%d Uhr)", sendername,month,day,year,hour,minute);
    AdminLog(string);
    PlayerInfo[playerid][pADuty] = 1;
    SetPlayerHealth(playerid, 100);
    SetPlayerArmour(playerid,100);
    SetPlayerSkin(playerid, 279);
    return 1;
    }
    if(PlayerInfo[playerid][pAdmin] == 2)
    {
    SetPlayerColor(playerid, 0xFF00EBFF);
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "AdmCmd: Admin %s hat den Admindienst begonnen.", sendername);
    OOCNews(0xFF00F5FF,string);
    Supporter[playerid] = Create3DTextLabel("Supporter",0xF5FF00FF,30.0,40.0,50.0,40.0,0);
    Attach3DTextLabelToPlayer(Supporter[playerid], playerid, 0.0, 0.0, 0.3);
    getdate(year, month, day);
    gettime(hour, minute);
    format(string, sizeof(string), "AdmCmd: Admin %s started Support as an Admin. (%d-%d-%d)(%d:%d Uhr)", sendername,month,day,year,hour,minute);
    AdminLog(string);
    PlayerInfo[playerid][pADuty] = 1;
    SetPlayerHealth(playerid, 100);
    SetPlayerArmour(playerid,100);
    SetPlayerSkin(playerid, 279);
    return 1;
    }
    if(PlayerInfo[playerid][pAdmin] == 3)
    {
    SetPlayerColor(playerid, 0xFF00EBFF);
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "AdmCmd: Admin %s hat den Admindienst begonnen.", sendername);
    OOCNews(0xFF00F5FF,string);
    Moderator[playerid] = Create3DTextLabel("Moderator",0x00FF1EFF,30.0,40.0,50.0,40.0,0);
    Attach3DTextLabelToPlayer(Moderator[playerid], playerid, 0.0, 0.0, 0.3);
    getdate(year, month, day);
    gettime(hour, minute);
    format(string, sizeof(string), "AdmCmd: Admin %s started Support as an Admin. (%d-%d-%d)(%d:%d Uhr)", sendername,month,day,year,hour,minute);
    AdminLog(string);
    PlayerInfo[playerid][pADuty] = 1;
    SetPlayerHealth(playerid, 100);
    SetPlayerArmour(playerid,100);
    SetPlayerSkin(playerid, 279);
    return 1;
    }
    if(PlayerInfo[playerid][pAdmin] == 4)
    {
    SetPlayerColor(playerid, 0xFF00EBFF);
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "AdmCmd: Admin %s hat den Admindienst begonnen.", sendername);
    OOCNews(0xFF00F5FF,string);
    Administrator[playerid] = Create3DTextLabel("Administrator",0x0073FFFF,30.0,40.0,50.0,40.0,0);
    Attach3DTextLabelToPlayer(Administrator[playerid], playerid, 0.0, 0.0, 0.3);
    getdate(year, month, day);
    gettime(hour, minute);
    format(string, sizeof(string), "AdmCmd: Admin %s started Support as an Admin. (%d-%d-%d)(%d:%d Uhr)", sendername,month,day,year,hour,minute);
    AdminLog(string);
    PlayerInfo[playerid][pADuty] = 1;
    SetPlayerHealth(playerid, 100);
    SetPlayerArmour(playerid,100);
    SetPlayerSkin(playerid, 279);
    return 1;
    }
    if(PlayerInfo[playerid][pAdmin] == 5)
    {
    SetPlayerColor(playerid, 0xFF00EBFF);
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "AdmCmd: Admin %s hat den Admindienst begonnen.", sendername);
    OOCNews(0xFF00F5FF,string);
    SuperAdministrator[playerid] = Create3DTextLabel("SuperAdministrator",0xFF9600FF,30.0,40.0,50.0,40.0,0);
    Attach3DTextLabelToPlayer(SuperAdministrator[playerid], playerid, 0.0, 0.0, 0.3);
    getdate(year, month, day);
    gettime(hour, minute);
    format(string, sizeof(string), "AdmCmd: Admin %s started Support as an Admin. (%d-%d-%d)(%d:%d Uhr)", sendername,month,day,year,hour,minute);
    AdminLog(string);
    PlayerInfo[playerid][pADuty] = 1;
    SetPlayerHealth(playerid, 100);
    SetPlayerArmour(playerid,100);
    SetPlayerSkin(playerid, 279);
    return 1;
    }
    if(PlayerInfo[playerid][pAdmin] == 1337)
    {
    SetPlayerColor(playerid, 0xFF00EBFF);
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "AdmCmd: Admin %s hat den Admindienst begonnen.", sendername);
    OOCNews(0xFF00F5FF,string);
    ServerManager[playerid] = Create3DTextLabel("ServerManager",0x0023FFFF,30.0,40.0,50.0,40.0,0);
    Attach3DTextLabelToPlayer(ServerManager[playerid], playerid, 0.0, 0.0, 0.3);
    getdate(year, month, day);
    gettime(hour, minute);
    format(string, sizeof(string), "AdmCmd: Admin %s started Support as an Admin. (%d-%d-%d)(%d:%d Uhr)", sendername,month,day,year,hour,minute);
    AdminLog(string);
    PlayerInfo[playerid][pADuty] = 1;
    SetPlayerHealth(playerid, 100);
    SetPlayerArmour(playerid,100);
    SetPlayerSkin(playerid, 279);
    return 1;
    }
    if(PlayerInfo[playerid][pAdmin] == 133
    {
    SetPlayerColor(playerid, 0xFF00EBFF);
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "AdmCmd: Admin %s hat den Admindienst begonnen.", sendername);
    OOCNews(0xFF00F5FF,string);
    ServerOwner[playerid] = Create3DTextLabel("ServerOwner",0xC30000FF,30.0,40.0,50.0,40.0,0);
    Attach3DTextLabelToPlayer(ServerOwner[playerid], playerid, 0.0, 0.0, 0.3);
    getdate(year, month, day);
    gettime(hour, minute);
    format(string, sizeof(string), "AdmCmd: Admin %s started Support as an Admin. (%d-%d-%d)(%d:%d Uhr)", sendername,month,day,year,hour,minute);
    AdminLog(string);
    PlayerInfo[playerid][pADuty] = 1;
    SetPlayerHealth(playerid, 100);
    SetPlayerArmour(playerid,100);
    SetPlayerSkin(playerid, 279);
    return 1;
    }
    else
    {
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "AdmCmd: Admin %s hat den Admindienst beendet.", sendername);
    OOCNews(0xFF00F5FF,string);
    SetPlayerToTeamColor(playerid);
    PlayerInfo[playerid][pADuty] = 0;
    getdate(year, month, day);
    gettime(hour, minute);
    format(string, sizeof(string), "AdmCmd: Admin %s (lvl %d) stopped Support as an Admin. (%d-%d-%d)(%d:%d Uhr)", sendername,PlayerInfo[playerid][pAdmin],month,day,year,hour,minute);
    AdminLog(string);
    SetPlayerSkin(giveplayerid, PlayerInfo[giveplayerid][pModel]);
    Delete3DTextLabel(ProbeSupporter[playerid]);
    Delete3DTextLabel(Supporter[playerid]);
    Delete3DTextLabel(Moderator[playerid]);
    Delete3DTextLabel(Administrator[playerid]);
    Delete3DTextLabel(SuperAdministrator[playerid]);
    Delete3DTextLabel(ServerManager[playerid]);
    Delete3DTextLabel(ServerOwner[playerid]);
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD1, "Du bist nicht berechtigt, diesen Befehl zu benutzen !");
    return 1;
    }
    }
    return 1;
    }



    Danke schonmal im vorraus.

    1067if(PlayerInfo[playerid][pAdmin] == 1
    {
    SetPlayerColor(playerid, 0xFF00EBFF);
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "AdmCmd: Admin %s hat den Admindienst begonnen.", sendername);
    OOCNews(0xFF00F5FF,string);
    ProbeSupporter[playerid] = Create3DTextLabel("ProbeSupporter",0xEBFF00FF,30.0,40.0,50.0,40.0,0);
    Attach3DTextLabelToPlayer(ProbeSupporter[playerid], playerid, 0.0, 0.0, 0.3);
    getdate(year, month, day);
    gettime(hour, minute);
    format(string, sizeof(string), "AdmCmd: Admin %s started Support as an Admin. (%d-%d-%d)(%d:%d Uhr)", sendername,month,day,year,hour,minute);
    AdminLog(string);
    PlayerInfo[playerid][pADuty] = 1;
    SetPlayerHealth(playerid, 100);
    SetPlayerArmour(playerid,100);
    SetPlayerSkin(playerid, 279);
    return 1;
    } /pwn

    if(PlayerInfo[playerid][pAdmin] == 1
    {
    SetPlayerColor(playerid, 0xFF00EBFF);
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "AdmCmd: Admin %s hat den Admindienst begonnen.", sendername);
    OOCNews(0xFF00F5FF,string);
    ProbeSupporter[playerid] = Create3DTextLabel("ProbeSupporter",0xEBFF00FF,30.0,40.0,50.0,40.0,0);
    Attach3DTextLabelToPlayer(ProbeSupporter[playerid], playerid, 0.0, 0.0, 0.3);
    getdate(year, month, day);
    gettime(hour, minute);
    format(string, sizeof(string), "AdmCmd: Admin %s started Support as an Admin. (%d-%d-%d)(%d:%d Uhr)", sendername,month,day,year,hour,minute);
    AdminLog(string);
    PlayerInfo[playerid][pADuty] = 1;
    SetPlayerHealth(playerid, 100);
    SetPlayerArmour(playerid,100);
    SetPlayerSkin(playerid, 279);
    return 1;
    }



    Der Error in Zeiel 2: error 029: invalid expression, assumed zero




    Finde keine Lösung.




    Nicokiller

    Also ich meine das so:


    Wenn du normal im Chat schreibst ist deine Farbe ja weiß.


    Und ich möchte das so, dass wenn man /aduty geht, sich die Farbe in Rot verändert, damit das aufälliget ist.

    Halllo breadfish,


    kann mir einer sagen mit welchem Befehl ich, z.B: wenn ich Adminduty gehe, die Chatfarbe von weiß auf rot ändern kann?


    Mit freundlichen Grüßen und frohe Weihnachten
    Nicokiller