Jump to content
  • 0

Am o Problema Nu imi merg comenzile la server!


Question

Guest visanadrian
Posted

Am facut gm nou si daca bag o comanda imi da eroarea

<foloseste PASTEBIN>

13 answers to this question

Recommended Posts

  • Administrator
Posted

Ce GM e? Originalul.

logo.png

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

Guest visanadrian
Posted

am bagat includes da tot asa ii nu ma lasa

  • Administrator
Posted

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.

Guest visanadrian
Posted

si daca bag o comanda iar imi face tot asa

Posted

si daca bag o comanda iar imi face tot asa

Gamemodul lui Vyorel are doar o comanda. Apare ceva cand tastezi /help ?

Guest visanadrian
Posted

da am facut eu

sa apara

si apare

Guest visanadrian
Posted

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.

  • Administrator
Posted

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.

Posted

1. Toate posturile astea imense ar trebui sterse si sa va dau un pic de ban la fiecare  >:(

2. Ai uitat o }

-Toate tutorialele postate intra aici sau puneti-le direct [url=http://www.sa-mp.ro/forum/index

Guest
This topic is now closed to further replies.
×
×
  • 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.