Alright so i wanna make a /gedit command without ZCMD
#1

Got eny Ideas how to make cmd /gedit without going to be a ZCMD? BTW /gedit is a gate editor like in roleplay server i wanna make one like NG:RP but without ZCMD.
Reply
#2

Quote:
Originally Posted by Wizz123
Посмотреть сообщение
Got eny Ideas how to make cmd /gedit without going to be a ZCMD? BTW /gedit is a gate editor like in roleplay server i wanna make one like NG:RP but without ZCMD.
Describe what /gedit is in depth. Your describtion is somehow not ... usefull.
Reply
#3

OMG IF YOU DONT KNOW HOW TO FUCKING DO IT STOP COMMENTING I SAID /GEDIT IS A GATE EDITOR LIKE IN NGRP...
Reply
#4

1, Why do you expect that people know NG:RP?
2, What is a gate editor?
3, https://sampforum.blast.hk/showthread.php?tid=45235
Reply
#5

Okay its like this but i want it without ZCMD
pawn Код:
/* CMD:gedit(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pShopTech] == 1)
    {
        new x_job[128], gateid, Float:ofloat, string[128];

        if(sscanf(params, "s[128]if", x_job, gateid, ofloat))
        {
            SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /gedit [name] [gateid] [value]");
            SendClientMessageEx(playerid, COLOR_GREY, "Available names: HID, Model, VW, Int, PosX(M), PosY(M), PosZ(M), RotX(M), RotZ(M)");
            SendClientMessageEx(playerid, COLOR_GREY, "Available names: tome(m), range, speed, status, gate, renderhq");
            return 1;
        }

        if(strcmp(x_job, "hid", true) == 0)
        {
            new value = floatround(ofloat, floatround_round);
            if(value > MAX_HOUSES) return SendClientMessageEx(playerid, COLOR_WHITE, "* Invalid House ID!");
            GateInfo[gateid][gHID] = value;
            format(string, sizeof(string), "Gate HID assigned to %d", GateInfo[gateid][gHID]);
            SendClientMessageEx(playerid, COLOR_WHITE, string);
            SaveGates();

            format(string, sizeof(string), "%s has edited GateID %d's House ID to %d.", GetPlayerNameEx(playerid), gateid, value);
            Log("logs/gedit.log", string);
        }
        else if(strcmp(x_job, "model", true) == 0)
        {
            new value = floatround(ofloat, floatround_round);

            if(value == 0)
            {
                GateInfo[gateid][gPosX] = 0.0;
                GateInfo[gateid][gPosY] = 0.0;
                GateInfo[gateid][gPosZ] = 0.0;
                GateInfo[gateid][gRotX] = 0.0;
                GateInfo[gateid][gRotY] = 0.0;
                GateInfo[gateid][gRotZ] = 0.0;
                GateInfo[gateid][gPosXM] = 0.0;
                GateInfo[gateid][gPosYM] = 0.0;
                GateInfo[gateid][gPosZM] = 0.0;
                GateInfo[gateid][gRotXM] = 0.0;
                GateInfo[gateid][gRotYM] = 0.0;
                GateInfo[gateid][gRotZM] = 0.0;
                GateInfo[gateid][gVW] = 0;
                GateInfo[gateid][gInt] = 0;
            }

            GateInfo[gateid][gModel] = value;
            format(string, sizeof(string), "Gate Model assigned to %d", GateInfo[gateid][gModel]);
            if(IsValidDynamicObject(GateInfo[gateid][gGATE])) DestroyDynamicObject(GateInfo[gateid][gGATE]);
            CreateGate(gateid);
            SendClientMessageEx(playerid, COLOR_WHITE, string);
            SaveGates();

            format(string, sizeof(string), "%s has edited GateID %d's Model to %d.", GetPlayerNameEx(playerid), gateid, value);
            Log("logs/gedit.log", string);
        }
        else if(strcmp(x_job, "vw", true) == 0)
        {
            new value = floatround(ofloat, floatround_round);
            GateInfo[gateid][gVW] = value;
            format(string, sizeof(string), "Gate VW assigned to %d", GateInfo[gateid][gVW]);
            if(IsValidDynamicObject(GateInfo[gateid][gGATE])) DestroyDynamicObject(GateInfo[gateid][gGATE]);
            CreateGate(gateid);
            SendClientMessageEx(playerid, COLOR_WHITE, string);
            SaveGates();

            format(string, sizeof(string), "%s has edited GateID %d's VW to %d.", GetPlayerNameEx(playerid), gateid, value);
            Log("logs/gedit.log", string);
        }
        else if(strcmp(x_job, "int", true) == 0)
        {
            new value = floatround(ofloat, floatround_round);
            GateInfo[gateid][gInt] = value;
            format(string, sizeof(string), "Gate Int assigned to %d", GateInfo[gateid][gInt]);
            if(IsValidDynamicObject(GateInfo[gateid][gGATE])) DestroyDynamicObject(GateInfo[gateid][gGATE]);
            CreateGate(gateid);
            SendClientMessageEx(playerid, COLOR_WHITE, string);
            SaveGates();

            format(string, sizeof(string), "%s has edited GateID %d's InteriorID to %d.", GetPlayerNameEx(playerid), gateid, value);
            Log("logs/gedit.log", string);
        }
        else if(strcmp(x_job, "range", true) == 0)
        {
            new value = floatround(ofloat, floatround_round);
            GateInfo[gateid][gRange] = value;
            format(string, sizeof(string), "Gate Range assigned to %d", GateInfo[gateid][gRange]);
            SendClientMessageEx(playerid, COLOR_WHITE, string);
            SaveGates();

            format(string, sizeof(string), "%s has edited GateID %d's Range to %d.", GetPlayerNameEx(playerid), gateid, value);
            Log("logs/gedit.log", string);
        }
        else if(strcmp(x_job, "speed", true) == 0)
        {
            new value = floatround(ofloat, floatround_round);
            GateInfo[gateid][gSpeed] = value;
            format(string, sizeof(string), "Gate Speed assigned to %d", GateInfo[gateid][gSpeed]);
            SendClientMessageEx(playerid, COLOR_WHITE, string);
            SaveGates();

            format(string, sizeof(string), "%s has edited GateID %d's Speed to %d.", GetPlayerNameEx(playerid), gateid, value);
            Log("logs/gedit.log", string);
        }
        else if(strcmp(x_job, "posx", true) == 0)
        {
            new Float:value = ofloat;
            GateInfo[gateid][gPosX] = value;
            format(string, sizeof(string), "Gate PosX assigned to %f", GateInfo[gateid][gPosX]);
            SetDynamicObjectPos(GateInfo[gateid][gGATE], GateInfo[gateid][gPosX], GateInfo[gateid][gPosY], GateInfo[gateid][gPosZ]);
            SendClientMessageEx(playerid, COLOR_WHITE, string);
            SaveGates();
        }
        else if(strcmp(x_job, "posy", true) == 0)
        {
            new Float:value = ofloat;
            GateInfo[gateid][gPosY] = value;
            format(string, sizeof(string), "Gate PosY assigned to %f", GateInfo[gateid][gPosY]);
            SetDynamicObjectPos(GateInfo[gateid][gGATE], GateInfo[gateid][gPosX], GateInfo[gateid][gPosY], GateInfo[gateid][gPosZ]);
            SendClientMessageEx(playerid, COLOR_WHITE, string);
            SaveGates();
        }
        else if(strcmp(x_job, "posz", true) == 0)
        {
            new Float:value = ofloat;
            GateInfo[gateid][gPosZ] = value;
            format(string, sizeof(string), "Gate PosZ assigned to %f", GateInfo[gateid][gPosZ]);
            SetDynamicObjectPos(GateInfo[gateid][gGATE], GateInfo[gateid][gPosX], GateInfo[gateid][gPosY], GateInfo[gateid][gPosZ]);
            SendClientMessageEx(playerid, COLOR_WHITE, string);
            SaveGates();
        }
        else if(strcmp(x_job, "posxm", true) == 0)
        {
            new Float:value = ofloat;
            GateInfo[gateid][gPosXM] = value;
            format(string, sizeof(string), "Gate PosXM assigned to %f", GateInfo[gateid][gPosXM]);
            SendClientMessageEx(playerid, COLOR_WHITE, string);
            SaveGates();
        }
        else if(strcmp(x_job, "posym", true) == 0)
        {
            new Float:value = ofloat;
            GateInfo[gateid][gPosYM] = value;
            format(string, sizeof(string), "Gate PosYM assigned to %f", GateInfo[gateid][gPosYM]);
            SendClientMessageEx(playerid, COLOR_WHITE, string);
            SaveGates();
        }
        else if(strcmp(x_job, "poszm", true) == 0)
        {
            new Float:value = ofloat;
            GateInfo[gateid][gPosZM] = value;
            format(string, sizeof(string), "Gate PosZM assigned to %f", GateInfo[gateid][gPosZM]);
            SendClientMessageEx(playerid, COLOR_WHITE, string);
            SaveGates();
        }
        else if(strcmp(x_job, "rotx", true) == 0)
        {
            new Float:value = ofloat;
            GateInfo[gateid][gRotX] = value;
            format(string, sizeof(string), "Gate RotX assigned to %f", GateInfo[gateid][gRotX]);
            SetDynamicObjectRot(GateInfo[gateid][gGATE], GateInfo[gateid][gRotX],GateInfo[gateid][gRotY],GateInfo[gateid][gRotZ]);
            SendClientMessageEx(playerid, COLOR_WHITE, string);
            SaveGates();
        }
        else if(strcmp(x_job, "roty", true) == 0)
        {
            new Float:value = ofloat;
            GateInfo[gateid][gRotY] = value;
            format(string, sizeof(string), "Gate RotY assigned to %f", GateInfo[gateid][gRotY]);
            SetDynamicObjectRot(GateInfo[gateid][gGATE], GateInfo[gateid][gRotX],GateInfo[gateid][gRotY],GateInfo[gateid][gRotZ]);
            SendClientMessageEx(playerid, COLOR_WHITE, string);
            SaveGates();
        }
        else if(strcmp(x_job, "rotz", true) == 0)
        {
            new Float:value = ofloat;
            GateInfo[gateid][gRotZ] = value;
            format(string, sizeof(string), "Gate RotZ assigned to %f", GateInfo[gateid][gRotZ]);
            SetDynamicObjectRot(GateInfo[gateid][gGATE], GateInfo[gateid][gRotX],GateInfo[gateid][gRotY],GateInfo[gateid][gRotZ]);
            SendClientMessageEx(playerid, COLOR_WHITE, string);
            SaveGates();
        }
        else if(strcmp(x_job, "rotxm", true) == 0)
        {
            new Float:value = ofloat;
            GateInfo[gateid][gRotXM] = value;
            format(string, sizeof(string), "Gate RotXM assigned to %f", GateInfo[gateid][gRotXM]);
            SendClientMessageEx(playerid, COLOR_WHITE, string);
            SaveGates();
        }
        else if(strcmp(x_job, "rotym", true) == 0)
        {
            new Float:value = ofloat;
            GateInfo[gateid][gRotYM] = value;
            format(string, sizeof(string), "Gate RotYM assigned to %f", GateInfo[gateid][gRotYM]);
            SendClientMessageEx(playerid, COLOR_WHITE, string);
            SaveGates();
        }
        else if(strcmp(x_job, "rotzm", true) == 0)
        {
            new Float:value = ofloat;
            GateInfo[gateid][gRotZM] = value;
            format(string, sizeof(string), "Gate RotZM assigned to %f", GateInfo[gateid][gRotZM]);
            SendClientMessageEx(playerid, COLOR_WHITE, string);
            SaveGates();
        }
        else if(strcmp(x_job, "tome", true) == 0)
        {
            GetPlayerPos(playerid,GateInfo[gateid][gPosX],GateInfo[gateid][gPosY], GateInfo[gateid][gPosZ]);
            GateInfo[gateid][gVW] = GetPlayerVirtualWorld(playerid);
            GateInfo[gateid][gInt] = GetPlayerInterior(playerid);
            format(string, sizeof(string), "Gate Pos moved to %f %f %f, VW: %d INT: %d", GateInfo[gateid][gPosX], GateInfo[gateid][gPosY], GateInfo[gateid][gPosZ], GateInfo[gateid][gVW], GateInfo[gateid][gInt]);
            SendClientMessageEx(playerid, COLOR_WHITE, string);
            if(GateInfo[gateid][gModel] == 0)
            {
                GateInfo[gateid][gModel] = 18631;
                GateInfo[gateid][gRange] = 10;
                GateInfo[gateid][gSpeed] = 5;
            }
            if(IsValidDynamicObject(GateInfo[gateid][gGATE])) DestroyDynamicObject(GateInfo[gateid][gGATE]);
            CreateGate(gateid);
            SaveGates();

            format(string, sizeof(string), "%s has edited GateID %d's Position.", GetPlayerNameEx(playerid), gateid);
            Log("logs/gedit.log", string);
        }
        else if(strcmp(x_job, "tomem", true) == 0)
        {
            GetPlayerPos(playerid,GateInfo[gateid][gPosXM],GateInfo[gateid][gPosYM], GateInfo[gateid][gPosZM]);
            format(string, sizeof(string), "Gate PosM moved to %f %f %f", GateInfo[gateid][gPosXM], GateInfo[gateid][gPosYM], GateInfo[gateid][gPosZM]);
            SendClientMessageEx(playerid, COLOR_WHITE, string);
            SaveGates();

            format(string, sizeof(string), "%s has edited GateID %d's Moved Position.", GetPlayerNameEx(playerid), gateid);
            Log("logs/gedit.log", string);
        }
        else if(strcmp(x_job, "renderhq", true) == 0)
        {
            new value = floatround(ofloat, floatround_round);
            GateInfo[gateid][gRenderHQ] = value;
            format(string, sizeof(string), "Gate RenderHQ assigned to %d", GateInfo[gateid][gRenderHQ]);
            if(IsValidDynamicObject(GateInfo[gateid][gGATE])) DestroyDynamicObject(GateInfo[gateid][gGATE]);
            CreateGate(gateid);
            SendClientMessageEx(playerid, COLOR_WHITE, string);
            SaveGates();

            format(string, sizeof(string), "%s has edited GateID %d's RenderHQ to %d.", GetPlayerNameEx(playerid), gateid, value);
            Log("logs/gedit.log", string);
        }
    }
    else
    {
        SendClientMessageEx(playerid, COLOR_GRAD2, "You are not authorized to use that command!");
        return 1;
    }
    return 1;
} */
Reply
#6

Well, you want it to be a command but without ZCMD. Then you need to mention what you want instead.

pawn Код:
if(strcmp(cmd, "/gedit", true) == 0)
Like that?
Reply
#7

Can you give me the whole pawn please?
Reply
#8

****** Thats dcmd i want but i get a warning warning 203: symbol is never used: "dcmd_gedit"
Reply
#9

You propably forgot that part.

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    dcmd(gedit, 5, cmdtext);
    return 0;
}
Reply
#10

Quote:
Originally Posted by Wizz123
Посмотреть сообщение
OMG IF YOU DONT KNOW HOW TO FUCKING DO IT STOP COMMENTING I SAID /GEDIT IS A GATE EDITOR LIKE IN NGRP...
I hope you get banned as soon as possible.

This just crosses all lines, No idea why people are still helping you..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)