Jump to content
  • 0

Ajutor numi iese o comanda :(


onix09

Question

am incercat sa fac si eu o comanda cu FastPWN CmD un program helper dar...nu imi iesie tot da cateva erori

Daca se poate sa imi faca si mei cineva un FS in care sa fie comanda de teleportare

if(strcmp(cmd, "/jump", true) == 0)

{

SetPlayerPos(playerid,1546, -1353, 330);

GivePlayerWeapon(playerid,46, 1);

SendClientMessage(playerid,,"Sari pe rampa!");

return 1;

}

Ajutatima!!!! :(

9zZndmN.png
Link to comment
Share on other sites

7 answers to this question

Recommended Posts

if(strcmp(cmd, "/jump", true) == 0)
{
    SetPlayerPos(playerid,X, Y, Z); //coordonatele
    GivePlayerWeapon(playerid,46, 1);
    SendClientMessage(playerid, COLOR_RED,  "Sari pe rampa!");
    return 1;
}
Daca nu stii sa pui coordonatele, du-te pe server in locul unde vrei sa se teleporteze si scrie /save apoi intri in My Documents\GTA San Andreas User Files\SAMP si vei gasi un fisier savedpositions.txt In el o sa ai o linie de genul:
AddStaticVehicle(ID, X, Y, Z, etc);
sau
AddPlayerClass(ID, X, Y, Z, etc);

Tu iei din linia aia doar X, Y si Z.

logo.png

ATENTIE!!! Nu imi trimiteti mesaje private care au legatura cu scriptingul. NU mai scriptez.

Link to comment
Share on other sites

Gata am rezolvat signur...era porblemla send client message nu era scris bine...am rezolvat singur dar va multumesc oricum...nici nu ma uitatm la ce zic erorile si desta nu stiam ;))

omg, si daca nu te uitati de ce ai mai postat aici?:)))) intai uitate, vezi ce eroare da si apoi postezi aici daca nu stii s-o repari

Lil_Shean

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Similar Content

    • By xVincenzo
      salut, am si eu nevoie de acest doua comenzi va rog!
    • By SakonX
      Am incercat sa fac urmatoarea comanda care sa scrie ceva despre id-ul x, dar mie nu imi merge, asa imi arata cand dau comanda: https://imgur.com/a/IuAztyb si imi pune cu CapsLock la fiecare comanda din script chiar daca nu am CapsLockul pornit.
       
      Script:
      :cmd_15
      SAMP.IsCommandTyped([email protected])
      if
      0AD4: [email protected] = scan_string [email protected] format "%d" [email protected]
      then
       0B36: samp [email protected] = get_player_nickname [email protected]
       0AF9: samp say_msg "Ce faci %s?" [email protected]
      else
       {FFFFFF}chatmsg "{FFCC66}Syntax: [{FFFFFF}id{FFCC66}]"
      end
      SAMP.CmdRet()
    • By TheGodfather
      Salut, vreau sa fac o comanda /lastchat cu care sa pot sa vad ultimele x mesaje ale unui jucator. Am incercat asa dar nu imi afiseaza nimic.
      YCMD:lastchat(playerid, params[], help) {
          if(aspam[playerid] > 0) return SCMEx(playerid, COLOR_LIGHTRED, "[Command Anti-Spam] {FFFFFF}Wait %d seconds.", aspam[playerid]);
          if(PlayerInfo[playerid][pAdmin] < 😎 return SCM(playerid,COLOR_WHITE,AdminOnly);
          new giveplayerid[25],id,cont,name[30];
          if(sscanf(params, "s[25]d", giveplayerid, id)) return SCM(playerid,COLOR_GREY, "Syntax: {FFFFFF}/lastchat <name> <number of messages>");
          cont = MySQLCheckAccount(giveplayerid);
          if(cont == 0) return SCM(playerid,COLOR_ERROR,"Error:{FFFFFF} This account was not found in the database!");
          GetPlayerName(playerid, name, sizeof name);
          //
          new szQuery[256], string[180], MemberString[1024], szResult[180], text[180],TitleString[180];
          format(szQuery, sizeof(szQuery), "SELECT * FROM `logs` WHERE `Name`='%s' ORDER BY `ID` DESC LIMIT %d", GetName(playerid), id);
          new Cache: result = mysql_query(SQL, szQuery);
          for(new i, j = cache_num_rows(); i != j; ++i)
          {
              cache_get_field_content(i, "player", szResult); format(name, 256, szResult);
              cache_get_field_content(i, "Text", szResult);  format(text, 256, szResult);
              format(string, sizeof(string), "%s", text);strcat(MemberString, string, sizeof(MemberString));
          }
          cache_delete(result);
          format(TitleString, sizeof(TitleString), "Last %d messages from player %s.", id, name);
          ShowPlayerDialog(playerid, DIALOG_LASTCHAT, DIALOG_STYLE_TABLIST_HEADERS, TitleString, MemberString, "Ok", "Exit");
          //
          return 1;
      }
      case DIALOG_LASTCHAT: {
                  if(!response) return true;
              }
    • By TheGodfather
      Salut, am aceasta comanda /servername dar nu trimite mesajul acela tuturor playerilor, numele la server se schimba corect.
      if(strcmp(cmdtext, "/servername", true) == 0)
          {
              if(PlayerInfo[playerid][pAdmin] < 😎 return SCM(playerid, COLOR_WHITE, AdminOnly);
              new newstring[512], idx, tmp[512];
              tmp = strtok(cmdtext, idx);
              if(strlen(cmdtext[12]) < 1) return SCM(playerid, COLOR_GREY,"Syntax: /servername <nume server>");
              format(tmp, sizeof(tmp), "hostname %s", cmdtext[12]);
              SendRconCommand(tmp);
              format(newstring, sizeof(newstring), "[SERVER] {FFFFFF}Fondator {DA0000}%s {FFFFFF}a schimbat numele server-ului in {FFFFFF}'%s'.", GetName(playerid), cmdtext[12]);
              SCMTA(COLOR_LIGHTBLUE, newstring);
              return 1;
          }
    • By xLinix96
      Salut, asta este prima mea postare pe aceasta comunitate, astazi vreau sa va arat cum sa creati o comanda /flymode, stiu ca este o comanda foarte simpla, dar sunt unii incepatori care nu stiu sa o faca.
       
      Pentru inceput aveti nevoie de un include.
      #include <fly>
      Il gasiti aici: http://www.solidfiles.com/d/289d6c8fdf/
       
       
      Acum vom face comanda:
      CMD:fly(playerid, params[])
      {
          if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Trebuie sa te comenctezi."); // aici verificam daca esti conectat
          if(IsPlayerConnected(playerid)) 
          {
              if(PlayerInfo[playerid][pAdmin] >= 1) // aici punem nivelul de admin necesar pentru a folosii comanda.
              {
                  new sendername[30],string[256];
                  if(flymode[playerid] == 0)
                  {
                      GetPlayerName(playerid, sendername, sizeof(sendername)); // aici obtinem numele adminuui.
                      togfind[playerid] = 0;
                      flymode[playerid] = 1;
                      format(string,sizeof(string),"{DFF230}%s este acum in modul fly-mode.", sendername); 
                      ABroadCast(COLOR_ORANGE,string,1);
                      InitFly(playerid);
                      StartFly(playerid);
                      SetPlayerHealthEx(playerid, 10000000); // aici setam hp-ul.
                  }
                  else
                  {
                      GetPlayerName(playerid, sendername, sizeof(sendername)); // iar de aici oprim fly-ul.
                      togfind[playerid] = 1;
                      flymode[playerid] = 0;
                      format(string,sizeof(string),"{F89AD6}Ai oprit fly-mode-ul", sendername);
                      SCM(playerid, COLOR_GREEN, string);
                      StopFly(playerid);
                      SetPlayerHealthEx(playerid, 100); // 
                  }
              }
              else return SendClientMessage(playerid, COLOR_ERROR, AdminOnly);
          }
          return 1;
      }
       
      Sper ca v-am ajutat, nu este cine site ce sistem.
       
       
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.