Trans help
#1

Is there any guide how i can trans strcmp(cmd to ZCMD? or i someone want to help me?
Reply
#2

Are you kidding me?

There is thousands of threads on zcmd. Don't be so lazy.

Second, do you actually want 'help' or you want slave work? If you want slavework post here.
Reply
#3

Quote:
Originally Posted by VincentDunn
Посмотреть сообщение
Are you kidding me?

There is thousands of threads on zcmd. Don't be so lazy.

Second, do you actually want 'help' or you want slave work? If you want slavework post here.
Yes, i want help
Reply
#4

I give a ec a cmd i want to trans

pawn Код:
}
    if(strcmp(cmd, "/blindfold", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /blindfold [playerid/partofname]");
                return 1;
            }
            giveplayerid = ReturnUser(tmp);
            if(giveplayerid != INVALID_PLAYER_ID)
            {
                if(giveplayerid == playerid)
                {
                    SendClientMessage(playerid, COLOR_GREY, "You can not blind yourself");
                    return 1;
                }
                if(PlayerCuffed[playerid] == 1)
                {
                    SendClientMessage(playerid, COLOR_GREY, "You can not do this while cuffed");
                    return 1;
                }
                if(PlayerTazed[playerid] == 1)
                {
                    SendClientMessage(playerid, COLOR_GREY, "You can not do this while tazed");
                    return 1;
                }
                if(PlayerTied[playerid] == 1)
                {
                    SendClientMessage(playerid, COLOR_GREY, "You can not do this while tied");
                    return 1;
                }
                if(PlayerTied[giveplayerid] == 1)
                {
                    if(GetDistanceBetweenPlayers(playerid,giveplayerid) < 5)
                    {
                        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        SetPlayerCameraPos(giveplayerid, -833.5241,-1358.8575,86.9054);
                        PlayerPlayerActionMessage(playerid,giveplayerid,30.0, "takes out a rag and blindfolds");
                        Blindfold[giveplayerid] = SetTimerEx("BlindfoldTimer", 300000, 0, "i", giveplayerid);
                        return SetPlayerCameraLookAt(giveplayerid, -830.8118,-1360.3612,87.0289);
                    }
                    else
                    {
                        return SendClientMessage(playerid, COLOR_GREY, "That player is not in range");
                    }
                }
                else if(PlayerCuffed[giveplayerid] == 1)
                {
                    if(GetDistanceBetweenPlayers(playerid,giveplayerid) < 5)
                    {
                        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        SetPlayerCameraPos(giveplayerid, -833.5241,-1358.8575,86.9054);
                        PlayerPlayerActionMessage(playerid,giveplayerid,30.0, "takes out a rag and blindfolds");
                        Blindfold[giveplayerid] = SetTimerEx("BlindfoldTimer", 300000, 0, "i", giveplayerid);
                        return SetPlayerCameraLookAt(giveplayerid, 2000,-2000,2000);
                    }
                    else
                    {
                        return SendClientMessage(playerid, COLOR_GREY, "That player is not in range");
                    }
                }
            }
            else
            {
                return SendClientMessage(playerid, COLOR_LIGHTRED, "Playerid is not an active playerid");
            }
        }
        return 1;
Reply
#5

Help on what?

https://sampforum.blast.hk/showthread.php?tid=319000
https://sampforum.blast.hk/showthread.php?tid=322311
https://sampforum.blast.hk/showthread.php?tid=327201

Those are just one of the many tutorials on ZCMD I found by literally searching "ZCMD Tutorials" on ******.

EDIT:

Barely saw your post.
Reply
#6

How should i trans this?

Код:
tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
Reply
#7

Nvm, thanks for the guide man
Reply
#8

By using sscanf with zcmd.

sscanf splits up the command into variables for commands with multiple parameters.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)