Pelekan
Ученик
B OnPlayerCommandText добавляем
/kickjob - [Уволить игрока с роботы]
/kickmarriage - [Розвести игрока с женой]
/kickinvite - [Уволить игрока с Фракции]
От + не откажуся
---------- Post added at 19:04 ---------- Previous post was at 18:53 ----------
Ну коменти:
PHP:
if(strcmp(cmd, "/kickjob", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] < 3) return SendClientMessage(playerid,COLOR_RED," Вы не уполномочены использовать эту команду!");
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, " Используйте: /kickjob [playerid/PartOfName]");
return 1;
}
new playa;
playa = ReturnUser(tmp);
new PName[MAX_PLAYER_NAME];
GetPlayerName(playerid,PName,sizeof(PName));
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* Вы уволили с работы %s!", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Администратор %s уволил вас с работы!", PName);
SendClientMessage(playa, COLOR_LIGHTBLUE, string);
PlayerInfo[playa][pJob] = 0;
PlayerInfo[playa][pChar] = 0;
PlayerInfo[playa][pContractTime] = 0;
return 1;
}
if(strcmp(cmd, "/kickmarriage", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] <= 4) return SendClientMessage(playerid,COLOR_RED," Вы не уполномочены использовать эту команду!");
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, " Используйте: /kickmarriage [playerid/PartOfName]");
return 1;
}
new playa;
playa = ReturnUser(tmp);
new PName[MAX_PLAYER_NAME];
GetPlayerName(playerid,PName,sizeof(PName));
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* Вы развели %s!", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Администратор %s развел вас!", PName);
SendClientMessage(playa, COLOR_LIGHTBLUE, string);
ClearMarriage(playa);
return 1;
}
if(strcmp(cmd, "/kickinvite", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] < 3) return SendClientMessage(playerid,COLOR_RED," Вы не уполномочены использовать эту команду!");
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, " Используйте: /kickinvite [playerid/PartOfName]");
return 1;
}
new playa;
playa = ReturnUser(tmp);
new PName[MAX_PLAYER_NAME];
GetPlayerName(playerid,PName,sizeof(PName));
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* Вы уволили из фракции %s!", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Администратор %s уволил вас из фракции!", PName);
SendClientMessage(playa, COLOR_LIGHTBLUE, string);
gTeam[playa] = 3;
PlayerInfo[playa][pTeam] = 3;
PlayerInfo[playa][pMember] = 0;
PlayerInfo[playa][pRank] = 0;
PlayerInfo[playa][pChar] = 0;
new rand = random(sizeof(CIV));
SetSpawnInfo(playa, gTeam[playa], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
PlayerInfo[playa][pModel] = CIV[rand];
MedicBill[playa] = 0;
SpawnPlayer(playa);
return 1;
}
/kickmarriage - [Розвести игрока с женой]
/kickinvite - [Уволить игрока с Фракции]
От + не откажуся
---------- Post added at 19:04 ---------- Previous post was at 18:53 ----------
Ну коменти:
