PHP Code:
public OnPluginStart() {
...
HookEvent("player_builtobject", SetBuildingLevel);
}
public Action:SetBuildingLevel(Handle:event, const String:name[],
bool:dontBroadcast) {
new index = GetEventInt(event, "index");
new building = EntIndexToEntRef(index);
SetEntData(building,
FindSendPropOffs("CObjectSentrygun","m_iHighestUpgradeLevel"),
3, 4, true);
}
Thanks for the tip, dude! It's exactly what I needed! Now all I have to do is wrap it up so that only the SH gets the perk (no problem at all to do), and I'm set~!
How do I marked a thread as solved, again?