30.11.2010, 14:38
Код:
format(string, sizeof(string), "~y~Bombs: ~g~%i", bombcount); format(ProductList, sizeof(ProductList), "%s ~n~To refresh timer, type /mybombs again!", ProductList); Info_ShowForPlayer(playerid, 1, string, ProductList);
full command
pawn Код:
COMMAND:mybombs(playerid)
{
new bombcount;
new Status[16];
ProductList = "";
foreach(Bomb, b)
{
if(BombInfo[b][BombOwner] == AccountData[playerid][characterID])
{
bombcount ++;
if(BombInfo[b][BombStatus] == 1) { format(Status, 15, "~g~Ready"); }
if(BombInfo[b][BombStatus] == 2) { format(Status, 15, "~r~Detonating.."); }
format(ProductList, sizeof(ProductList), "%s~w~Bomb ~g~ID:%i~w~ Timer:~r~%i~w~ Status: %s~n~", ProductList, b, BombInfo[b][BombTime], Status );
}
}
if(bombcount == 0)
{
Info_ShowForPlayer(playerid, 1, "No bombs", "You haven't planted any bombs");
return 1;
}
format(string, sizeof(string), "~y~Bombs: ~g~%i", bombcount);
format(ProductList, sizeof(ProductList), "%s ~n~To refresh timer, type /mybombs again!", ProductList);
Info_ShowForPlayer(playerid, 1, string, ProductList);
return 1;
}