Busco bin. -
el bin de /slap para agregarlo al FS de admin que uso que no lo tiene.
Re: Busco bin. -
Re: Busco bin. -
Код:
if(strcmp(cmd, "/slap", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USO: /slap [ID/NOMBRE]");
return 1;
}
new playa;
new Float:shealth;
new Float:slx, Float:sly, Float:slz;
playa = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >=1)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerHealth(playa, shealth);
SetPlayerHealth(playa, shealth-5);
GetPlayerPos(playa, slx, sly, slz);
SetPlayerPos(playa, slx, sly, slz+5);
PlayerPlaySound(playa, 1130, slx, sly, slz+5);
printf("AdmCmd: %s golpeado %s",sendername, giveplayer);
format(string, sizeof(string), "AdmCmd: %s fue golpeado por %s",giveplayer ,sendername);
ABroadCast(COLOR_NEWS,string,1);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "No puedes usar este comando.");
}
}
return 1;
}