SA-MP Forums Archive
I want little Help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: I want little Help (/showthread.php?tid=397268)



I want little Help - IceBilizard - 04.12.2012

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


Re: I want little Help - Huxley - 04.12.2012

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


Re: I want little Help - IceBilizard - 04.12.2012

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?