14.10.2011, 04:30
pawn Код:
//news
enum pInfo
{
pAdmin,
};
new PlayerInfo[MAX_PLAYERS][pInfo];
//CommandText
new idx,cmd[256],tmp[256],para1;
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/tapa", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0xBFC0C2FF, "USE: /tapa [ID/Nome]");
return 1;
}
new plid;
new Float:shealth;
new Float:slx, Float:sly, Float:slz;
plid = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >=1)
{
if(IsPlayerConnected(plid))
{
if(plid != INVALID_PLAYER_ID)
{
GetPlayerHealth(plid, shealth);
SetPlayerHealth(plid, shealth-5);
GetPlayerPos(plid, slx, sly, slz);
SetPlayerPos(plid, slx, sly, slz+5);
PlayerPlaySound(plid, 1130, slx, sly, slz+5);
}
}
}
else
{
SendClientMessage(playerid, 0xB4B5B7FF, "Vocк Nгo й Um Admin!");
}
}
return 1;
}