Jump to content
  • 0

Am o Problema Nu imi merg comenzile la server!


Guest visanadrian

Question

13 answers to this question

Recommended Posts

Ti-am refacut eu GM-ul. Comenzile nu iti mergeau pentru ca nu le aveai.

#include <a_samp>

#define COLOR_YELLOW 0xFFFF00AA


main()
{
  print("\n----------------------------------");
  print(" Gamemod creat de Adi");
  print("----------------------------------\n");
}

public OnGameModeInit()
{
    SetGameModeText("Stunt,Drift+Fun");
    // Player Class's
    AddPlayerClass(280,-1938.2740,296.3862,47.6957,270.1425,0,0,24,300,-1,-1);
    return 1;
}


public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, -1937.9458,296.0244,47.7031);
    SetPlayerCameraPos(playerid, -1933.0667,296.8854,47.6957);
    SetPlayerCameraLookAt(playerid, -1945.0338,296.3080,47.7031);
    return 1;
}

public OnPlayerConnect(playerid)
{
    GameTextForPlayer(playerid,"Welcome on server for more type /help",6000,4);
    SendClientMessage(playerid, COLOR_LIGHTBLUE,"This is a new server by (Guns)Adi and NFSpeeD");
    SendClientMessage(playerid, COLOR_ULTRARED,"Don't use hack on server!!!");
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext,"/help",true)==0)
    {
SendClientMessage(playerid, COLOR_YELLOW, "Text");
return 1;
    }
    //alte comenzi in jos
    return 0;
}

logo.png

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

Link to comment
Share on other sites

Guest visanadrian

Am mai adaugat si uite:

public OnPlayerCommandText(playerid, cmdtext[])

{

    if(strcmp(cmdtext,"/help",true)==0)

    {

SendClientMessage(playerid, COLOR_YELLOW, "Players Commands(/pcmds)");

SendClientMessage(playerid, COLOR_YELLOW, "Admins Commands(/acmds)");

SendClientMessage(playerid, COLOR_YELLOW, "Fun Commands(/fcmds)");

return 1;

}

    if(strcmp(cmdtext,"/cmds",true)==0)

    {

SendClientMessage(playerid, COLOR_YELLOW, "/kill  ");

return 1;

}

if(strcmp(cmdtext,"/acmds",true)==0)

    {

SendClientMessage(playerid, COLOR_YELLOW, "/ban /kick /slap /burn /explode /god /godcar /setcash /lweaps /healall /armourall");

return 1;

}

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

{

SetPlayerPos(playerid,198.815155, 404.700195, 18.260481);

}

return 1;

return 0;

}

Daca dau compile:

C:\DOCUME~1\adi\Desktop\SERVER~1\GAMEMO~1\STUNT_~1.PWN(413) : error 017: undefined symbol "cmd"

C:\DOCUME~1\adi\Desktop\SERVER~1\GAMEMO~1\STUNT_~1.PWN(419) : warning 225: unreachable code

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

1 Error.

Link to comment
Share on other sites

stuntman==--" post="18708" timestamp="1252785772"]

pune new cmd[256]; la onplayercommandtext:


public OnPlayerCommandText(playerid, cmdtext[])
{
    new cmd[256];
    if(strcmp(cmdtext,"/help",true)==0)
    {
SendClientMessage(playerid, COLOR_YELLOW, "Players Commands(/pcmds)");
SendClientMessage(playerid, COLOR_YELLOW, "Admins Commands(/acmds)");
SendClientMessage(playerid, COLOR_YELLOW, "Fun Commands(/fcmds)");
return 1;
}
    if(strcmp(cmdtext,"/cmds",true)==0)
    {
SendClientMessage(playerid, COLOR_YELLOW, "/kill  ");
return 1;
}
if(strcmp(cmdtext,"/acmds",true)==0)
    {
SendClientMessage(playerid, COLOR_YELLOW, "/ban /kick /slap /burn /explode /god /godcar /setcash /lweaps /healall /armourall");
return 1;
}
if(strcmp(cmd, "/sumo", true) == 0)
{
SetPlayerPos(playerid,198.815155, 404.700195, 18.260481);
}
return 1;

return 0;
}
Nu. Uite aici:
    {
        if(strcmp(cmdtext,"/help",true)==0)
        {
            SendClientMessage(playerid, COLOR_YELLOW, "Players Commands(/pcmds)");
            SendClientMessage(playerid, COLOR_YELLOW, "Admins Commands(/acmds)");
            SendClientMessage(playerid, COLOR_YELLOW, "Fun Commands(/fcmds)");
            return 1;
        }
        if(strcmp(cmdtext,"/cmds",true)==0)
        {
            SendClientMessage(playerid, COLOR_YELLOW, "/kill  ");
            return 1;
        }
        if(strcmp(cmdtext,"/acmds",true)==0)
        {
            SendClientMessage(playerid, COLOR_YELLOW, "/ban /kick /slap /burn /explode /god /godcar /setcash /lweaps /healall /armourall");
            return 1;
        }
        if(strcmp(cmdtext, "/sumo",true) == 0)
        {
            SetPlayerPos(playerid, 198.815155, 404.700195, 18.260481);
        }
        return 1;
    }
    return 0;
}

logo.png

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

Link to comment
Share on other sites

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

    • By ItzGabi2k
      Nu imi merg comenzile:
      /shopinfo, /normalshop, /vipcars, extrapackshop
      YCMD:shopinfo(playerid, params[], help) { ShopType[ playerid ] = 0; ShowShop( playerid ); return true; }
      YCMD:normalshop(playerid, params[], help) { ShopType[ playerid ] = 1; ShowShop( playerid ); return true; }
      YCMD:vipcars(playerid, params[], help) { ShopType[ playerid ] = 2; ShowShop( playerid ); return true; }
      YCMD:extrapackshop(playerid, params[], help) { ShopType[ playerid ] = 3; ShowShop( playerid ); return true; }
      YCMD:shop(playerid, params[], help) {
          SCM(playerid, COLOR_PURPLE, ">> {FFFFFF}Comanda de /shop a fost schimbata:");
          SCM(playerid, COLOR_PURPLE, ">> {FFFFFF}Shop Info:     /shopinfo");
          SCM(playerid, COLOR_PURPLE, ">> {FFFFFF}Normal Shop: /normalshop");
          SCM(playerid, COLOR_PURPLE, ">> {FFFFFF}V.I.P Cars:  /vipcars");
          SCM(playerid, COLOR_PURPLE, ">> {FFFFFF}Extra Packs: /extrapackshop");
          return true;
      }
    • By FlobertRO
      Buna , am si eu o problema . Mi-se restarteaza serverulul random . In server_log am gasit asta : 
      Stie cineva ce pot face  Va rog ❤️ . Multumesc frumos
       
       
      [23:17:26] [join] rezana has joined the server (1:---------------------) [23:17:26] [debug] Run time error 4: "Array index out of bounds" [23:17:26] [debug] Accessing element at index 1 past array upper bound 0 [23:17:26] [debug] AMX backtrace: [23:17:26] [debug] #0 00200b24 in ?? (... <1 argument>) at GM.pwn:8108 [23:17:26] [debug] #1 000aef80 in public MP_OPC (playerid=1) at C:\Users\xda\Desktop\gamemode-impact\gamemode-rpg-impact\pawno\include\YSI\y_hooks/impl.inc:633 [23:17:26] [debug] #2 native CallLocalFunction () from samp03svr [23:17:26] [debug] #3 0000c77c in public SSCANF_OnPlayerConnect (playerid=1) at C:\Users\xda\Desktop\gamemode-impact\gamemode-rpg-impact\pawno\include\mSelection.inc:432 [23:17:26] [debug] #4 00003210 in public Itter_OnPlayerConnect (playerid=1) at C:\Users\xda\Desktop\gamemode-impact\gamemode-rpg-impact\pawno\include\sscanf2.inc:236 [23:17:26] [debug] #5 00001684 in public OnPlayerConnect (playerid=1) at C:\Users\Florin\Dxda\gamemode-impact\gamemode-rpg-impact\pawno\include\YSI\y_iterate.inc:646
    • By .Zedd
      Salut, am luat un server de pe ultra host, am urcat game mode ul corect, un game mode editat de david tuts, pornesc serverul si cand dau login se opreste serverul.. care ar putea fi problema? Multumesc anticipat.
    • By Raul112233
      Salut,am si eu o problema!!
      Cand ma fac duty in lspd si pun tinta imi da server closed connection!!
      De ce??
       

    • By GamerulFOX
      Salut ! Nu merge o verificare ! Daca acel player, are acei bani, ii ofera mesajul "Acel jucator nu are suficienti lei pentru a platii amenda" ! Ce am facut gresit ?


      CMD:amenda(playerid, params[])
      {
          new id, amenda, string[256], Float:x, Float:y, Float:z, name[MAX_PLAYER_NAME];
          GetPlayerName(playerid, name, sizeof(name));
          GetPlayerPos(id, x, y, z);
          if(fPolitie[playerid] == 0) return SendClientMessage(playerid, RED, "Nu esti din factiunea 'Politie' !");
          if(sscanf(params, "ud", id, amenda)) return SendClientMessage(playerid, 0xff0000FF, "/amenda <playerid/name> <amount>");
          if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SCM(playerid, 0xff0000FF, "Acel jucator nu este conectat!");
          if(!IsPlayerInRangeOfPoint(playerid, 2.0, x, y ,z)) return SendClientMessage(playerid, 0xff0000FF, "Nu esti langa acel player!");
          if(GetPlayerMoney(id) != amenda) return SendClientMessage(playerid, 0xff0000FF, "Acel jucator nu are suficienti lei pentru a platii amenda!");
          GivePlayerMoney(id, -amenda);
          format(string, sizeof(string), "Ai fost amendat de politistul %s!", name);
          SendClientMessage(id, 0x00aeffFF, string);
          return 1;
      }
  • 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.