Navigations System

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
  • Hi,
    ich möchte ein navigationssystem scripten. ich hab es schon so dass wenn man /navi macht einem angezeigt wird ob man in ls,lv oder in sf etwas finden möchte


    das hab ich mit:
    if(strcmp(cmd,"/navi",true)==0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pNavi] != 1)
    {
    SendClientMessage(playerid, COLOR_GREY, "You dont own a Navigation System !");
    return 1;
    }
    new x_navi[256];
    x_navi = strtok(cmdtext, idx);
    if(!strlen(x_navi)) {
    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /navi [District]");
    SendClientMessage(playerid, COLOR_GREY, "Districts: LS, SF, LV");
    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /navi [Businesses]");
    SendClientMessage(playerid, COLOR_GREY, "Businesses: BLS, BSF, BLV");
    return 1;
    }
    if(strcmp(x_navi,"ls",true) == 0)
    {
    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /navi LS [Place]");
    SendClientMessage(playerid, COLOR_GREY, "Places: LSPD(Police Department LS), BSN(Burgershot Nord), HHQ(Hitmen HQ), LBHQ(Los Banditos HQ)");
    SendClientMessage(playerid, COLOR_GREY, "Places: PBA(Paintball Arena), 8BA(8Ball Arena), LCNHQ(LCN HQ), FBI(F.B.I), ADAC(ADAC)");
    SendClientMessage(playerid, COLOR_GREY, "Places: Medic(Hospital LS), AHC(Alhambra Club), JC(Jobcenter)");
    SendClientMessage(playerid, COLOR_GREY, "Places: Bank(LS), GLS(Gun Shop LS), TLS(Taxi HQ), THQ(Trucker HQ LS), TLA(Truck load area LS)");
    SendClientMessage(playerid, COLOR_GREY, "Places: CC(Car Central LS), MS(Materials Store LS)");
    SendClientMessage(playerid, COLOR_GREY, "Places: CP(Caspoint), ACP(ADAC Cardepot), MDV(Madd Dogg´s Villa)");
    return 1;
    }
    if(strcmp(x_navi,"lspd",true) == 0)
    {
    SendClientMessage(playerid, COLOR_BAN, "Please Follow the marker on the map");
    SetPlayerCheckpoint(playerid, 1543.7554,-1675.7900,13.5571,265.6832);
    return 1;
    }



    und ich möchte jetzt dass wenn man /navi ls lspd machen muss damit einen die markierung vom lspd angezeigt wird und nich /navi lspd


    kann wer das machen oder mir sagen wie es geht??

  • ne mach ich jetzt vielen dank


    dann bekomm ich einen error
    D:\GEM Role Play Server\GEM Role Play\gamemodes\GEM.pwn(17787) : error 017: undefined symbol "ls"
    wo muss ich denn ls definieren?

  • kann das sein das du das so haben willst


    if(strcmp(cmd,"/navi",true)==0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pNavi] != 1)
    {
    SendClientMessage(playerid, COLOR_GREY, "You dont own a Navigation System !");
    return 1;
    }
    new x_navi[256];
    x_navi = strtok(cmdtext, idx);
    if(!strlen(x_navi)) {
    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /navi [District]");
    SendClientMessage(playerid, COLOR_GREY, "Districts: LS, SF, LV");
    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /navi [Businesses]");
    SendClientMessage(playerid, COLOR_GREY, "Businesses: BLS, BSF, BLV");
    return 1;
    }
    if(strcmp(x_navi,"ls",true) == 0)
    {
    new x_place[256];
    x_navi = strtok(cmdtext, idx);
    if(!strlen(x_navi))
    {
    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /navi LS [Place]");
    SendClientMessage(playerid, COLOR_GREY, "Places: LSPD(Police Department LS), BSN(Burgershot Nord), HHQ(Hitmen HQ), LBHQ(Los Banditos HQ)");
    SendClientMessage(playerid, COLOR_GREY, "Places: PBA(Paintball Arena), 8BA(8Ball Arena), LCNHQ(LCN HQ), FBI(F.B.I), ADAC(ADAC)");
    SendClientMessage(playerid, COLOR_GREY, "Places: Medic(Hospital LS), AHC(Alhambra Club), JC(Jobcenter)");
    SendClientMessage(playerid, COLOR_GREY, "Places: Bank(LS), GLS(Gun Shop LS), TLS(Taxi HQ), THQ(Trucker HQ LS), TLA(Truck load area LS)");
    SendClientMessage(playerid, COLOR_GREY, "Places: CC(Car Central LS), MS(Materials Store LS)");
    SendClientMessage(playerid, COLOR_GREY, "Places: CP(Caspoint), ACP(ADAC Cardepot), MDV(Madd Dogg´s Villa)");
    return 1;
    }
    if(strcmp(x_place,"lspd",true) == 0)
    {
    SendClientMessage(playerid, COLOR_BAN, "Please Follow the marker on the map");
    SetPlayerCheckpoint(playerid, 1543.7554,-1675.7900,13.5571,265.6832);
    return 1;
    }
    else if(strcmp(naviPlace,"bsn",true) == 0)
    {
    SendClientMessage(playerid, COLOR_BAN, "Please Follow the marker on the map");
    SetPlayerCheckpoint(playerid, 1203.2112,-923.1138,41.9851, 8.0);
    return 1;
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Unknown Place name or wrong destrict!");
    return 1;
    }
    }
    if(strcmp(x_navi,"ls",true) == 0)
    {
    new x_place[256];
    x_navi = strtok(cmdtext, idx);
    if(!strlen(x_navi))
    {
    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /navi SF [Place]");
    SendClientMessage(playerid, COLOR_GREY, "Places: SFPD (Police Department SF), MO (Mayor Office), DS (Driving school), CIH (City Hall)");
    SendClientMessage(playerid, COLOR_GREY, "Places: Medic (Hospital SF), CH (Church), TSF (Taxi HQ SF), MO (Motel SF), MD (Materials Deliver)");
    SendClientMessage(playerid, COLOR_GREY, "Places: Bank (SF), AHQ (Army HQ), WC (Wang Cars SF), BHF (Trainstation SF), GSF (Gun Shop SF)");
    SendClientMessage(playerid, COLOR_GREY, "Places: H0 - H85 (House 0-85), DTA (Dirt Track Arena), JPDC (Jizzy's P. D. Club), YHQ (Yakuza HQ)");
    return 1;
    }
    if(strcmp(naviPlace,"SFPD",true) == 0)
    {
    SendClientMessage(playerid, COLOR_BAN, "Please Follow the marker on the map");
    SetPlayerCheckpoint(playerid, -1605.7463,721.2352,10.0042, 8.0);
    return 1;
    }
    else if(strcmp(naviPlace,"DTA",true) == 0)
    {
    SendClientMessage(playerid, COLOR_BAN, "Please Follow the marker on the map");
    SetPlayerCheckpoint(playerid, -2130.3765,-444.1721,35.5344, 8.0);
    return 1;
    }
    }
    }
    }

  • mhh iwie funzt das nich ganz, wenn ich /navi ls lspd mache wird das gleiche auf der karte markiert wie bei /navi ls bsn und wenn ich z.b. /navi ls abcd wird auch etwas auf der karte markiert

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