30.09.2011, 18:03
Hi , i use /learn {playerid] so , the player get Punished and must Learn again the tutorial, but , whene i do it , the player Connect IG and doesn't Learn the tutorial...
Command :
I use :
Command :
pawn Код:
if(strcmp(cmd, "/learn", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /learn [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 3)
{
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new year, month,day;
getdate(year, month, day);
format(string, sizeof(string), "%s was been Kicked by %s, He Must Learn again the Tutorial(NoRP).(%d-%d-%d)", sendername,giveplayer,day,month,year);
KickLog(string);
PlayerInfo[playerid][pTut] = 0;//This is the expression i use
format(string, sizeof(string), "An Admin Forced you to learn the tutorial Again.");
SendClientMessage(giveplayerid,COLOR_LIGHTRED,string);
Kick(giveplayerid);
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, 256, "%s kicked %s (Must Learn the tutorial).", sendername,giveplayer);
SendClientMessageToAll(COLOR_LIGHTRED, string);
return 1;
}
}
}
else
{
format(string, sizeof(string), "the ID %d is not avaible.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}
PHP код:
PlayerInfo[playerid][pTut] = 0;