Beiträge von SkrilLinux

    Hallo,
    ich komme hier nicht weiter:
    forward antihealth();
    SetTimer("antihealth",1000,true);
    public antihealth()
    {
    new health;
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(GetPlayerHealth(i) < 100 || health > 0)
    {
    SendClientMessage(i,rot,"Stop Health-Hacking!!");
    Kick(playerid);
    }
    }
    return 1;
    }
    C:\Users\Robin\Desktop\GTA Server 8090\gamemodes\thenewgamers.pwn(8801) : warning 202: number of arguments does not match definition
    C:\Users\Robin\Desktop\GTA Server 8090\gamemodes\thenewgamers.pwn(8804) : error 017: undefined symbol "playerid"
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    1 Error.

    Ich hoffe mir kann jemand weiterhelfen :)


    Unnötige Arbeit, wenn es nur einmal verwendet werden soll.


    if(GetPVarInt(playerid,"Fraktion")!=fPolizei||GetPVarInt(playerid,"Fraktion")!=fArmy||GetPVarInt(playerid,"Fraktion")!=fFBI||GetPVarInt(playerid,"Fraktion")!=fSWAT)


    Mit freundl. Grüßen
    Padarom


    Wenn er es nur 1x verwenden will dann hast du recht ;)


    Wenn er es mehrmals verwenden will dann habe ich recht :D


    Danke :thumbup:

    Hallo, was mache ich hier falsch?
    Wenn ich /makeadmin playerid rank eingebe
    Steht da immer Projektleiter und nicht automatisch den switch.
    COMMAND:makeadmin(playerid,params[])
    {
    if(!IsPlayerAnAdmin(playerid,6))return SendClientMessage(playerid,rot,"Du bist nicht mindestestens Adminrank High-Admin");
    {
    if(GetPVarInt(playerid,"Adminlevel") == 0)return SendClientMessage(playerid,rot,"Du bist nicht mindestestens Adminrank High-Admin!");
    SendClientMessage(playerid,blau,"0.Zivilist");
    SendClientMessage(playerid,blau,"1.Supporter auf Probe");
    SendClientMessage(playerid,blau,"2.Supporter");
    SendClientMessage(playerid,blau,"3.Moderrator");
    SendClientMessage(playerid,blau,"4.Super Moderrator");
    SendClientMessage(playerid,blau,"5.Sponsor");
    SendClientMessage(playerid,blau,"6.Administrator");
    SendClientMessage(playerid,blau,"7.High-Admin");
    SendClientMessage(playerid,blau,"8.Stellv. Projektleiter");
    SendClientMessage(playerid,blau,"9.Projektleiter");
    SendClientMessage(playerid,blau,"10.Serverleiter");
    new pID, rank;
    if(sscanf(params,"ui",pID,rank))return SendClientMessage(playerid,rot,"Tippe: /makeadmin [Spielerid] [Rang]");
    if(rank >= 0 && rank <= 10 )
    {
    SetPVarInt(pID,"Adminlevel",rank);
    new playername[24];
    GetPlayerName(pID, playername, 24);
    new adminname[24];
    GetPlayerName(playerid, adminname, 24);
    SpielerSpeichern(pID);
    new adminrankname[64];
    switch(GetPVarInt(playerid,"Adminlevel"))
    {
    case 0:{adminrankname= "Zivilist";}
    case 1:{adminrankname= "Supporter auf Probe";}
    case 2:{adminrankname= "Supporter";}
    case 3:{adminrankname= "Moderrator";}
    case 4:{adminrankname= "Super Moderrator";}
    case 5:{adminrankname= "Sponsor";}
    case 6:{adminrankname= "Administrator";}
    case 7:{adminrankname= "High-Admin";}
    case 8:{adminrankname= "Stellv. Projektleiter";}
    case 9:{adminrankname= "Projektleiter";}
    case 10:{adminrankname= "Serverleiter";}
    }
    new string[128];
    new string2[128];
    format(string, sizeof(string),"Du hast %s zum [Adminrank: %s] eingestellt!",playername,adminrankname);
    SendClientMessage(playerid,blau,string);


    format(string2, sizeof(string2),"Admin %s hat dich zum [Adminrank: %s] eingestellt!",adminname,adminrankname);
    SendClientMessage(pID,blau,string2);
    }else SendClientMessage(playerid,rot,"Bitte gültigen Rang angeben (1-10)");
    }
    return 1;
    }

    Danke wer es wieder eröffnet hat :)
    Hallo Leute,
    wie erstelle ich einen Fraktions-Funk, sodass wenn ich /r text eingebe dass das dann alle member in der fraktion lesen können. Habe das so: stock IsPlayerInJob(playerid,jobid)
    {
    if(GetPVarInt(playerid,"Job") == jobid)return 1;
    return 0;
    }


    COMMAND:setjob(playerid,params[])
    {
    if(!IsPlayerAnAdmin(playerid,5))return SendClientMessage(playerid,rot,"Du bist nicht Adminlevel 5");
    new pID, jobid;
    if(sscanf(params,"ui",pID,jobid))return SendClientMessage(playerid,rot,"Tippe: /setjob [Spielerid] [JobID]");
    SetPVarInt(pID,"Job",jobid);
    new playername[24];
    GetPlayerName(pID, playername, 24);
    new adminname[24];
    GetPlayerName(playerid, adminname, 24);
    SpielerSpeichern(pID);
    new string[128];
    new string2[128];
    format(string, sizeof(string),"Du hast %s zum Arbeiten im [Job: %d] angestellt!",playername,jobid);
    SendClientMessage(playerid,blau,string);


    format(string2, sizeof(string2),"Admin %s hat dich zum Arbeiten im [Job: %d] angestellt!",adminname,jobid);
    SendClientMessage(pID,blau,string2);
    return 1;
    }
    Irgendjemand kann mir doch sicher helfen :)

    Hallo :) ,
    ich habe ein Problem mit sscanf, und zwar wenn ich die Zeile so habe:
    COMMAND:t(playerid,params[])
    {
    new giveplayerid;
    if(!IsPlayerAnAdmin(playerid,1))return SendClientMessage(playerid,rot,"Du bist nicht Adminlevel 1!");
    if(sscanf(params, "ui", giveplayerid))
    {
    SetWorldTime(giveplayerid);
    new playername[128];
    new giveplayername[128];
    new string[128];
    GetPlayerName(playerid,playername,128);
    GetPlayerName(giveplayerid,giveplayername,128);
    format(string, sizeof(string),"Admin %s hat die Uhrzeit geändert!",playername);
    SendClientMessageToAll(rot,string);
    }
    else SendClientMessage(playerid,rot,"Tippe: /t [Uhrzeit]");
    return 1;
    }
    Dann passiert wenn ich nur "/t" tippe dann ändert es die uhrzeit auf 0 Uhr normal sollte da eigentlich die meldung hier kommen: else SendClientMessage(playerid,rot,"Tippe: /t [Uhrzeit]"); wenn ich "/t 12" eingebe kommt da auch 12 Uhr aber das kann ja nicht sein das wenn man nichts eingibt das es da einfach auf 0 ändert.


    Wenn ich es so umändere ("!" hin):
    COMMAND:t(playerid,params[])
    {
    new giveplayerid;
    if(!IsPlayerAnAdmin(playerid,1))return SendClientMessage(playerid,rot,"Du bist nicht Adminlevel 1!");
    if(!sscanf(params, "ui", giveplayerid))
    {
    SetWorldTime(giveplayerid);
    new playername[128];
    new giveplayername[128];
    new string[128];
    GetPlayerName(playerid,playername,128);
    GetPlayerName(giveplayerid,giveplayername,128);
    format(string, sizeof(string),"Admin %s hat die Uhrzeit geändert!",playername);
    SendClientMessageToAll(rot,string);
    }
    else SendClientMessage(playerid,rot,"Tippe: /t [Uhrzeit]");
    return 1;
    }
    Dann kommt wenn ich "/t" eingebe oder "/t 21" immer das else SendClientMessage(playerid,rot,"Tippe: /t [Uhrzeit]");


    Das Plugin habe ich unten als Stock so wie hier:
    stock sscanf(string[], format[], {Float,_}:...)
    {
    #if defined isnull
    if (isnull(string))
    #else
    if (string[0] == 0 || (string[0] == 1 && string[1] == 0))
    #endif
    {
    return format[0];
    }
    #pragma tabsize 4
    new
    formatPos = 0,
    stringPos = 0,
    paramPos = 2,
    paramCount = numargs(),
    delim = ' ';
    while (string[stringPos] && string[stringPos] <= ' ')
    {
    stringPos++;
    }
    while (paramPos < paramCount && string[stringPos])
    {
    switch (format[formatPos++])
    {
    case '\0':
    {
    return 0;
    }
    case 'i', 'd':
    {
    new
    neg = 1,
    num = 0,
    ch = string[stringPos];
    if (ch == '-')
    {
    neg = -1;
    ch = string[++stringPos];
    }
    do
    {
    stringPos++;
    if ('0' <= ch <= '9')
    {
    num = (num * 10) + (ch - '0');
    }
    else
    {
    return -1;
    }
    }
    while ((ch = string[stringPos]) > ' ' && ch != delim);
    setarg(paramPos, 0, num * neg);
    }
    case 'h', 'x':
    {
    new
    num = 0,
    ch = string[stringPos];
    do
    {
    stringPos++;
    switch (ch)
    {
    case 'x', 'X':
    {
    num = 0;
    continue;
    }
    case '0' .. '9':
    {
    num = (num << 4) | (ch - '0');
    }
    case 'a' .. 'f':
    {
    num = (num << 4) | (ch - ('a' - 10));
    }
    case 'A' .. 'F':
    {
    num = (num << 4) | (ch - ('A' - 10));
    }
    default:
    {
    return -1;
    }
    }
    }
    while ((ch = string[stringPos]) > ' ' && ch != delim);
    setarg(paramPos, 0, num);
    }
    case 'c':
    {
    setarg(paramPos, 0, string[stringPos++]);
    }
    case 'f':
    {


    new changestr[16], changepos = 0, strpos = stringPos;
    while(changepos < 16 && string[strpos] && string[strpos] != delim)
    {
    changestr[changepos++] = string[strpos++];
    }
    changestr[changepos] = '\0';
    setarg(paramPos,0,_:floatstr(changestr));
    }
    case 'p':
    {
    delim = format[formatPos++];
    continue;
    }
    case '\'':
    {
    new
    end = formatPos - 1,
    ch;
    while ((ch = format[++end]) && ch != '\'') {}
    if (!ch)
    {
    return -1;
    }
    format[end] = '\0';
    if ((ch = strfind(string, format[formatPos], false, stringPos)) == -1)
    {
    if (format[end + 1])
    {
    return -1;
    }
    return 0;
    }
    format[end] = '\'';
    stringPos = ch + (end - formatPos);
    formatPos = end + 1;
    }
    case 'u':
    {
    new
    end = stringPos - 1,
    id = 0,
    bool:num = true,
    ch;
    while ((ch = string[++end]) && ch != delim)
    {
    if (num)
    {
    if ('0' <= ch <= '9')
    {
    id = (id * 10) + (ch - '0');
    }
    else
    {
    num = false;
    }
    }
    }
    if (num && IsPlayerConnected(id))
    {
    setarg(paramPos, 0, id);
    }
    else
    {
    #if !defined foreach
    #define foreach(%1,%2) for (new %2 = 0; %2 < MAX_PLAYERS; %2++) if (IsPlayerConnected(%2))
    #define __SSCANF_FOREACH__
    #endif
    string[end] = '\0';
    num = false;
    new
    name[MAX_PLAYER_NAME];
    id = end - stringPos;
    foreach (Player, playerid)
    {
    GetPlayerName(playerid, name, sizeof (name));
    if (!strcmp(name, string[stringPos], true, id))
    {
    setarg(paramPos, 0, playerid);
    num = true;
    break;
    }
    }
    if (!num)
    {
    setarg(paramPos, 0, INVALID_PLAYER_ID);
    }
    string[end] = ch;
    #if defined __SSCANF_FOREACH__
    #undef foreach
    #undef __SSCANF_FOREACH__
    #endif
    }
    stringPos = end;
    }
    case 's', 'z':
    {
    new
    i = 0,
    ch;
    if (format[formatPos])
    {
    while ((ch = string[stringPos++]) && ch != delim)
    {
    setarg(paramPos, i++, ch);
    }
    if (!i)
    {
    return -1;
    }
    }
    else
    {
    while ((ch = string[stringPos++]))
    {
    setarg(paramPos, i++, ch);
    }
    }
    stringPos--;
    setarg(paramPos, i, '\0');
    }
    default:
    {
    continue;
    }
    }
    while (string[stringPos] && string[stringPos] != delim && string[stringPos] > ' ')
    {
    stringPos++;
    }
    while (string[stringPos] && (string[stringPos] == delim || string[stringPos] <= ' '))
    {
    stringPos++;
    }
    paramPos++;
    }
    do
    {
    if ((delim = format[formatPos++]) > ' ')
    {
    if (delim == '\'')
    {
    while ((delim = format[formatPos++]) && delim != '\'') {}
    }
    else if (delim != 'z')
    {
    return delim;
    }
    }
    }
    while (delim > ' ');
    return 0;
    }


    Ich hoffe mir kann jemand helfen :)

    Hallo,
    wenn ich meinen Code so habe:

    {
    new modelid = GetVehicleModel(GetPlayerVehicleID(playerid));
    if(modelid == 400 || modelid == 401 || modelid == 402 || modelid == 404 || modelid == 405 || modelid == 409 || modelid == 410 || modelid == 411 || modelid == 412 || modelid == 413 || modelid == 414 || modelid == 415 || modelid == 416 || modelid == 418 || modelid == 419 || modelid == 420 || modelid == 421 || modelid == 422 || modelid == 423 || modelid == 424 || modelid == 426 || modelid == 429 || modelid == 434 || modelid == 436 )
    if(modelid == 438 || modelid == 439 || modelid == 440 || modelid == 442 || modelid == 445 || modelid == 451 || modelid == 456 || modelid == 457 || modelid == 458 || modelid == 459 || modelid == 466 || modelid == 467 || modelid == 470 || modelid == 474 || modelid == 475 || modelid == 477 || modelid == 478 || modelid == 479 || modelid == 480 || modelid == 482 || modelid == 483 || modelid == 485 || modelid == 489 || modelid == 490 )
    if(modelid == 491 || modelid == 492 || modelid == 494 || modelid == 495 || modelid == 496 || modelid == 498 || modelid == 499 || modelid == 500 || modelid == 502 || modelid == 503 || modelid == 504 || modelid == 505 || modelid == 506 || modelid == 507 || modelid == 508 || modelid == 516 || modelid == 517 || modelid == 518 || modelid == 524 || modelid == 525 || modelid == 526 || modelid == 527 || modelid == 528 || modelid == 529 )
    if(modelid == 533 || modelid == 534 || modelid == 535 || modelid == 536 || modelid == 540 || modelid == 541 || modelid == 542 || modelid == 543 || modelid == 545 || modelid == 546 || modelid == 547 || modelid == 549 || modelid == 550 || modelid == 551 || modelid == 552 || modelid == 554 || modelid == 555 || modelid == 558 || modelid == 559 || modelid == 560 || modelid == 561 || modelid == 562 || modelid == 565 || modelid == 566 )
    if(modelid == 567 || modelid == 568 || modelid == 574 || modelid == 575 || modelid == 576 || modelid == 579 || modelid == 580 || modelid == 582 || modelid == 585 || modelid == 587 || modelid == 588 || modelid == 589 || modelid == 596 || modelid == 597 || modelid == 598 || modelid == 599 || modelid == 600 || modelid == 601 || modelid == 602 || modelid == 603 || modelid == 604 || modelid == 605 || modelid == 609 )
    {
    if(GetPVarInt(playerid,"Führerschein")==0)
    {
    SendClientMessage(playerid, rot, "Du hast keinen Auto Führerschein!");
    RemovePlayerFromVehicle(playerid);
    }
    }
    Dann kommen nicht alle modelids in anspruch wie mache ich das so das er alle erkennt?


    Dein Fehler war bei <> ^^
    So stimmts:
    COMMAND:gravi(playerid,params[])
    {
    new gID,msgGrav[256];
    new eName[MAX_PLAYER_NAME+1];
    GetPlayerName(playerid, eName, sizeof(eName));
    if(sscanf(params,"i",gID))
    {
    SendClientMessage(playerid,COLOR_RED,"Benutze: /gravi 1-3");
    return 1;
    }
    else
    {
    if( gID > 1 || gID < 3 )
    {
    switch(gID)
    {
    case 1:
    {
    SetGravity(0.008);
    format(msgGrav,sizeof(msgGrav),"%s hat die Gravity auf 0.008 gesetzt.",eName);
    SendClientMessageToAll(orange, msgGrav);
    }
    case 2:
    {
    SetGravity(1.000);
    format(msgGrav,sizeof(msgGrav),"%s hat die Gravity auf 1.000 gesetzt.",eName);
    SendClientMessageToAll(orange, msgGrav);
    }
    case 3:
    {
    SetGravity(2.000);
    format(msgGrav,sizeof(msgGrav),"%s hat die Gravity auf 2.000 gesetzt.",eName);
    SendClientMessageToAll(orange, msgGrav);
    }
    }
    return 1;
    }
    else
    {
    SendClientMessage(playerid,COLOR_RED,"Zwischen 1-3");
    }
    }
    return 1;
    }


    Kommt wieder InGame Spiel Lädt und bildschirm flackert, ich habe /g 0.008 eingegeben

    Eifnach bei Sscanf f für Float ^^


    Ich habs jetzt so:
    COMMAND:g(playerid,params[])
    {
    new giveplayerid;
    if(!IsPlayerAnAdmin(playerid,1))return SendClientMessage(playerid,rot,"Du bist nicht Adminlevel 1!");
    if(!sscanf(params, "f", giveplayerid))
    {
    SetGravity(giveplayerid);
    new playername[128];
    new giveplayername[128];
    new string[128];
    GetPlayerName(playerid,playername,128);
    GetPlayerName(giveplayerid,giveplayername,128);
    format(string, sizeof(string),"Admin %s hat die Schwerkraft geändert!",playername);
    SendClientMessageToAll(rot,string);
    }
    else SendClientMessage(playerid,rot,"Tippe: /g [GravityID]");
    return 1;
    }


    Wenn ichs jetzt ausführe kommt InGame Flackern und Spiel Lädt ihr wisst schon was ich meine ^^

    Hey :)
    Musst halt noch anpassen!
    Hier:

    COMMAND:rc(playerid,params[])
    {
    for(new i = 0; i < MAX_VEHICLES; i ++)
    {
    if(IsVehicleUnused(i))
    {
    SetVehicleToRespawn(i);
    }
    }
    new playername[128];
    new string[128];
    GetPlayerName(playerid,playername,128);
    format(string, sizeof(string),"Der Spieler %s hat alle unbenutzten Fahrzeuge respawnt!",playername);
    SendClientMessageToAll(rot,string);
    }


    Noch unten irgendwo im Script:
    stock IsVehicleUnused(vehicleid)
    {
    for(new i=0; i<MAX_PLAYERS; i++)
    {
    if(IsPlayerInVehicle(i, vehicleid)) return 0;
    }
    return 1;
    }

    Hallo,
    ich habe einen Befehl zum ändern der Gravity erstellt, nun ist das Problem wenn ich zb: /g 0.008 eingebe geht das nicht, sondern es geht nur eine Ziffer wie /g 1 oder /g 2 oder /g 3 usw.
    Wie kann ich das ändern das ich zb 5 ziffern nach /g eingeben kann?


    Hier mein Code:
    COMMAND:g(playerid,params[])
    {
    new giveplayerid;
    if(!IsPlayerAnAdmin(playerid,1))return SendClientMessage(playerid,rot,"Du bist nicht Adminlevel 1!");
    if(!sscanf(params, "iu", giveplayerid))
    {
    SetGravity(giveplayerid);
    new playername[128];
    new giveplayername[128];
    new string[128];
    GetPlayerName(playerid,playername,128);
    GetPlayerName(giveplayerid,giveplayername,128);
    format(string, sizeof(string),"Admin %s hat die Schwerkraft geändert!",playername);
    SendClientMessageToAll(rot,string);
    }
    else SendClientMessage(playerid,rot,"/g [GravityID]");
    return 1;
    }