GF Edit STRCMP
#1

Hi,

Can anybody direct me in right way, how would I convert a huge STR/Ravens edit, to ZCMD?

I know how... but onplayercommandtext, breaks out with errors.

Can anyone help me get started?
Reply
#2

Maybe SHOW US A CODE ?!!
Reply
#3

pawn Код:
//---------------------------<[ OnPlayerCommandText ]>--------------------------------------------------------

public OnPlayerCommandText(playerid, cmdtext[])
{
    dcmd(spec, 4, cmdtext);
    dcmd(specoff, 7, cmdtext);
    dcmd(saveeverything, 4, cmdtext);
    dcmd(xgoto, 5, cmdtext);
    dcmd(gpsfind, 7, cmdtext);
    dcmd(attach,6,cmdtext);
    dcmd(unattach,8,cmdtext);
    dcmd(acheckcode,10,cmdtext);
    dcmd(alias,5,cmdtext);
    dcmd(ips,3,cmdtext);
    dcmd(getips,6,cmdtext);
    dcmd(getaliases,10,cmdtext);
    dcmd(unban,5,cmdtext);
    //dcmd(saveeverything,14,cmdtext);
    new string[512 char];
    new playermoney;
    new sendername[MAX_PLAYER_NAME];
    new giveplayer[MAX_PLAYER_NAME];
    new playername[MAX_PLAYER_NAME];
    new cmd[128];
    new tmp[128];
    new dancestyle;
    new giveplayerid, moneys, idx;
    new idcar = GetPlayerVehicleID(playerid);
    new pveh = GetVehicleModel(GetPlayerVehicleID(playerid));
    cmd = strtok(cmdtext, idx);
    GetPlayerName(playerid, sendername, sizeof(sendername));
    new y5, m5, d5;
    new h5,mi5,s5;
    getdate(y5,m5,d5);
    gettime(h5,mi5,s5);
    format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> %s",d5,m5,y5,h5,mi5,s5,sendername,cmdtext);
    AllCommandLog(string);
   
    if(PlayerInfo[playerid][pAdmin] == 0) Commands[playerid] ++;
    if(Commands[playerid] >= 1)
    {
        KillTimer(CommandsTimer[playerid]);
        CommandsTimer[playerid] = SetTimerEx("ResetCommands",1500,false,"i",playerid);
    }
    if(Commands[playerid] == 5) SendClientMessage(playerid, COLOR_LIGHTBLUE,"* Slow it down or you will be kicked!");
    if(Commands[playerid] == 10)
    {
        GetPlayerName(playerid, playername, sizeof(playername));
        format(string, sizeof(string), "%s (%d), Has been kicked by The Anticheat Peter Griffin for Flooding the Commands.", playername, playerid);
        SendClientMessageToAll(COLOR_NICERED, string);
        SendClientMessage(playerid,COLOR_LIGHTBLUE, "You have been Kicked by The Anticheat For Flooding the commands.");
        format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] Anticheat Has Kicked %s for: Flooding the Commands.",d5,m5,y5,h5,mi5,s5,playername);
        KickLog(string);
        format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] Kicked by the Anticheat - Flooding the Commands.",d5,m5,y5,h5,mi5,s5,playername);
        AddPunishment(playerid, string);
        Kick(playerid);
       
        KillTimer(CommandsTimer[playerid]);
    }
   
    if(PlayerInfo[playerid][pAdmin] >= 1 && AFK[playerid] == 1)
    {
        if(!IsPlayerInAnyVehicle(playerid)) SafeSetPlayerPos(playerid, TeleportDest[playerid][0],TeleportDest[playerid][1],TeleportDest[playerid][2]);
        else SetVehiclePos(idcar, TeleportDest[playerid][0],TeleportDest[playerid][1],TeleportDest[playerid][2]);
        afkadmins --;
        AFK[playerid] = 0;
        TogglePlayerControllable(playerid, 1);
        TextDrawHideForPlayer(playerid, Textdraw5);
        TextDrawHideForPlayer(playerid, Textdraw50);
        TextDrawShowForPlayer(playerid, Textdraw44);
        TextDrawShowForPlayer(playerid, Textdraw45);
        TextDrawShowForPlayer(playerid, Textdraw49[playerid]);
        TextDrawShowForPlayer(playerid, Textdraw51[playerid]);
        TextDrawShowForPlayer(playerid, Textdraw55);
        if(PlayerInfo[playerid][pWatch] == 1)
        {
            TextDrawShowForPlayer(playerid, Textdraw56);
            TextDrawShowForPlayer(playerid, Textdraw57);
            TextDrawShowForPlayer(playerid, Textdraw58);
        }
    }
That bit is stopping ZCMD from working, soon as I get help with converting that bit, so I don't get "cmd_hii" undefined errors, I can do rest my-self. I just need help with that bit.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)