Problem with Learning Tuto again -
ServerScripter - 30.09.2011
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 :
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;
}
I use :
PHP код:
PlayerInfo[playerid][pTut] = 0;
Re: Problem with Learning Tuto again -
[MWR]Blood - 30.09.2011
Shouldn't it be
pawn Код:
PlayerInfo[playerid][pTut] = 0;
Also are you sure that you are saving it in the user file?
Re: Problem with Learning Tuto again -
sleepysnowflake - 30.09.2011
Are you sure that when a players connect you check if the pTut is 0 and if it is you make it 1 and force him the tutorial ?
Re: Problem with Learning Tuto again -
ServerScripter - 02.10.2011
0= Has not learned the Tuto
1=Has Done it
@Berlovan : No i don't have it on : Public onplayerconnect
Re: Problem with Learning Tuto again -
sleepysnowflake - 02.10.2011
Well then I suggest you check when player connects that if the tutorial = 0 put tutorial = 1 and FORCE him on the tutorial!
Re: Problem with Learning Tuto again -
MadeMan - 02.10.2011
You don't save the pTut to userfile before you kick.
Re: Problem with Learning Tuto again -
ServerScripter - 04.10.2011
The Problem is How to Force him ?