30.09.2010, 19:03
new check;//наверх
if(strcmp(cmd, "/checkgm", true) == 0) {
if(!IsPlayerAdmin) return SendClientMessage(playerid,red,"Вы не админ");
new Float:X,Float:Y,Float:Z;
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) return SendClientMessage(playerid,yellow,"Вводи: /checkgm <id>");
check = strval(tmp);
if(!IsPlayerConnected(check)) {
SendClientMessage(playerid,yellow,"Игрок не найден");
return 1;
}else{
GetPlayerPos(check,X,Y,Z);
SetPlayerPos(check,X,Y,Z+10);
SendClientMessage(check,yellow,"Вас проверяют...");
SendClientMessage(playerid,yellow,"Проверяем на ГМ...");
SetTimerEx("CheckGM", 3000, 0, "d", playerid);
}
return 1;
}
forward CheckGM(playerid);
public CheckGM(playerid)
{
new Float:hp;
GetPlayerHealth(check,hp);
if(hp >= 100)
{
SendClientMessage(check, red, "У вас ГМ");
SendClientMessage(playerid, red, "У НЕГО ГМ!");
}else{
SendClientMessage(check, green, "Вы не читак =)");
SendClientMessage(playerid, green, "Он не читак расслабься =)");
}
return 1;
}
if(strcmp(cmd, "/checkgm", true) == 0) {
if(!IsPlayerAdmin) return SendClientMessage(playerid,red,"Вы не админ");
new Float:X,Float:Y,Float:Z;
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) return SendClientMessage(playerid,yellow,"Вводи: /checkgm <id>");
check = strval(tmp);
if(!IsPlayerConnected(check)) {
SendClientMessage(playerid,yellow,"Игрок не найден");
return 1;
}else{
GetPlayerPos(check,X,Y,Z);
SetPlayerPos(check,X,Y,Z+10);
SendClientMessage(check,yellow,"Вас проверяют...");
SendClientMessage(playerid,yellow,"Проверяем на ГМ...");
SetTimerEx("CheckGM", 3000, 0, "d", playerid);
}
return 1;
}
forward CheckGM(playerid);
public CheckGM(playerid)
{
new Float:hp;
GetPlayerHealth(check,hp);
if(hp >= 100)
{
SendClientMessage(check, red, "У вас ГМ");
SendClientMessage(playerid, red, "У НЕГО ГМ!");
}else{
SendClientMessage(check, green, "Вы не читак =)");
SendClientMessage(playerid, green, "Он не читак расслабься =)");
}
return 1;
}