04.12.2012, 07:24
Guyz i have a problem in a command the command is /startdtest
here is code
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
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;
}
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