Дата: 02.01.2011, Воскресенье, 13:27:13 | Сообщение # $NUMBER
Группа: Удаленные
Сообщений:
if(!strcmp(cmdtext, "/afk", true)) //
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " Ñíà÷àëà íóæíî çàëîãèíèòüñÿ !");
return 1;
}
if(GetPlayerState(playerid) != PLAYER_STATE_PASSENGER && IsPlayerInAnyVehicle(playerid) && !engineOn[GetPlayerVehicleID(playerid)])
{
SendClientMessage(playerid,COLOR_GREY, "Ñíà÷àëà çàâåäèòå ìàøèíó èëè ïîêèíüòå å¸!");
return 1;
}
if(PlayerGrabitCollector[playerid] != 0 || PlayerCuffed[playerid] != 0 || PlayerTied[playerid] != 0 || PlayerSlivaet[playerid] != 0 || KnockedDown[playerid] != 0 || TutTime[playerid] != 0 || PlayerVzlamuvaet[playerid] != 0)
{
format(string, sizeof(string), "Ñåé÷àñ íåëüçÿ óéòè â ÀÔÊ.");
SendClientMessage(playerid,COLOR_GREY,string);
return 1;
}
if(afk[playerid] == 0)
{
afk[playerid] = 1;
afktext[playerid] = Create3DTextLabel("ß AFK",COLOR_GREEN,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(afktext[playerid], playerid, 0.0, 0.0, 0.7);
GetPlayerName(playerid, sendername, sizeof(sendername));
TogglePlayerControllable(playerid,0);
return 1;
}
else if(afk[playerid] == 1)
{
afk[playerid] = 0;
GetPlayerName(playerid, sendername, sizeof(sendername));
TogglePlayerControllable(playerid,1);
Delete3DTextLabel(afktext[playerid]);
return 1;
}
}
return 1;
}