I want little Help
#1

Guyz i have a problem in a command the command is /startdtest

here is code
pawn Код:
if(strcmp(cmd, "/startdtest", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SCM(playerid, COLOR_GRAD2, "USAGE: /startdtest [playerid/PartOfName]");
                return 1;
            }
            giveplayerid = ReturnUser(tmp);
            if(IsPlayerConnected(giveplayerid))
            {
                    if(giveplayerid != INVALID_PLAYER_ID)
                    {
                      if (PlayerInfo[playerid][pTeacher] >= 2)
                      {
                            GetPlayerName(playerid, sendername, sizeof(sendername));
                            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                            format(string, sizeof(string), "* You've Start %s RP Driving test.",giveplayer);
                            SCM(playerid, COLOR_LIGHTBLUE, string);
                            format(string, sizeof(string), "* Teacher %s has Started your RP Driving Test.",sendername);
                            SCM(giveplayerid, COLOR_LIGHTBLUE, string);
                            PlayerInfo[giveplayerid][pStudent] = 1;
                            return 1;
                      }
                     
                    }
           }
        }
        return 1;
    }
with using this command it will give PlayerInfo[giveplayerid][pStudent] = 1; to the id which we type in /startdtest id

If i using this it didnt giving to the id please fix it always showing to 0 if i using on my id then gives only to me
Reply
#2

Because you were the only one in the server, and your ID was 0. Of course it's set to player ID 0 (you).
Reply
#3

Quote:
Originally Posted by Huxley
Посмотреть сообщение
Because you were the only one in the server, and your ID was 0. Of course it's set to player ID 0 (you).
No i called some friends to my server and type on those ids like /startdtest 1 but it always gives me i wana to give which id i type like if i type /startdtest 1 so it will give to id 1 tell how can i do?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)