- เครดิต
- 168
- ความรู้
-
- เงิน $
-
- ความดี
-
|
แก้ไขครั้งสุดท้ายโดย tripgame เมื่อ 2011-1-23 11:30
//----------------Explode พลีชีพ-------------------------------------------------------------------
if(strcmp(cmd, "/explode", true) == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
tmp = strtok(cmdtext, idx);
if(!strlen(tmp) && PlayerInfo[playerid][pAdmin] >= 2)
{
SendClientMessage(playerid, COLOR_GREY, "/explode [Playerid]");
return 1;
}
giveplayerid = strval(tmp);
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if(IsPlayerConnected(giveplayerid))
{
if(PlayerInfo[playerid][pAdmin] >= 999)
{
if(IsPlayerConnected(giveplayerid))
{
format(string, sizeof(string), "ADMIN: %s ได้ถูกพลีชีพโดย %s",giveplayer, sendername);
ABroadCast(0xF68200AA,string,1);
//SendClientMessageToAll(COLOR_DBLUE, string);
SetPlayerHealth(giveplayerid, 10);
new Float:boomx, Float:boomy, Float:boomz;
GetPlayerPos(giveplayerid,boomx, boomy, boomz);
CreateExplosion(boomx, boomy , boomz, 7, 10);
new PlayerName[30];
GetPlayerName(playerid, PlayerName, 30);
printf("[Command] %s has used /explode to explode %s", PlayerName, giveplayer);
}
else
{
format(string, sizeof(string), "%d is not an active player.", giveplayerid);
SendClientMessage(playerid, COLOR_RED, string);
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
}
return 1;
}
|
|