Beiträge von Young

    Was muss ich tun damit ein player von einem server für mich donaten kann? Alles über PayPal... Also das es dann auf meinem bankkonto eingeht.. .thx :)

    Habbe ein lotto-system gescriptet, doch beim erhöhen des jackpots scheiterts...


    Zitat

    : warning 213: tag mismatch



    new jackpot, string[164];
    format(string, sizeof(string),"Sadly we have no winner. The winner number was: {FFFFFF}%i.{007DFF} Good luck for the next time.", number);
    SendClientMessageToAll(COLOR_LOTTERY,string);
    jackpot = dini_Int("/Lottery/lottery.txt", "Jackpot");
    new newjackpot = (jackpot * 1.5); //<-- errorline
    dini_IntSet("/Lottery/lottery.txt", "Jackpot", newjackpot);
    format(string, sizeof(string),"The new jackpot is: %i.", newjackpot);
    SendClientMessageToAll(COLOR_LOTTERY,string);
    SetPVarInt(i,"LotteryNumber",0);


    Wie fixe ich das? :P

    Hab gerade mein erstes menü erstellt. Ich bekomm keine Errors/Warnings aber wenn ich etwas auswähle geschieht nix...


    Ganz oben:
    new buy[6];
    new Menu:shop;


    OnGameModeInit:
    buy[0]=CreatePickup(1212, 1, -27.6221,-89.8386,1003.5469, -1); //SBF:CBE
    buy[1]=CreatePickup(1212, 1, -28.6973,-185.1080,1003.5469, -1); //FYB:PS
    buy[2]=CreatePickup(1212, 1, 1.9158,-28.7629,1003.5494, -1); //BSS:Enter
    buy[3]=CreatePickup(1212, 1, -21.4040,-138.5021,1003.5469, -1); //BSN:Enter
    buy[4]=CreatePickup(1212, 1, -23.0022,-55.4412,1003.5469, -1); //Donuts
    buy[5]=CreatePickup(1212, 1, -30.4778,-28.7735,1003.5573, -1); //TDF:CBE

    shop = CreateMenu("24/7", 2, 200.0, 100.0, 150.0, 150.0);
    AddMenuItem(shop, 0, "Beer");
    AddMenuItem(shop, 0, "Wine");
    AddMenuItem(shop, 0, "Sprunk");
    AddMenuItem(shop, 0, "40z");
    AddMenuItem(shop, 0, "Ciga");
    AddMenuItem(shop, 0, "Spraycan");
    AddMenuItem(shop, 0, "Phone");
    AddMenuItem(shop, 0, "Lottery ticket");
    AddMenuItem(shop, 0, "Bat");
    AddMenuItem(shop, 0, "Exit");


    CMD:
    CMD:store(playerid,params[])
    {
    if(IsPlayerInRangeOfPoint(playerid,3,-30.4778,-28.7735,1003.5573))
    {
    ShowMenuForPlayer(shop, playerid);
    TogglePlayerControllable(playerid,0);
    }
    if(IsPlayerInRangeOfPoint(playerid,3,-23.0022,-55.4412,1003.5469))
    {
    ShowMenuForPlayer(shop, playerid);
    TogglePlayerControllable(playerid,0);
    }
    if(IsPlayerInRangeOfPoint(playerid,3,-21.4040,-138.5021,1003.5469))
    {
    ShowMenuForPlayer(shop, playerid);
    TogglePlayerControllable(playerid,0);
    }
    if(IsPlayerInRangeOfPoint(playerid,3,1.9158,-28.7629,1003.5494))
    {
    ShowMenuForPlayer(shop, playerid);
    TogglePlayerControllable(playerid,0);
    }
    if(IsPlayerInRangeOfPoint(playerid,3,-28.6973,-185.1080,1003.5469))
    {
    ShowMenuForPlayer(shop, playerid);
    TogglePlayerControllable(playerid,0);
    }
    if(IsPlayerInRangeOfPoint(playerid,3,-27.6221,-89.8386,1003.5469))
    {
    ShowMenuForPlayer(shop, playerid);
    TogglePlayerControllable(playerid,0);
    }
    return 1;
    }


    Rest:
    public OnPlayerSelectedMenuRow(playerid, row)
    {
    if(GetPlayerMenu(playerid) == shop)
    {
    switch(row)
    {
    case 0:
    {
    GivePlayerMoney(playerid,-2);
    SetPVarInt(playerid,"Beer",1);
    TogglePlayerControllable(playerid,1);
    SendClientMessage(playerid,COLOR_CMD,"You have bought a beer for $2.");
    }
    case 1:
    {
    GivePlayerMoney(playerid,-2);
    SetPVarInt(playerid,"Sprunk",1);
    TogglePlayerControllable(playerid,1);
    SendClientMessage(playerid,COLOR_CMD,"You have bought a beer for $2.");
    }
    case 2:
    {
    GivePlayerMoney(playerid,-3);
    SetPVarInt(playerid,"40z",1);
    TogglePlayerControllable(playerid,1);
    SendClientMessage(playerid,COLOR_CMD,"You have bought a beer for $2.");
    }
    case 3:
    {
    GivePlayerMoney(playerid,-5);
    SetPVarInt(playerid,"Ciga",1);
    TogglePlayerControllable(playerid,1);
    SendClientMessage(playerid,COLOR_CMD,"You have bought a beer for $2.");
    }
    case 4:
    {
    GivePlayerMoney(playerid,-10);
    SetPVarInt(playerid,"Spraycan",1);
    TogglePlayerControllable(playerid,1);
    SendClientMessage(playerid,COLOR_CMD,"You have bought a beer for $2.");
    }
    case 5:
    {
    GivePlayerMoney(playerid,-145);
    SetPVarInt(playerid,"Phone",1);
    TogglePlayerControllable(playerid,1);
    SendClientMessage(playerid,COLOR_CMD,"You have bought a beer for $2.");
    }
    case 6:
    {
    GivePlayerMoney(playerid,-100);
    SetPVarInt(playerid,"Lottery Ticket",1);
    TogglePlayerControllable(playerid,1);
    SendClientMessage(playerid,COLOR_CMD,"You have bought a beer for $2.");
    }
    case 7:
    {
    GivePlayerMoney(playerid,-65);
    GivePlayerWeapon(playerid,5,1);
    TogglePlayerControllable(playerid,1);
    SendClientMessage(playerid,COLOR_CMD,"You have bought a beer for $2.");
    }
    case 8: TogglePlayerControllable(playerid,1);
    }
    }
    return 1;
    }


    public OnPlayerExitedMenu(playerid)
    {
    TogglePlayerControllable(playerid,1);
    SendClientMessage(playerid,COLOR_CMD,"Cashier: Goodbye! Have a nice day.");
    return 1;
    }


    Wäre dankbar wenn mir jemand helfen könnte :thumbup:

    Bei mir kommt da ein fehler:



    if(newkeys & LIGHT_KEY)
    {
    if(IsPlayerInAnyVehicle(playerid))
    {
    new engine,lights,alarm,doors,bonnet,boot,objective;
    new vid = GetPlayerVehicleID(playerid);
    if(licht[vid] == false)
    {
    GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,VEHICLE_PARAMS_ON,alarm,doors,bonnet,boot,objective);
    licht[vid] = true;
    }
    else if(licht[vid] == true)
    {
    GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);
    licht[vid] = false;
    }
    }
    }
    else if(PRESSED(START_KEY)) // <-- ERROR Zeile
    {
    if(IsPlayerInAnyVehicle(playerid))
    {
    new vid = GetPlayerVehicleID(playerid);
    if(motor[vid] == false)
    {
    SendClientMessage(playerid,COLOR_CMD,"The engine is starting...");
    KillTimer(motortimer[vid]);
    motortimer[vid] = SetTimerEx("StartEngine",START_TIME,0,"dd",playerid,vid);
    }
    else
    {
    KillTimer(motortimer[vid]);
    motortimer[vid] = SetTimerEx("StopEngine",STOP_TIME,0,"dd",playerid,GetPlayerVehicleID(playerid));
    }
    }
    }
    else if(RELEASED(START_KEY))
    {
    if(IsPlayerInAnyVehicle(playerid))
    {
    new vid = GetPlayerVehicleID(playerid);
    if(motor[vid] == false)SendClientMessage(playerid,COLOR_CMD,"{FFFFFF}You have to hold the key{FF0000} pressed {FFFFFF}to start the engine!");
    KillTimer(motortimer[vid]);
    }
    }
    return 1;


    Könntest du dieses SendPlayerMessageToPlayer an meinem Beispiel anwenden? Wäre seeehr nett :))

    naja die idee war schon richtig nur das dann der farbcode da steht aber nicht die farbe... d.h. es wird warscheinlich ein fehlerhafter Farbcode wiedergegeben:


    SO siehts dann aus (Beispiel):
    {-5FA00X3XE}Peter says: Hallo!

    Wie der titel sagt, würde dies funktionieren?


    CMD:ipban(playerid,params[])
    {
    new banid, reason[24], msg[128], name[24], banname[24], ip[18];
    if(!sscanf(params,"us", banid, reason))
    {
    if(!isPlayerAnAdmin(playerid,5))return SendClientMessage(playerid,COLOR_RED,"You are no admin or your adminlevel is too low.");
    if(!IsPlayerConnected(banid)) return SendClientMessage(playerid, COLOR_RED, "ERROR: Invalid ID");
    new CheckAdminRank = GetPVarInt(banid,"Adminlevel");
    if(GetPVarInt(playerid,"Adminlevel") < CheckAdminRank) return SendClientMessage(playerid,COLOR_RED,"Have some respect! This player has a higher rank then you.");
    GetPlayerIp(banid, ip, sizeof(ip));
    format(msg,sizeof(msg),"banip %i",ip);
    SendRconCommand(msg);
    GetPlayerName(playerid, name, sizeof(name));
    GetPlayerName(banid, banname, sizeof(banname));
    format(msg,sizeof(msg),"AdminSystem: %s has been IP-banned by %s [Reason: %s (Appeal: www.xxxxxxx.com.com)]",banname,name,reason);
    SendClientMessageToAll(COLOR_RED,msg);

    Kick(banid);
    }
    else
    {
    SendClientMessage(playerid, COLOR_CMD, "CORRECT USAGE: /ipban <id> <reason>");
    }
    return 1;
    }


    Der spieler soll per IP gebannt werden (über rcon).

    Ich habe folgenden Code für meinen Chatradius:


    public OnPlayerText(playerid, text[])
    {
    new sendername[32],string[128];
    GetPlayerName(playerid,sendername,sizeof(sendername));
    format(string, sizeof(string),"%s says: %s",sendername,text);
    SendMeChat(string,playerid);
    return 0;


    }


    stock Float:GetDistanceBetweenPlayers(p1,p2){
    new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
    if(!IsPlayerConnected(p1) || !IsPlayerConnected(p2)){
    return -1.00;
    }
    GetPlayerPos(p1,x1,y1,z1);
    GetPlayerPos(p2,x2,y2,z2);
    return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
    }


    stock SendMeChat(string[],playerid)
    {
    for(new i = 0;i < MAX_PLAYERS; i++)
    {
    if(GetDistanceBetweenPlayers(i,playerid) <= 25)
    {
    SendClientMessage(i,COLOR_WHITE,string);
    }
    }
    return 1;
    }


    Alles funktioniert nur der Name des Spielers wird trotz SetPlayerColor nicht bunt angezeigt. Bei den Scores is der Name auf jedenfall bunt...


    Frage: Was muss ich tun damit der Spielername bunt angezeigt wird?


    Danke im Vorraus :thumbup: