Cow. Need help please.
#1

Hello. I need help.

pawn Код:
new cow[MAX_PLAYERS];
pawn Код:
if(strcmp(cmd, "/cow", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
      tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_DGOLD, "KORISTENJE: /cow [ID/DioImena]");
                return 1;
            }
            giveplayerid = ReturnUser(tmp);
            if (PlayerInfo[playerid][pAdmin] >= 4)
            {
                if(IsPlayerConnected(giveplayerid))
                {
                    if(giveplayerid != INVALID_PLAYER_ID)
                    {
                        AttachObjectToPlayer(cow[playerid], playerid, 0.0, 0.0, 4.0, 0.0, 0.0, 0.0);
                        return 1;
                    }
                }//not connected
            }
            else
            {
                format(string, sizeof(string), "ERROR: Igrac %s nije aktivan igrac. Pokusajte kasnje opet.", giveplayerid);
                SendClientMessage(playerid, COLOR_GRAD1, string);
            }
        }
        return 1;
    }
It doesnґt work, whoґs the problem.
Reply
#2

Can anyone help me? Please, itґs important.
Reply
#3

Why did you not use the code i sent you. I know it is in zcmd/sscanf but that is easyer to script and that code worked.
Reply
#4

The code didnґt work.

help me. strcmp
Reply
#5

Hi, i no have good english but, post the error, i try help you.
Reply
#6

try
Код:
if(IsPlayerConnected(playerid))
        {
>>    tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_DGOLD, "KORISTENJE: /cow [ID/DioImena]");
                return 1;
            }
to
Код:
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_DGOLD, "KORISTENJE: /cow [ID/DioImena]");
                return 1;
            }
probable identation error
Reply
#7

It also didnґt work.
Reply
#8

ok, post the error that appears when compiling
Reply
#9

Any error messages or just won't work?...
Reply
#10

no errors.

it just didnґt work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)