Jak zrobić własne kody?
piszę skrypt np.
Kod: Zaznacz cały
class MyCheatManager extends P2CheatManager;
exec function MojFajnyKod()
{
local Inventory thisinv;
if(!P2Player(Outer).CheatsAllowed())
return;
log(self$" CHEAT: MojFajnyKod");
P2Pawn(Pawn).CreateInventory("Inventory.PistolWeapon");
if(P2GameInfoSingle(Level.Game) == None
|| P2GameInfoSingle(Level.Game).CheckCoolness())
{
log(self$"Nie dostaniesz");
}
thisinv = P2Pawn(Pawn).Inventory;
while(thisinv != None)
{
if(P2Weapon(thisinv) != None)
{
P2Weapon(thisinv).bJustMade=false;
}
thisinv = thisinv.inventory;
}
P2Player(Outer).CommentOnCheating();
}
Jak to zrobić?