Вырезал из мода. Видел только на ZCMD+SSCANF
в publicOnPlayerCommandText(playerid, cmdtext[])
Code
//----------------------------------[GmCheck]-----------------------------------------------
if(strcmp(cmd, "/gmcheck", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, " Используйте /gmcheck [id Player]");
return 1;
}
new Float:plocx,Float:plocy,Float:plocz;
new plo;
plo = ReturnUser(tmp);
if (IsPlayerConnected(plo))
{
if(plo != INVALID_PLAYER_ID)
{
if (PlayerInfo[plo][pAdmin] > 4)
{
SendClientMessage(playerid, COLOR_GRAD1, "Администратора нельзя проверять.");
return 1;
}
if (PlayerInfo[playerid][pAdmin] >= 1)
{
new Float:Angle;
GetPlayerFacingAngle(playerid, Angle);
GetPlayerPos(playerid, plocx, plocy, plocz);
if (GetPlayerState(plo) == 2)
{
TelePos[plo][0] = 0.0;
TelePos[plo][1] = 0.0;
new tmpcar = GetPlayerVehicleID(plo);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
SetVehicleZAngle(tmpcar, Angle+180);
}
else
{
SetPlayerFacingAngle( playerid, Angle+180 );
SetPlayerPos(plo,plocx+2,plocy, plocz);
GivePlayerWeapon(playerid, 38,200);
}
SetPlayerInterior(plo,GetPlayerInterior(playerid));
SetPlayerVirtualWorld(plo,GetPlayerVirtualWorld(playerid));
SendClientMessage(plo, COLOR_GRAD1, "");
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Вы не Администратор.");
}
}
}
else
{
format(string, sizeof(string), "%d данного игрока нету на сервере", plo);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return true;
}