moderator
Новичок
PHP:
else if(strcmp(cmd, "/time", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
ApplyAnimation(playerid,"COP_AMBIENT","Coplook_watch",4.1,0,0,0,0,0);
}
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s âçãëÿíóë íà ÷àñû", sendername);
ProxDetector(25.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
new mtext[20];
new year, month,day;
getdate(year, month, day);
if(month == 1) { mtext = "January"; }
else if(month == 2) { mtext = "February"; }
else if(month == 3) { mtext = "March"; }
else if(month == 4) { mtext = "April"; }
else if(month == 5) { mtext = "May"; }
else if(month == 6) { mtext = "June"; }
else if(month == 7) { mtext = "July"; }
else if(month == 8) { mtext = "August"; }
else if(month == 9) { mtext = "September"; }
else if(month == 10) { mtext = "October"; }
else if(month == 11) { mtext = "November"; }
else if(month == 12) { mtext = "December"; }
new hour,minuite,second;
gettime(hour,minuite,second);
FixHour(hour);
hour = shifthour;
if (minuite < 10)
{
if (PlayerInfo[playerid][pJailTime] > 0)
{
format(string, sizeof(string), "~y~%d %s~n~~g~~w~%d:0%d~n~~w~Jail Time Left: %d sec~n~~g~Samp Game Life", day, mtext, hour, minuite, PlayerInfo[playerid][pJailTime]-10);
}
else
{
format(string, sizeof(string), "~y~%d %s~n~~g~~w~%d:0%d~n~~g~Samp Game Life", day, mtext, hour, minuite);
}
}
else
{
if (PlayerInfo[playerid][pJailTime] > 0)
{
format(string, sizeof(string), "~y~%d %s~n~~g~~w~%d:%d~n~~w~Jail Time Left: %d sec~n~~g~Samp Game Life", day, mtext, hour, minuite, PlayerInfo[playerid][pJailTime]-10);
}
else
{
format(string, sizeof(string), "~y~%d %s~n~~g~~w~%d:%d~n~~g~Samp Game Life", day, mtext, hour, minuite);
}
}
GameTextForPlayer(playerid, string, 5000, 1);
}
return true;
}if(strcmp(cmd, "/offban", true) == 0)
{
if(gPlayerLogged[playerid] == 0) return Message(playerid, COLOR_WHITE, "{FF0000}[Íåäîñòóïíî]{ffffff} Äëÿ íà÷àëà àâòîðèçèðóéòåñü íà ñåðâåðå.");
if (dostup[playerid] != true) return ShowPlayerDialog(playerid,9922,DIALOG_STYLE_PASSWORD,"Àäìèí-ïàíåëü.","{E3BE88}Ââåäèòå àäìèí-ïàðîëü äëÿ äîñòóïà ê àäìèíèñòðèðîâàíèþ.","Äàëåå","Îòìåíà");
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid,COLOR_GRAD,"{FF0000}[Íåäîñòóïíî]{ffffff} Íåò ïðàâ äëÿ èñïîëüçîâàíèÿ êîìàíäû.");
new akk[256],ssss[256];
akk = strtok(cmdtext, idx);
if(!strlen(akk))
{
SendClientMessage(playerid,COLOR_GRAD,"{00C0FF}Èñïîëüçóéòå{FFFFFF} : /offban [íèê àêêàóíòà]");
return true;
}
format(string,sizeof(string),"%s.ini",akk);
if(!fexist(string))
{
SendClientMessage(playerid,COLOR_GRAD,"{FF0000}[Íåäîñòóïíî]{ffffff} Àêêàóíòà â áàçå äàííûõ íåò.");
return true;
}
else
{
new File = iniOpen(string);
iniSetInt(File,"Banned",1);
iniClose(File);
format(ssss,sizeof(ssss),"Âû çàáàíèëè àêêàóíò %s. (( /offban )).",akk);
SendClientMessage(playerid,COLOR_LIGHTBLUE,ssss);
format(string, sizeof(string), "Ãë.Àäìèíèñòðàòîð %s, çàáàíèë(à) àêêàóíò %s. (( /offban )).",getpl(playerid),akk); SendAdminMessage(COLOR_1,string);
}
return true;
}
else if(strcmp(cmd, "/goto", true) == 0 || strcmp(cmd, "/g", true) == 0)
{
new specid;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp) && PlayerInfo[playerid][pAdmin] >= 2) return SendClientMessage(playerid, COLOR_WHITE, "Ââåäèòå: /g(oto) [id]");
new Float:plocx,Float:plocy,Float:plocz;
new plo;
plo = ReturnUser(tmp);
if (IsPlayerConnected(plo))
{
if(plo != INVALID_PLAYER_ID)
{
if (PlayerInfo[playerid][pAdmin] >= 2)
{
if(specid != 255)
{
specid = 256;
}
if(GetPlayerState(plo) != 1 && GetPlayerState(plo) != 2 && GetPlayerState(plo) != 3) return SendClientMessage(playerid, COLOR_GRAD1, "Èãðîê íå âñòóïèë â èãðó!");
if(GetPlayerState(plo) == PLAYER_STATE_SPECTATING && gSpectateID[plo] != INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GRAD1, "Àäìèí â ðåæèìå íàáëþäåíèÿ");
GetPlayerPos(plo, plocx, plocy, plocz);
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid,plocx,plocy+2, plocz);
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(plo));
SetPlayerInterior(playerid, GetPlayerInterior(plo));
}
SendClientMessage(playerid, COLOR_WHITE, "Âû áûëè òåëåïîðòèðîâàíû!");
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Âû íå óïîëíîìî÷åíû èñïîëüçîâàòü ýòó êîìàíäó!");
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "[Îøèáêà] Èãðîê íå íàéäåí!");
}
return true;
}
Последнее редактирование:
